-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fully add multi-language capability to blip #3
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Procedure: - surround all text to be translated with __() - npm run update-translations will update the .po files in translations/ - Use appropriate software to add translations - npm run build-translations will transform the .po files into .json Then the webpack script takes care of generating a separate index.[xx].html and bundle.[xx].js for each language in dist. For now, the server only serves index.en.html
Set default language to French (pending a per-user setting) and add translations for the navbar
- Move the loading of translations out of dependencies/i18n - Change languages.json from [languageCode] to {languageCode: language} - Move the language setting out of bootstrap.js and into core/language - Add language selection in userprofile to change language - Language selection is only client-side, not yet stored server-side
If the user hasn't yet set a language in their settings, use the browser's language instead.
Not yet using react-i18next. i18next allows to keep things minimal, react-i18next would introduce decorators and extracting t from props. I am still using i18n-extract to extract translations, next step is using i18next-parser
- Sort translation keys in the JSON - Translate the front page - Remove unneeded dependencies - Fix stuff
The weekly/trends chart have also been updated from "MMM D" to "D MMM" in French
Translations are now extracted from blip's two submodules. That way they don't need the extra-tooling, only i18next as a dependency. Furthermore, they can prefix their translatable strings with 'viz|' or 'tideline|' to use a different namespace and separate their translations from blip's translation.
It gets confused by translate() calls in viz/tideline
yvon-dblg
pushed a commit
that referenced
this pull request
Dec 1, 2020
Upgrade from upstream v0.42.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.