Translation: Διαφορά μεταξύ των αναθεωρήσεων

Από Digital Cyprus
Μετάβαση στην πλοήγηση Πήδηση στην αναζήτηση
μΧωρίς σύνοψη επεξεργασίας
(Added troubleshooting and tips sections)
 
(6 ενδιάμεσες αναθεωρήσεις από τον ίδιο χρήστη δεν εμφανίζεται)
Γραμμή 8: Γραμμή 8:
* '''<translation>''' : This tag tells what part of the text can be translated.  
* '''<translation>''' : This tag tells what part of the text can be translated.  
* '''<translation/>''' : Closes the previously opened '''translation''' tag.  
* '''<translation/>''' : Closes the previously opened '''translation''' tag.  
* '''<nowiki><!--T:N--></nowiki>''' : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages.
* '''<nowiki><!--T:N--></nowiki>''' : This tag is used to segment the text. Segmenting the text is very useful to translate very large pages. The '''<nowiki/>'N'''' represents an incrementing unique identifier that allows the translation extension en differentiate the parts of the text.


===Example===
===Example===
The following example represents a very simple page :
The following example represents a very simple page :
----<nowiki><languages/></nowiki>


<div id=example_page></nowiki><nowiki><languages/>
<nowiki><translation></nowiki>


<nowiki><translation></nowiki>
<nowiki><!--T:1--></nowiki>
<nowiki><!--T:1--></nowiki>
First paragraph.
First paragraph.


<nowiki><!--T:2--></nowiki>
<nowiki><!--T:2--></nowiki>
Second paragraph.
Second paragraph.


<nowiki><!--T:3--></nowiki>
<nowiki><!--T:3--></nowiki>
Third paragraph.
Third paragraph.


<nowiki></translation></nowiki>
</translation>


<nowiki><!--T:4--></nowiki>


<!--T:3-->
Another paragraph.
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 ==
[[Αρχείο:Add translation 0.png|εναλλ.=This image shows the link to add translation to pages.|μικρογραφία|418x418εσ]]
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''".


</div>
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.
<style>
[[Αρχείο:Add translation 1.png|μικρογραφία]]
#example_page {
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 :
margin_right=20px;
background_color=red;
}
</style>




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.
Then we choose which part of the text needs translation. Those part are distinguished by the <nowiki><!--T:N--></nowiki> 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 <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

This image shows the link to add translation to pages.

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.

Add translation 1.png

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

  1. 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.
  2. 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.
  3. 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

  1. 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).
  2. 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.
  3. 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.