Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201
Difference between revisions of "Help:Prepare a page for translation" - TangoWiki

Difference between revisions of "Help:Prepare a page for translation"

From Tangowiki
Line 1: Line 1:
 
{{Expert manual TOC}}
 
{{Expert manual TOC}}
  
A page needs some preparation before it is released for translation. Generally it's a good idea to only release pages that do not experience too many changes.  
+
A page needs some preparation before it is released for translation. Generally it is a good idea to only release pages that do not experience too many changes.  
  
 
All [[Special:ListGroupRights|administrators]] can prepare a page for translation.  
 
All [[Special:ListGroupRights|administrators]] can prepare a page for translation.  
Line 22: Line 22:
 
</nowiki></code>
 
</nowiki></code>
  
View the page in edit mode and wrap translate tags around the content, i.e. add the beginning tag at the very front and the end tag at the very end. The wiki will split the text into small units that are easier to translate at once than the entire page. However, the text might not be split into units the most convenient way, so it's best to split the text by oneself.  
+
View the page in edit mode and wrap translate tags around the content, i.e. add the beginning tag at the very front and the end tag at the very end. The wiki will split the text into small units that are easier to translate at once than the entire page. However, the text might not be split into units the most convenient way, so it's best to split the text oneself.  
  
 
Manual setting of translate tags:
 
Manual setting of translate tags:
Line 29: Line 29:
 
*Leave out untranslatable content like styling code in tables, code tags (except heading code), template parameters etc.
 
*Leave out untranslatable content like styling code in tables, code tags (except heading code), template parameters etc.
 
*Translate tags cannot be nested into each other.
 
*Translate tags cannot be nested into each other.
*Take great care in setting the translate tags right. The wiki will warn you if there are any missing tags and the page cannot save.
+
*Take great care in setting the translate tags right. The wiki will warn you if there are any missing tags and the page cannot be saved.
  
To see, how text can be split into units, view this page in edit mode and watch out for the translate tags.
+
To see how text can be split into units, view this page in edit mode and watch out for the translate tags.
  
 
===Marking the page for translation===
 
===Marking the page for translation===
Once the translate tags are set and the page is saved, a link appears at the top: <code>"Mark this page for translation"</code>. When clicked, one is presented by an overview page ("PageTranslation") with the units of the text. Save the page at the bottom with <code>"Mark this version for translation"</code>. Now the page is ready for translation and will show up in the [[Special:Translate|translation interface]].
+
Once the translate tags are set and the page is saved, a link appears at the top: <code>"Mark this page for translation"</code>. When clicked, one is presented with an overview page ("PageTranslation") with the units of the text. Save the page at the bottom with <code>"Mark this version for translation"</code>. Now the page is ready for translation and will show up in the [[Special:Translate|translation interface]].
  
 
===Translation markers===
 
===Translation markers===
Line 40: Line 40:
 
<code><nowiki><!--T:1--></nowiki></code>
 
<code><nowiki><!--T:1--></nowiki></code>
  
These translation markers should never be touched manually (deleted, moved etc.), this will irritate the system.
+
These translation markers should never be touched manually (deleted, moved etc.), as this will irritate the system.
  
 
===Adding the language bar===
 
===Adding the language bar===
To have the languages bar show up on the page, one needs to add the tag <code><nowiki><languages /></nowiki></code> at the beginning (or the bottom) of the page. Once the text (or parts of it) is translated into at least one other language, the bar will show up where it was included.  
+
To have the languages bar show up on the page, the tag <code><nowiki><languages /></nowiki></code> must be added at the beginning (or the bottom) of the page. Once the text (or parts of it) is translated into at least one other language, the bar will show up where it was included.  
  
 
You do not need to add this on lyrics pages, as this is catered for with the [[Template:Infobox Lyrics|Infobox Lyrics template]] (it is included there and will show up automatically.)
 
You do not need to add this on lyrics pages, as this is catered for with the [[Template:Infobox Lyrics|Infobox Lyrics template]] (it is included there and will show up automatically.)
Line 79: Line 79:
  
 
===Add documentation===
 
===Add documentation===
It's a good idea to add documentation to the translation units for some extra information for translators. In this case, we want to include the Spanish lyrics text in the documentation, so translators have the English and Spanish version as parallel sources.
+
It is a good idea to add documentation to the translation units for some extra information for translators. In this case, we want to include the Spanish lyrics text in the documentation, so translators have the English and Spanish version as parallel sources.
  
 
Documentation is always shown, independently from the target language (you will see it, whether you translate into German or Chinese).
 
Documentation is always shown, independently from the target language (you will see it, whether you translate into German or Chinese).

Revision as of 13:06, 17 November 2014

Expert manual edit TOC
Namespaces
Maintenance
Maintenance pages
Tasks
Development board
News
Create requested pages
Translation
Prepare a page for translation
User manual

A page needs some preparation before it is released for translation. Generally it is a good idea to only release pages that do not experience too many changes.

