User

Sahadeva/translation notes: Difference between revisions

(Created page with "*see also: [http://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration Page translation administration] === Tagging === *Anyone can mark the '''tr...")
 
No edit summary
Line 14: Line 14:
=== Marking ===
=== Marking ===
*After the tagging, a '''translation administrator''' marks the page for translation
*After the tagging, a '''translation administrator''' marks the page for translation
*The system will update the translatable page source by adding unit markes (<nowiki><!--T:#--></nowiki>) for each translation unit.


==== Unit markers ====
*Never add unit markers yourself.
*Markers are always on the line before the unit; or, if it starts with a header, after the first header on the same line.
Example:
<nowiki>
<translate>
== Birds == <!--T:1-->
Birds are animals which....
<!--T:2-->
Birds can fly and...
</translate></nowiki>
==== Deleting whole Units ====
*If you delete whole units, also remove the unit marker.
==== Moving units ====
*You can move units around without invalidating translations: just move the unit marker together with the rest of the unit.




== Advanced ==
== Advanced ==


'''Variables'''
=== Variables ===
*Syntax is '''<nowiki><tvar|name>contents</></nowiki>'''. For translators these will show up only as $name, and in translation pages will automatically be replaced by the value defined in the translatable page (so they are global "constants" across all its translation pages). Variables can be used to hide untranslatable content in the middle of a translation unit. It also works for things like numbers that need to be updated often. You can update the number in all translations by changing the number in the translatable page source and re-marking the page. You do not need to invalidate translations, because the number is not part of the translation unit pages. Example:
*Syntax is '''<nowiki><tvar|name>contents</></nowiki>'''. For translators these will show up only as $name, and in translation pages will automatically be replaced by the value defined in the translatable page (so they are global "constants" across all its translation pages). Variables can be used to hide untranslatable content in the middle of a translation unit. It also works for things like numbers that need to be updated often. You can update the number in all translations by changing the number in the translatable page source and re-marking the page. You do not need to invalidate translations, because the number is not part of the translation unit pages. Example:


Line 28: Line 48:


*May be interesting: [http://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector Universal Language Selector]
*May be interesting: [http://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector Universal Language Selector]
=== Also need to understand ===
*Categories
*Messaging
notes:
*Make all editors translators
== Translating ==
===How to ===
# Go to Special:Translate
# Click the name of any message group that has untranslated messages. (Each translatable page is a message group, but there can be other kinds of message groups too.)
# Choose a language other than the language of the source text (which usually is English or en).

Revision as of 14:39, 18 October 2014

Tagging

  • Anyone can mark the translatable parts by wrapping them inside <translate>...</translate> tags;
  • Add <languages /> to produce a list of all translations of the page;
  • The translatable page will be listed on Special:PageTranslation as ready for marking.

Tag placing

  • If possible, try to put the tags on their own lines, with no empty lines between the content and the tags.
  • If not possible, do like this for example:
{{Template|<translate>Some localised parameter</translate>}}

Marking

  • After the tagging, a translation administrator marks the page for translation
  • The system will update the translatable page source by adding unit markes (<!--T:#-->) for each translation unit.

Unit markers

  • Never add unit markers yourself.
  • Markers are always on the line before the unit; or, if it starts with a header, after the first header on the same line.

Example:

 <translate>
 == Birds == <!--T:1-->
 Birds are animals which....
 
 <!--T:2-->
 Birds can fly and...
 </translate>

Deleting whole Units

  • If you delete whole units, also remove the unit marker.

Moving units

  • You can move units around without invalidating translations: just move the unit marker together with the rest of the unit.


Advanced

Variables

  • Syntax is <tvar|name>contents</>. For translators these will show up only as $name, and in translation pages will automatically be replaced by the value defined in the translatable page (so they are global "constants" across all its translation pages). Variables can be used to hide untranslatable content in the middle of a translation unit. It also works for things like numbers that need to be updated often. You can update the number in all translations by changing the number in the translatable page source and re-marking the page. You do not need to invalidate translations, because the number is not part of the translation unit pages. Example:
 <translate>
 Income this month <code><tvar|income>{{FORMATNUM:3567800}}</></code> EUR
 </translate>

Also need to understand

  • Categories
  • Messaging

notes:

  • Make all editors translators


Translating

How to

  1. Go to Special:Translate
  2. Click the name of any message group that has untranslated messages. (Each translatable page is a message group, but there can be other kinds of message groups too.)
  3. Choose a language other than the language of the source text (which usually is English or en).