Translations
Cordice is translated through catalogues in the repository. There is no hosted translation platform yet — deliberately, rather than by oversight: sending contributions to somebody else's instance would file our translators' work under their project, and standing one up is only worth doing once there are enough translators to fill it.
So for now, the catalogues are edited the same way the code is.
Where they are
apps/web/packages/client/components/i18n/catalogs/<language>/messages.po
One directory per language, standard gettext. Each entry carries the English source, the context it appears in, and the file it came from.
Changing one
Edit the msgstr lines and open a pull request. Nothing needs to be compiled by
hand — the catalogues are compiled during the build.
A few things that are easy to get wrong:
- Placeholders travel.
{count}and{username}must survive into the translation exactly as written. They are substituted at runtime, and a renamed one silently renders as literal text. - Plurals are not always two. The plural forms header at the top of each catalogue is not decoration; languages that need six forms have six.
- Leave
msgidalone. It is the key. Changing it detaches the entry from the string it translates.
Adding a language
Copy an existing catalogue directory, keep only the header, and translate what you can — a partial catalogue is useful, because anything missing falls back to English rather than breaking.
When this changes
Once there are enough people translating for a review queue to be worth having, we will host a translation platform of our own and this page will point at it. Until then, a pull request is the whole process.