django-rea / rea-app

Multi-platform UI application for OVN (Open Value Network) & REA (Resource / Event / Agent) backends- including Sensorica NRP, FreedomCoop OCP, GoPacifica DEEP & eventually django-rea project.
16 stars 6 forks source link

Translations of the UI #66

Open fosterlynn opened 7 years ago

fosterlynn commented 7 years ago

We will need some facility so different people can translate the UI into multiple languages.

pospi commented 7 years ago

There's already a module in the UI for translation- https://www.npmjs.com/package/i18n-react

And a YAML file in packages/store/intl which defines the English translations. We just need to take a pass at the UI and replace hardcoded text with the translation components and put said text in that file. Then we can start to create separate files for other languages.

There's also a bit of work to do in initialisation, to detect the user's language from the browser locale settings and load the appropriate translation file.

bhaugen commented 7 years ago

Translation of the strings in the OCP UI to Spanish has been done: https://github.com/FreedomCoop/valuenetwork/blob/master/locale/es/LC_MESSAGES/django.po @XaviP understands how it all works, and where the translations were done.

bhaugen commented 7 years ago

See https://www.transifex.com/freedomcoop/freedomcoop-ocp/ https://docs.transifex.com/ https://docs.transifex.com/search?q=javascript

bhaugen commented 7 years ago

@XaviP says, this is how it's done in django: To update translations in code:

XaviP commented 7 years ago

@fosterlynn @bhaugen and I have admin permissions in transifex to upload updated po file. If someone needs that permissions we can give them. Once translators finish or make a notable amount of translation, the po file of the language must be downloaded, compile the language (explained in the same link bob sent), and push it to master github to deploy it.