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

Localization system for JSX-based content #874

Closed
goldpbear opened this issue Jan 11, 2018 · 1 comment
Closed

Localization system for JSX-based content #874

goldpbear opened this issue Jan 11, 2018 · 1 comment

Comments

@goldpbear
Copy link
Contributor

goldpbear commented Jan 11, 2018

As we move to React, a lot of translatable content is going to move from Handlebars templates to JSX. We'll need a way to localize this content. We'll also need to migrate existing translations to the new system. Migrating existing translations might need to be a manual step, but I don't think it will be too bad if we take it one set of components at a time.

I think we discussed the following library before and everyone seemed happy with it, so I'd propose we use it:
https://www.npmjs.com/package/i18next

Barring any objections, I'll go ahead and use this for #814 and other component ports.

@goldpbear
Copy link
Contributor Author

goldpbear commented Jan 11, 2018

As a side note, our overall translation system will likely straddle the new JSX-based system above and our existing gettext-based system until we're completely ported to React. If we do need to run a translation before we've ported everything, we (and the translator) will need to manage two translation files.

This isn't great, but I'd argue it's preferable to building a temporary tool that somehow knits the two translation systems together.

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

No branches or pull requests

1 participant