Translating the Glossary

This page describes how to translate the Glossary.


For those not skilled in wiki editing, it will be a great help if you simply contribute translations to the glossary spreadsheet on Google Sheets. A member of the Wiki team will then incorprate them into the Glossary.

Translating the Glossary poses particular problems. This page describes how we have addressed them, and how new translations are incorporated.

Structure of the Glossary

Each glossary definition is a separate page. Glossary pages have their own name space called Glossary. The Glossary itself simply comprises a table with technical terms in the first column and their definitions in the second, transcluded from the definitions pages. So, for example, we can have separate glossary entries for both AC and Alternating Current, both of which transclude the same definition page.

It also means that individual definitions can be referenced from elsewhere in the wiki. Simply hovering over the links will give the definitions as popups.

Tables are a littly tricky to set up in wikimedia, and in addition, there is a little extra infrastructure overhead. Thus it is essential that new entries in the Glossary follow the format of existing ones exactly.

Translation challenges

The Mediawiki Language Extension Bundle does not allow the content of a page to be rearranged in translated pages, except within individual Translation Units, which are typically single paragraphs. This creates a problem since technical terms in different languages may be alphebetisised differently, for example, DC or Direct Current in English is CD or Courant Direct in French. This means we can't simply translate the Glossary but must create a new one in each language. Thus the French glossary will be Glossaire and will have its source language set as French (Special Pages - Page Tools - Change the language of a page).

A useful facility within the Transate extension is Special:MyLanguage/. If this is prefixed to a wiki link and your current language setting is different from the source language of the link destination, the link will take you to a translation of the page into your language, of one exists. However, a major disadvantage is that this breaks both popups and transclusion. A bug report on Mediawiki covering this has been open for several years, but with no immediate prospect of it being fixed we must unfortuately avoid using this feature until it is. In the meantime, a script has been written which lists all links to source language pages in translated pages where there exists a translation into the same language of the target page. This will be run regularly and the links updated manually. The rate of updates to the wiki is such that this should not be excessively onerous.

A further minor irritation surfaces on translating a definition. Additional tags are automatically added on preparing the page for translation and marking it for translation. Unfortunately these then appear in transcluded ot popup text. To overcome this the tags must be inserted to surround the actul definition in the source language version of a definition, in order to exclude those tags.

Definition translation worked example

Before initiating the translation of a glossary definition page it is highly recommended that the definition be braketed by the <onlyinclude></onlyinclude> tags. (You can add them later if you forget but meanwhile the tags inserted by the translation process will be visible in transcluded and popup text.)

Note that these tags should not be on separate lines but should be on the same line(s) as the start and end of the definition itself, e.g.

<onlyinclude>Electricity: tamed magic... well, mostly tamed.</onlyinclude>

otherwise surplus blank lines will appear in transcluded and popup text.

You can now Prepare the page for Translation and Mark it for Translation in the normal way. The <onlyinclude></onlyinclude> tags do not need to be transcribed into the translation but will do no harm if they are.

It remains to update the definition in the local language glossary. Thus, for example:

|<span id="Electricity">Electricity</span>

in Glossaire becomes

|<span id="Electricité">Electricité</span>

In some cases (though not in this one) the item will need relocating in order to preserve alphabetic ordering.

Where there are synonymns or a definition and its abreviation are both listed, these will similarly need modification.