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="X.x"

where X.x is the CVS version number of the original (English). You can get this number looking in CVS/Entries which is in the format: /file_name/X.x/date//. You can also get it by running cvs status file_name in the English source directory. If you use the script in the webwml directory, this line is added automatically.

This is also useful because some translations may not get updated for quite some time, even though the original language (English) does. Due to content negotiation, the reader of the translated language 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 appropriate message warning the user about it.

There are also some additional parameters that you can use on the #use line:

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 CVS, and to the name in languages.wml template.
which defines the maximum difference in CVS revisions before the translation is considered aged. The default value is 1. For less important pages, set it to 2, which means that two changes need to be made before it is considered making the translation aged.
which defines the maximum difference in CVS revisions before the translation is considered to be outdated. The default value is 5. For very important pages, set it to be less. A value of 1 means that every change is considered making the translation outdated.

This also enables us to have translation statistics, a report of all outdated translations together with helpful links to the differences between files, as well as 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 is available in the webwml/ directory, which will show you a report on pages needing updates: 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 x.y".

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. Please note that this can take a while since it can include several accesses to the CVS server.

If you want to ignore warnings on missing pages (for instance 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 script for documentation.