How to translate/en

Thank you for joining the translators!

This page will explain the translation process in the wiki. If you want to contribute to the wiki translation, you are in the good place! Here are informations about translation and on current good practices in.

Translation basics
On a page is completed, it is marked for translation. To translate a page, just click on the "Translate this page" button at the top of the page, select a language, and voilà! You can begin the translation.

Translatable pages are divided in translation units, called "messages". Each unit is independent of the others. This makes it possible to translate the text step by step, and also makes it easier to monitor the translation.

Once a language for translation is validated, a new page is created, with a new link named Page_name/language_code. For example, Mane Page is the source page; "fr" is the language code for French and the link for the French translation of that page is Mane Page/fr; for German, language code is "de" and Mane Page/de for the page; etc.

On the (English) source page, the new available language for this page appears in the language banner.

You can return to the translation at any time. The percentage of unit translation is displayed at top of translated page, and by colored squares on the language banner. Note that translations need few minutes to be taken into account, don't panic if you don't immediately see your tranlation, just come back later.

You can put some documentations for messages.

If the source page have been modified since your first translation, the modified text will be highlighted in red. In this case, the outdated messages will be notified by a small yellow clock icon, and available in the "Outdated" tab in the translation menu.

If a complete page is not yet available to translation, this is probably because the translation administrators has not yet validated the complete page (see admininistrators section below). If a page has just been marked for translation, it might be some times to be available to translation.

Here is an example for translators on MediaWiki.

Good practices
Here are detailed the good practices about translation in this wiki. If you have doubt, feel free to contact a translation administrator on the TMQ Discord.

Categories
All category pages -- including their title -- are translatable.

Categories used to describe a page have the form  where category_name is the name of the category. They are normally not included in translation units. This code generates a link that redirects automatically to the translated category page for the current language. The category will then be displayed as Category_name/language_code -- category names are not translatable for now -- in the category side banner of the page. Note that if that link appears in red in translated pages, it means that the category page has not yet been translated in that language. In this case, please translate the category page from English rather than create a new page from the the categorized page.

When a category is called in a page, its displayed name can be translated with, where category_name is the name of the category and translated_category_name its translated name.

Internal links
Internal links should be on the form  where page_name is the name of the called page and displayed_text the text displayed for this link. Only the text in displayed_text is translatable. This form allows redirection to the translated version -- if exists, else to the source page in English -- of the called page in the language of the user interface.

It is also possible to use the |PageRedirect template rather than the tag Special:MyLanguage (see administrator section).

Files & Images
Files and images may contain text that can be translated. The corresponding code is  where image_name is the name of the image in the wiki, inluding its extension, and caption the text that described this image. During translation, you can either change the file and replace it by a translated one (for that, change the part  by the name of the new file, see how to upload files in Contributor Guidelines), or keep the same file and precise the file language in the caption if it is relevant.

The Main Menu screenshot in overview table do not have to be translated, because it is the layout that is important. Except if the layout is really different between regions, then the screenshot can be changed, but it remains exceptional.

Be careful! Upload a translated file as a new file, and don't modify the original file! In the caption of the translated file, precise this is a translation of which file, with a link to the original file. Example: French Horse Game Flowchart.

Fixed terms
Sometimes, a word or a number may be preceded by a dollar (e.g.  or  ) with no apparent connection to the text. These dollar-term allows to lock the corresponding text in the source page and avoid translation. For example, the dollar-term may contain a link or a number that does not differ between languages. These variables are shown by the tag  in source page code.

Others
Element between arrows  and   are named tags and are part of the wikicode. They have to be written as is in the translation to keep the same format as the source page. The same applies to brackets  and double brackets.

Translation tracking
All editable pages are translatable, even template or category pages.

All pages that are marked for translation can be viewed here.

Translation state of messages can be viewed in the special page of language stats by selecting the corresponding language code.

This special page shows the current active languages in the wiki, and the main contributors for each one.

Translation administrators
Translation administrators verify and mark complete pages for translation. They add translation tags in source page code around the elements to be translated (with tags ). Translation tags can be used in several places, to allow translation of only relevant elements (for example, translate text in table cells or image caption rather than reproduce all the wikicode for translators).

