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

Internationalization #28

Merged
merged 10 commits into from Aug 30, 2017

Conversation

Projects
None yet
2 participants
@jdavid
Contributor

jdavid commented Aug 1, 2017

Hi!

  • It uses Stonejs, https://www.npmjs.com/package/stonejs
  • The messages are extracted to a POT file (locales/messages.pot) using the included gettext.py script. Stonejs-tools and xgettext did not work because unable to understand the syntax (ES6, JSX).
  • Stonejs-tools is used to translate the PO files to a JSON file (js/messages.json), which is later loaded (in js/t.js)
  • Included partial translation for French.

jdavid added some commits Jul 20, 2017

Start work on i18n
The gettext.py script extracts translatable strings and generates the
locales/locale.pot file.

Stonejs produces the JSON files from the PO files. For now Stonejs
cannot be used to extract the translatable strings as it fails with
syntax errors.
Add French translation, improve gettext.py
Improvements to gettext.py
- Updated regular expression
- Do not output duplicates
- Output source files and line numbers
- Output is sorted

Tried xgettext but it fails to recognize many strings, as it doesn't
understand React.
@jdavid

This comment has been minimized.

Show comment
Hide comment
@jdavid

jdavid Aug 18, 2017

Contributor

rebased

Contributor

jdavid commented Aug 18, 2017

rebased

@tamasd tamasd merged commit dcd3044 into Pronovix:master Aug 30, 2017

@tamasd

This comment has been minimized.

Show comment
Hide comment
@tamasd

tamasd Aug 30, 2017

Member

Thanks for the contribution

Member

tamasd commented Aug 30, 2017

Thanks for the contribution

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