To translate or not to translate?

To translate, or not to translate, that is the question that has never existed for me. Nevertheless, I find myself pondering that particular question. The question arose from the PDFreaders campaign and its petition page. For some reason, it has been obvious to translators that the country list on the bug list page ought to be translated. For another mysterious reason, few seem to care about the country list on the petition page. A while ago I thought this was due to technical reasons and set out to figure out how to do it. Some Googling, a test translation, and a Python script to check for errors and sort the list alphabetically later, I am confident how to do it without breaking anything. However, meanwhile my initial inquiries have generated some feedback.

As expected, I have received some positive feedback and support: Matthias has helped me press the issue and has offered valuable insight on web@ and translators@. Kostas has provided a Greek translation. Martin has helped me verify the mark-up for translations. So far, so good.

However, I have met resistance from another Greek translator out of the blue: Stelios thinks that someone coming from Saint Helena probably would not want to use non-English versions of the site and ideally the country list would be akin to the language list in the navigation menu, i.e. each country name would be written in its “native” language. The main problem with the current system is that the user needs to be able to communicate in English and admittedly Stelios’ proposal, were it implementable, would solve the issue. As it happens, it is not: there are many countries with more than one official language (for instance, Canada (2), Belgium (3), Finland (2), Switzerland (4), South Africa (11), Iraq (2)… [According to English Wikipedia at the time of writing.]) That situation makes it impossible to implement Stelios’ proposal in a reasonable manner.

Furthermore, multiple official languages are a plausible explanation why, if not someone from Saint Helena, then someone from Canada might want to sign the petition in a language other than English. In addition to multiple official languages per country, there can be many regionally recognized languages. Also non-citizen permanent residents of a country (mainly immigrants) may wish to browse the FSFE web site in their mother tongues. Thus there exist quite a few people who would benefit from a complete translation of the petition page.

In addition, there exists the issue of consistency: both the surrounding text and the country list on the bug list page are translated. As a complete translation looks more aesthetically pleasing, we should translate that list even if there were no accessibility issues currently present.

Summa summarum, complete translations are preferable to incomplete ones and should be set as the goal.


How to translate the country list on the petition page?
A short and practical companion piece to the writing above

The relevant XML looks like this:

<select id=”country” name=”country”>
<option>Aland</option>
<option>Afghanistan</option>
<option>Akrotiri</option>
<!– [...] –>
</select>

One should copy the English name into attribute “value” and replace the original with a translation. For Estonian, the result looks like this:

<select id=”country” name=”country”>
<option value=”Aland”>Ahvenamaa</option>
<option value=”Afghanistan”>Afganistan</option>
<option value=”Akrotiri”>Akrotiri</option>
<!– [...] –>
</select>

Now it would be wise to check that one has not introduced any errors and sort the list alphabetically. To begin with, one should check the translation with xmllint. It would be wise to proceed to comparing the attribute values to the original option values and sorting the list alphabetically. As this is tedious and error-prone to do by hand, one would do well to use a computer for this. Fortunately, I have written a Python script (Python 3, requires lxml) to do exactly that. Usage:

./petition.py petition.??.xhtml petition.en.xhtml locale
An example, for Estonian:
./petition.py petition.et.xhtml petition.en.xhtml et_EE.UTF-8
Results in
<?xml version=’1.0′ encoding=’UTF-8′?>
<select id=”country” name=”country”>
<!–[...]–>
<option value=”Afghanistan”>Afganistan</option>
<option value=”Aland”>Ahvenamaa</option>
<option value=”Akrotiri”>Akrotiri</option>
</select>
being written to petition.XX.xhtml.

N.B. The script works both with a relevant fragment and a complete translation. However, attention must be paid to the output. It might get rid of a space or two around <a> elements (links).

Once one has verified the output both visually and with xmllint, it ought to be presented for proofreading and ultimately committed to the trunk.

Comments are closed.