Translation Server
The Koha Translation Server hosts files necessary to translate Koha into various languages. It's based on Weblate.
- URL: http://translate.koha-community.org
- Administered by the current Koha Translation Manager
- Mailing list: koha-translate
Workflow for translators
The Pootle server hosts projects. For Koha these are koha and koha-manual. The first project is for the GUI of the Koha itself, the second is to build the translated manuals.. There is one project per Koha version. In each project are the .po files for the various languages. Instead of one big po file, there are multiple for different parts of Koha (OPAC, staff interface, help, ...) and the different chapters of the manual. This allows to translators to determine what is most important for them and prioritize translating accordingly.
The Weblate Server can be used directly by translators to translate online in a collaborative environment. This is the easiest way for a team of translators to work together.
The integration of translation files, or resulting files, into Koha itself, follows two main stages :
- String Freeze. At this stage, the Koha development team decides no new strings will be pushed prior to a release to give translators time to finish their work. In the past this was the moment that the new strings would be made available on the translation server. Since the switch to Weblate, strings are made available continuously as they are integrated into the code base. This allows to translators to start at any time. A String Freeze is still recommended and should be announces by email to the koha-translate mailing list.
- Koha Release. When preparing the packages for Koha, the Packaging Manager will pull the latest set of po files from the translation server's git repository to package them separately for the release.
Translating online
Translating online using Weblate is the preferred way of doing translations since it will allow multiple people to work together.
File naming
Note: this might not apply to Weblate
The Koha naming convention for languages differs from the Pootle one. A translation of the language code has to be made based on this equivalence table:
Koha Pootle Comment ------------------------------------------------------------------------------- am-Ethi am OPAC ar-Arab ar OPAC az-AZ az Azéry ca-VA ca Catalan da-DK da Danish de-DE de German el-GR el Greek en-GB en_GB English, Great Britain en-NZ en_NZ English New Zealand es-ES es Castillan, Spain fr_CA fr_CA French (Canada) fr-FR fr French hi hi Hindi hr-HR hr Croatian hu-HU hu Hungarian it-IT it Italian ja-Jpan ja Japan mi-NZ mi Maori mon mn Mongol nb-NO nb Norvegian (Bokmål) nl-BE nl Dutch (Belgium) nl-NL nl_NL Dutch (Nederland) nn-NO nn Norwegian Nynorsk pl-PL pl Polish pt-PT pt Portuguese (Portugal) pt-BR pt_BR Portuguese (Brazil) ro-RO ro Romanian ru-RU ru Russian sv-SE sv Swedish tet tet Tetum th-THA th Thai tr-TR tr Turkish uk-UA uk Ukranian zh-Hans-CN zh_CN Chinesee (China) zh-Hans-TW zn_TW Chinesse (Taiwan)
From Koha to Weblate
Since the switch to Weblate this is an automated process that happens automatically in the background. You can see the status of the synchronization between Koha's codebase and the Weblate server on the dashboard under Infrastructure health status / Translation Updates (Weblate).
The manual process would look something like this:
cd <koha-repo>/misc/translator
./translate update
The created updated po files are then moved to the git repository used by Weblate.
Tips and tricks
Invalid syspref translation. Sometime, syspref strings haven't been properly translated. You have for example:
acquisitions.pref#AcqCreateItem# Crear un ítem cuando
When the valid string is:
Crear un ítem cuando
A Perl one liner can transform the syspref .po file:
perl -i -pe 's/msgstr .*# (.*)"/msgstr "$1"/' po/es-ES-pref.po
Duplicated lines in syspref .po files
for i in *pref*; do echo $i; uniq $i>t.pref; cp t.pref $i; done