-
Notifications
You must be signed in to change notification settings - Fork 72
Translating Pixelated
Anyone can contribute with Pixelated translating our user interface and making it accessible for more people. All the translation work is managed at Transifex. Follow the steps below to start contributing:
- Sign up at Transifex and visit our Pixelated project page.
- On the project page, choose the language you want to work on. If the language doesn’t exist yet you can request a new language by clicking on the “Request language”.
- Then, click the “Join this Team” button to become a member of this team. You will be accepted as soon as possible.
We strongly recommend you read Transifex User Guide if it's the first time using this tool.
To sync translation files on Transifex and those versioned with the source code itself, we use The Transifex Client. To get it up and running you can follow the Client installation guide. For more informations about, see the Client Usage.
Important: since the Transifex Client uses api calls to communicate with Transifex, you need a Transifex account to use it.
You also need to configure the ~/.transifexrc
file. See the template Client Configuration.
With the Client installed, the most common operations are really simple. From the web-ui
directory:
-
tx pull -a --minimum-perc=100
to pull the most recent version of 100% translated languages from Transifex -
tx push -s
to push the source (-s) language to Transifex. Do not push translation files, always translate on Transifex
After pulling the updates from Transifex, you might see differences pointed by git. You should review and commit these changes.
For internationalization we are using i18next, a internationalization framework for browser or any other javascript environment (eg. node.js). i18next should identify the language of the host system or user preference and translate it to the used language. Fallback language is English.
Therefore, to ensure all new text is translated, please make sure that the text is not hardcoded into the templates and javascript files, but is instead loaded from the respective web-ui/app/locales/<lang>/translation.json
, which is synced through the Transifex Client (as described above). To do this, import views/i18n
into the respective js file and use it as i18n.t(key, options)
.