All administrators can prepare a page for translation.

This page in short

  • Add translate tags <translate>…</translate> around the text to be translated.
  • Add the language bar with <languages /> at the beginning of the page.
  • Mark the page for translation. Mark it again, every time significant changes have been made to the source code.

Preparing a page for translation

Translate tags and translation units

Generally, translate tags are wrapped around the content to be translated:

<translate>content... </translate>

View the page in edit mode and wrap translate tags around the content, i.e. add the beginning tag at the very front and the end tag at the very end. The wiki will split the text into small units that are easier to translate at once than the entire page. However, the text might not be split into units the most convenient way, so it's best to split the text oneself.

Manual setting of translate tags:

  • Wrap translate tags around all text that needs translation.
  • Choose small units (paragraphs, headers, lists), that belong together in content.
  • Leave out untranslatable content like styling code in tables, code tags (except heading code), template parameters etc.
  • Translate tags cannot be nested into each other.
  • Take great care in setting the translate tags right. The wiki will warn you if there are any missing tags and the page cannot be saved.

To see how text can be split into units, view this page in edit mode and watch out for the translate tags.

Marking the page for translation

Once the translate tags are set and the page is saved, a link appears at the top: "Mark this page for translation". When clicked, one is presented with an overview page ("PageTranslation") with the units of the text. Save the page at the bottom with "Mark this version for translation". Now the page is ready for translation and will show up in the translation interface.

Translation markers

Back in the code (edit mode) on the page one can see that the wiki added certain translation markers for the translation units: <!--T:1-->

These translation markers should never be touched manually (deleted, moved etc.), as this will irritate the system.

Adding the language bar

To have the languages bar show up on the page, the tag <languages /> must be added at the beginning (or the bottom) of the page. Once the text (or parts of it) is translated into at least one other language, the bar will show up where it was included.

You do not need to add this on lyrics pages, as this is catered for with the Infobox Lyrics template (it is included there and will show up automatically.)

Changes to a page after translation

If the text on a page is edited, the translation markers should always stay intact. If a paragraph is moved or deleted, the translate tags and translation markers should be moved or deleted with it. Do not move translation markers alone, this way the wiki won't recognize the right units anymore. Changes to the text within the translation tags (units) can be easily done. Newly added text needs new translation tags (but no translation markers!), to be included into translation.

Once changes to a page are made, the text "Translate this page" on the original (English) version will expand to "Translate this page; This page has changes since it was last marked for translation.". This page needs then new marking for translation like in the step above: Follow the link and mark the page anew. Now affected translation units will show up as "Outdated" and translators will have a chance to update the translation.

Example: A sentence is added to a paragraph. Once the page is marked again for translation, the paragraph will show up as "Outdated" in the translation interface. Translators can then check the paragraph and add the missing sentence to the paragraph in the translation.

Special case: Preparing a lyrics page for translation

All lyrics pages should have the Spanish and English lyrics text on the original page. Only release pages that have the English translation included already. The translation is done as usual from the English text, but the Spanish text shall be included into the documentation, so translators always have the original text at hand. This way, a two-way translation Spanish – English – 3rd language shall be minimized. (Of course, in this case a translator would have to have knowledge in both languages to make use of this help feature).

For this example we use the page Charlemos.

Tag the page

  1. Edit the lyrics page.
  2. Add translate tags around the following text: (Do not wrap around the template parameters, instead around the values AFTER the equal sign "=".)
    1. the English title (i.e. "Let*s talk" – not "English title")
    2. the summary (if there is one)
    3. the source translation value (|Source translation = <translate>….</translate>)
    4. the English lyrics text. Add the tags in the English lyrics text not in the whole, instead in portions, so it will be easier to translate.
    5. around the whole Weblinks part, if there are any weblinks.
    6. Around anything in the free text, if it needs translation.
  3. Add <languages /> at the end of the page. This is very important. Otherwise, translations won't be shown and therefore not be accessible from the page.
  4. Save the page.

Mark the page

If everything worked well, you should see a link at the top of the page saying "Mark this page for translation". Click the link. You will be directed to "PageTranslation".

Control the translate packages. Save the page at the bottom with "Mark this version for translation".

Now you can translate the page.

Add documentation

It is a good idea to add documentation to the translation units for some extra information for translators. In this case, we want to include the Spanish lyrics text in the documentation, so translators have the English and Spanish version as parallel sources.

Documentation is always shown, independently from the target language (you will see it, whether you translate into German or Chinese).

  1. Move over to the translation page.
  2. Add the original Spanish text in the correct portions to the documentation of the translation units: Click on "Add documentation" and copy the corresponding Spanish text (to the English parts) into the documentation field. Add line breaks (hit enter) between lines for better reading. Save documentation with "Save documentation".

Do NOT save the translation (without adding content it should not be possible). Only move to next, with a mouse click or "Skip to next".

See also