Keeping web site translations up-to-date

Since web pages aren't static, it is a good idea to keep track of which version of the original a certain translation refers to, and to use this information to check which pages have changed since the last translation. This information should be embedded at the top of the document (though below any other "use" headers) in this form:

#use wml::debian::translation-check translation="git_commit_hash"

where git_commit_hash is the git commit hash that refers to the commit of the original (English) file that the translated file was translated against. You can get the detail of that specific commit using the git show tool: git show <git_commit_hash> . If you use the copypage.pl script in the webwml directory, the translation-check line is added automatically in the first version of your translated page, pointing to the version of the original file that exists at that point.

Some translations may not get updated for quite some time, even though the original language (English) has changed. Due to content negotiation, the reader of the translated page may not be aware of this and might miss important information, introduced in new versions of the original. The translation-check template contains code to check if your translation is outdated, and output an appropriate message warning the user about it.

There are more parameters that you can use on the translation-check line:

original="language"
where language is the name of the language you are translating from, if not english. The name must correspond to the top-level subdirectory in the VCS, and to the name in languages.wml template.
mindelta="number"
which defines the maximum difference in git revisions before the translation is considered to be aged. The default value is 1. For less important pages, set it to 2, meaning that two changes need to be made before the translation will be considered aged.
maxdelta="number"
which defines the maximum differenc in git revisions before the translation is considered to be outdated. The default value is 5. For very important pages, set it to a smaller number. A value of 1 means that every change will cause the translation to be marked as outdated.

Tracking the age of translations also enables us to have translation statistics, a report of outdated translations (together with helpful links to the differences between files), along with a list of pages that haven't been translated at all. This is intended to help translators and to attract new people to help.

To avoid presenting our users with information that is too outdated, translations that have not been updated within six months from when the original page was changed will be purged automatically. Please see the list of outdated translations to find which pages are in danger of being purged.

Additionally, the script check_trans.pl is available in the webwml/ directory, which will show you a report on pages needing updates:

check_trans.pl language

where language is the directory name that contains your translation, e.g. "swedish".

Pages that lack translation will be shown as "Missing filename", and pages that are not up to date with the original will be shown as "NeedToUpdate filename to version XXXXXXX".

If you want to see what the exact changes are, you can get the differences by adding -d command line option to the above command.

If you want to ignore warnings about missing translations (for instance for old news items), you can create a file called .transignore in the directory where you want to suppress the warnings, listing each file that you are not going to translate, with one name per line.

A similar script for keeping track of the translations of the mailing lists descriptions is also available. Please read the comments in the check_desc_trans.pl script for documentation.