This document provides some general rules to deploy a translation process that will ease the work of maintainers (upstream and distribution maintainers) and translators (or translation teams). Translators usually retrieve a POT (for a new translation) or the current PO for their language, then they translate the untranslated strings and update the translation of the string marked fuzzy. Translators need to know if a PO has to be updated: * they can verify the POs in the version control system or in the distributed archives/packages * they can be inform by the translation teams, which automatically check the status of the POs in various packages. We want to avoid the translator to be notified by an user reporting that some strings are not translated even if the PO contain no untranslated or fuzzy string. Thus it is important to ensure that the POT are up-to-date with the original documentation and that the POs contains the same strings as the POT. 1. Upstream maintainers should update the POT according to the orginal documents and update the POs according to these uptodate POT when they distribute an archive. 2. If the switch to po4a is done in a distribution, the source package should also contain up to date translation materials. 3. If the documentation is patched by the distribution, the maintainer must not forget to update the POT and POs. It is important to ensure that the translation materials are updated automatically. A standardized architecture of the source tree will help the translation teams when they try to detect the POS that need to be updated. Thus we recommend the following architecture: root | |-- doc, man, ... | | | |-- en | | | | | \-- original documents | | | |-- po4a | | | | | |-- po | | | | | | | |-- .pot | | | |-- .po | | | \-- ... | | | | | |-- add_ | | | | | | | |-- .add | | | \-- ... | | | | | \-- .cfg | | | |-- | | | | | \-- generated translations | | | \-- ... We recommend to use a configuration file with po4a that does not require any option (put the options in the configuration file). This permits to easily check that the POT is up-to-date with the documentation and that the It is important to avoid a build failure in the case a generated translation cannot be generated (the PO is too outdated, an addendum cannot be applied, ...), thus you should use wildcards or test if the file was generated in the 'install' or 'dist' rules Examples ======== Using po4a upstream ------------------- When po4a is used upstream, we recommend to run po4a in the 'dist' rule. This will update the POT and POs, and will generate the translated documents. These translated documents can be distributed in the source archive if the maintainer don't want to add a build dependency on po4a. It is important to distribute the POT and POs in the source archive. A typical dist rule could then be: dist: po4a --rm-backups .cfg ... If automake is used, The following could also be used. dist-hook: po4a --rm-backups .cfg ... Using po4a in a distribution ---------------------------- (Debian packaging is taken as an example, you will have to adapt this to your distribution) In a Debian package, to ensure that the source package is released with all the POT and POs are up-to-date, you should run po4a in the 'clean' rule of debain/rules. The translated documents can be generated in the 'build' (or 'build-indep') rule: clean: # Updtate the POT and POs cd <...>/po4a && po4a --no-translations --rm-backups .cfg build: # Generate the translations cd <...>/po4a && po4a --rm-backups .cfg