Transifex
Translations are managed in Transifex. Each CKAN extensions has its own resource in Transifex and in addition, wordpress has a single resource which covers all of the wordpress translations.
Translations from codebase to Transifex and back are handled via .po files which are uploaded and downloaded with the help of Transifex client.
CKAN
Translations for CKAN consist of translations of extensions and translations of the CKAN itself. If the translation shown on UI does not exist in projects transifex resources, it comes from CKAN core translations. If someone wishes to change the translation, he needs to add translated key to the extension, where it overrides the core translation. If multiple extensions have the same translated key in their .po files, all need to have the same translation.
Generating translation files
Translations in CKAN extensions mostly follow the official documentation. In summary, following commands should cover most of the cases.
Translating in Transifex
The newly generated translation files can be uploaded and downloaded to transifex with the following commands:
Compiling translations
Translation files can be compiled by running following commands:
WordPress
Generating translations for WordPress is done manually with makepot.php. Translation tools in wp-cli cannot be used as the version is use is too old for them and it cannot be updated until automating polylang is replaced with something as polylang-cli was abandoned. makepot.php assumes specific folder structure and following commands should generate translation files.
After being pushed and pulled from Transifex, following commands will compile the translations files:
Other notes
There are some tools which may or may not work in https://github.com/6aika/sixodp/tree/master/tools for CKAN and in https://github.com/6aika/sixodp/tree/master/sixodp/tools for WordPress.
Last updated