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

Fully add multi-language capability to blip #3

Closed
wants to merge 26 commits into from

Conversation

coyotte508
Copy link
Contributor

@coyotte508 coyotte508 commented Apr 8, 2018

No description provided.

coyotte508 and others added 26 commits April 8, 2018 12:00
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
@coyotte508 coyotte508 closed this Apr 8, 2018
yvon-dblg pushed a commit that referenced this pull request Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants