Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: translations need to be determined at render time [v33] [DHIS2-8638] #967

Merged
merged 27 commits into from
May 13, 2020

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented May 11, 2020

Fixes: https://jira.dhis2.org/browse/DHIS2-8638

Translations need to be figured at render-time, rather than just being consts outside of functions. 3rd party libs (analytics, d2-ui components) also updated with the same type of changes.
Also, datasets.js and datatypes.js were removed as they had previously been migrated to the analytics library (but forgotten to delete here). This resulted in removal of some translations from en.pot (not sure if this means some languages will lose their translations?)

Copy link
Contributor

@martinkrulltott martinkrulltott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments.
Also, yarn seems to be buggy again, giving multiple versions of some deps that can (used to) resolve to a single version. This can be fixed with npx yarn-deduplicate --packages PACKAGE-NAME yarn.lock

packages/app/package.json Outdated Show resolved Hide resolved
yarn.lock Outdated
@@ -1236,7 +1158,7 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"

"@material-ui/core@^3.1.2", "@material-ui/core@^3.3.1", "@material-ui/core@^3.9.3":
"@material-ui/core@^3.1.2":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this resolve to version "3.9.4" as the others below?

yarn.lock Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
packages/app/src/modules/yearOverYear.js Show resolved Hide resolved
@martinkrulltott
Copy link
Contributor

I tested this locally, here are my findings. Please note that I haven't verified if there actually are translations available for all of these parts, maybe that should be a first step in the investigation.


image
Caused by the period selector from Analytics?


image


image


Download menu

image
image


Dimension context menus. Note: the context menu for unselected dimensions seems translated and fine, only selected dimensions have this issue.

image

image

yarn.lock Outdated Show resolved Hide resolved
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 33.1.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants