The Tomcat project uses POEditor (Tomcat translations: Join, View) to manage translations.
Key points:
- The Export/Import code that copies to/from POEditor prefixes each property key with the package name to ensure that the keys are always unique
- In POEditor the keys are known as terms
- If a value contains a
[{n}]
sequence then it will be processed by a MessageFormatter which means any single quotes must be escaped by using two single quotes
The process to synchronise the Tomcat source code with POEditor works as follows:
- Add or remove keys (terms) to the English LocalStrings.properties files
- Make any changes required to the values in the English LocalStrings.properties files
- Export (org.apache.tomcat.buildutil.translate.Export) the translations
- Import the terms with English translations to POEditor
- Update the translations for other languages
- Export one or more languages (only export translated terms)
- Import (org.apache.tomcat.buildutil.translate.Import) the translations
It is recommended that one language is imported at a time and that steps 6 and 7 are repeated for each language to be imported.
Steps 1 to 4 are only required when adding terms, removing terms or changing the English translation.
For small changes it is possible to make the change in both svn and POEditor - effectively keeping the two in sync manually - and not use the Import/Export process. Care needs to be taken to ensure that the two systems remain synchronized.