This page is about moving the translations of the Debian website to gettext catalogs, commonly known as PO files.
With the current infrastructure each translation of the Debian website is basicly a fork of the English version. The translator uses the copypage.pl script to copy the .wml file corresponding to the page to be translated and then starts replacing the English text with the translation. This process has several drawbacks:
- the translator is editing .wml files directly and can break the layout if not careful
- translations relate to a specific English version of the same file, by use of the "translation-check" header, which has to be manually updated by the translator (it is inserted automatically by the copypage.pl script for new pages).
- - this method relies on CVS tracking versions per file, which makes it very difficult to change the VCS - puts an additional burden on translators
- it duplicates unnecessary information
- any changes in the layout can be done only with the smart_change.pl script to not break the translations
Benefits of gettext catalogs
- translators are already familiar with it from other projects
- various tools for dealing with updating, merging, editing, checking, ... PO files exist
- detaches the actual content from the layout which would make it much easier to work only on the layout without breaking translations. As a side effect this could allow an easy switch away from wml if this is ever needed/desired.
Disadvantages of PO files handling
- it duplicates information (since the English text will be in every PO file, the repository size should double)
What needs to be done
- use po4a to generate .pot files for the entire website and write the scripts/Makefiles to automate the process and also for updating PO files when the English version changes
- write the necessary scripts/Makefiles to create a translated version of the site using only PO files for translation
- start converting languages one by one
Step 3. should probably start with languages having only small parts of the website translated in order to catch potential problems as early as possible. This has to be done in coordination with the respective translators so they can check for breakage on every step. As the process becomes more mature languages with more translations can be converted.
Another approach would be to provide an hybrid feature: if the PO file exists, use it to handle the translation, if not, use the former WML file if it exists. So the WML to PO upgrade won't be a blocker to begin using PO files (WML translations could be kept for the time beeing).
handling addendum gracefully if it exists would be nice, using po4a>=0.39 (not yet in backport) would do it