Translation: Διαφορά μεταξύ των αναθεωρήσεων
μ (N uid tag) |
(Added troubleshooting and tips sections) |
||
Γραμμή 55: | Γραμμή 55: | ||
In this way, other editors can easily track, add and change translations. | In this way, other editors can easily track, add and change translations. | ||
=== Troubleshooting === | |||
# If you mark a page for translation and immediately go to the special page and try to import translations, you may get an error message like "Page <page-name>/<language-name> does not contain old translations.". This is because FuzzyBot didn't fuzzy the messages on the old page yet: the tool won't find an edit by FuzzyBot on the translation page. In this case, simply wait for FuzzyBot to do its job. Once an edit is seen, you can proceed with the imports. | |||
# Please wait for some time after pressing the "Save" button. While the button background remains gray, there is an ongoing process of importing non-empty units. Once the button becomes colored again, the import is completed. | |||
# Within the translation system, you can mark an existing translation as outdated by adding <code>!!FUZZY!!</code> at the start of the translation unit's translated message box. | |||
=== Tips === | |||
# Migration will be easier if you first (before the mark to translation) check whether existing translations are similar to the original English text, and manually edit the structure of pages: break paragraphs and lists, add the missing headings (even if empty). | |||
# Will be useful to check the result in the core translation interface - some of the units may be immediately marked as obsolete because of errors markup or if not all of the translation variables was added. | |||
# Translation of the page title will have to be added manually. If you do not know very well the language of the imported page, you can try to find the translation of the page title among the "links here" or sometimes in redirects. |
Τελευταία αναθεώρηση της 12:03, 22 Ιανουαρίου 2024
Introduction
MediaWiki's translation extension allows users to add translations to pages. This page will cover step by step, how to make a page translatable and how to add translations to the existing page.
How to make a page translatable
By default, newly created pages are not translatable. For these pages to accept translations, we need to add specials HTML tags inside the page :
- <languages/> : This tag is placed on the first line of the page and tells MediaWiki that this page can be translated.
- <translation> : This tag tells what part of the text can be translated.
- <translation/> : Closes the previously opened translation tag.
- <!--T:N--> : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages. The 'N' represents an incrementing unique identifier that allows the translation extension en differentiate the parts of the text.
Example
The following example represents a very simple page :
<languages/>
<translation>
<!--T:1-->
First paragraph.
<!--T:2-->
Second paragraph.
<!--T:3-->
Third paragraph.
</translation>
<!--T:4-->
Another paragraph.
In the following text, paragraphs are segmented in three parts. Each segment can be translated because they are inside a <translation> tag. However, the last paragrah cannot be translated.
When changes are saved, it will be possible to make the page translatable by clicking on the link "Make this page translatable" at the bottom of the page.
Add translations to a page
As soon as the page is marked as translatable, the following link shown on the picture appear on top of the page. To add a translation, click on "Translate this page".
This link leads us to the translation page, where we can select in which language and which part of the text we want to translate.
At first, we need to select in which language we want to translate the page, the following figure shows the selector present on top of the page :
Then we choose which part of the text needs translation. Those part are distinguished by the <!--T:N--> tags.
We just have to click on one part, write our translation in the desired language, and save.
In this way, other editors can easily track, add and change translations.
Troubleshooting
- If you mark a page for translation and immediately go to the special page and try to import translations, you may get an error message like "Page <page-name>/<language-name> does not contain old translations.". This is because FuzzyBot didn't fuzzy the messages on the old page yet: the tool won't find an edit by FuzzyBot on the translation page. In this case, simply wait for FuzzyBot to do its job. Once an edit is seen, you can proceed with the imports.
- Please wait for some time after pressing the "Save" button. While the button background remains gray, there is an ongoing process of importing non-empty units. Once the button becomes colored again, the import is completed.
- Within the translation system, you can mark an existing translation as outdated by adding
!!FUZZY!!
at the start of the translation unit's translated message box.
Tips
- Migration will be easier if you first (before the mark to translation) check whether existing translations are similar to the original English text, and manually edit the structure of pages: break paragraphs and lists, add the missing headings (even if empty).
- Will be useful to check the result in the core translation interface - some of the units may be immediately marked as obsolete because of errors markup or if not all of the translation variables was added.
- Translation of the page title will have to be added manually. If you do not know very well the language of the imported page, you can try to find the translation of the page title among the "links here" or sometimes in redirects.