They also add the language banner (with tag ), and verify that the wikicode is correct to allow an optimal translation. For example, correctly separation of titles from paragraph, good writing of categories and internal links, etc.

After being marked for translation, a page is immediately available for translation, but need few minutes to take account modifications in the translated pages (passage of the translation bot FuzzyBot), especially if a page have been already translated and then marked again for tranlation.

Translation units or messages
Each tanslation unit, called message, is indicated by tag  (where x is a number). This tag is placed automatically by a bot, don't add one by yourself. However, this tag can be moved or deleted.

Be careful! If a translation tag  is removed, its corresponding message will be also removed, even if there are existing corresponding translations!

Categories
Category pages are translatable.

Categories are written as  where category_name is the name of the category. They are normally not included in translation units. This code generates a link that redirects automatically to a translated category page, in which the translated page is tagged. So source pages tagged in a category will have their translated pages tagged only in the corresponding translated version of the category. For example, the source page How to translate is tagged in Wiki User Guide category, while its French version is tagged in Category:Wiki User Guide/fr which is the translated category page.

If a link to a category is red in translated pages, it means that the corresponding category page as not yet been translated. In this case, translate the English category page rather than create a new link from the categorized translated page.

Internal links
Wiki internal links have to be written as  where page_name is the name of the called page and displayed_text the text displayed for this link. The tag Special:MyLanguage automatically redirects to the page page_name in the user interface language if the translated version exists, otherwise on the source page in English. For example, this link redirects to this page into your user interface language, rather than the source page in English or the page translated into French.

Page internal links have the form  where key indicates where the link should lead in the page and displayed_text the text diplayed for this link. The key is created by using tags  to the place on the page the link should go. The created link redirects automatically in the same page with the same language. For example this link redirects to the translation administrators section of this page.

It is also possible to use the |PageRedirect template rather than the tag Special:MyLanguage. Instead of redirect to the language of user interface, it will redirect to the language of the current page (if the target page in that language exists, else in English). Use it with the code below: |displayed_text where  is the name of the target page for the link and   the displayed text. For category page, please put the colon just before the template or it will not work.

For example, |Mane Page gives a link to the main page, whereas |Category:Genre redirects to the "Genre" category. The corresponding codes are: |Mane Page |Category:Genre

Files & Images
Files and images may contain some text that can be translated. If it is relevant to you, you can either:
 * allow the modification of the file name to put another file which is the translated form of the original file;
 * or lock the translation of the file and only allow the translation of the caption by using tags  around the file name   (see this section), or keep the file name outside the   tags.



Fixed terms
It is possible to avoid the translation of a specific element. For this, simply use tags  where zzzz is the content and xxx the key. The content will be displayed in the same way in all pages (source and translated ones) while only $xxx will be displayed for translators. This can be used to lock numbers, external links, link names or category names for example.

Templates
Templates can also be translated as a normal page. For this, used translation tags inside the template page.

Be careful. For template that already be marked to translation, the template HAVE to be marked again for translation so that modifications are taken into account in all pages, even not in translated ones.

In other pages, the translated version of the template will automatically be displayed in the translated page, with the corresponding language - if exists, otherwise it will be the template original version in English. For that, simply keep the template code  - where template_name is the name of the template - outside of the translation tags. However, if there is text in the template parameters that need to be translated, it is possible to put the translation tag around the text and inside the parameters. For example, the following code gives:

To generate the correct link depending on the language in navigation template, please use the PageRedirect template.

Magic words
Magic words return a specific value:
 * gives the site name - here 
 * returns either the source language code for untranslated units or the target language code for translated units - here en
 * returns either the source language for untranslated units or the target language for translated units - here 

More informations about magic words for translation on MediaWiki.

Help
If you want to learn more about translation management, please read MediaWiki Helps:
 * Translation tutorial
 * Tutorial for translation administrators
 * Translation best practices
 * Complete guide for translation administrators
 * or just ask for help on TMQ Discord.

Any questions?
If you have any questions on the meaning of a sentence, feel free to create a talk for the translated page. More generally, if you have any questions about translation process or sentence meaning, you can contact members on TMQ Discord.

You can also use this test page as a sandbox to test wiki functions and translations.