User:Claus chr/Translation: Difference between revisions

From KDE UserBase Wiki
No edit summary
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
In these pages we use a number of templates. You saw one example in the info box above. It was entered this way:
In these pages we use a number of templates. You saw one example in the info box above. It was entered this way:


{{Input|1=<nowiki>{{{Info|1=This is just an example of template usage}}</nowiki>}}
{{Input|1=<nowiki>{{Info|1=This is just an example of template usage}}</nowiki>}}


The content between "1=" and <nowiki>"}}"</nowiki> is simply translated like any other text. However, some templates (like the one above) also contain text as part of the template itself. To translate that you have to do the following:
The content between "1=" and <nowiki>"}}"</nowiki> is simply translated like any other text. However, some templates (like the one above) also contain text as part of the template itself. To translate that you have to do the following:
Line 13: Line 13:
# Find the definition of the original template. This can be done as follows
# Find the definition of the original template. This can be done as follows
## Go to the English version of the page you are translating
## Go to the English version of the page you are translating
## Open it for editing (click the pencil icon om the top right of the page)
## Open it for editing (click the edit button on the top right of the page)
## Move below the buttons under the editing field. There you'll see a list of templates used in this page
## Move below the buttons under the editing field. There you'll see a list of templates used in this page
## Find the template in question and click the edit link (in paranthesis - the link text may be translated)
## Find the template in question and click the edit link (in paranthesis - the link text may be translated)
# Copy the content of the original template into the translation of the template
# Copy the content of the original template into the translation of the template
# Translate the text. You may also want to change <nowiki>[[Category:Template]]</nowiki> into <nowiki>[[Category:Template/lg]]
# Translate the text. You should also change <nowiki>[[Category:Template]]</nowiki> to <nowiki>[[Category:Template/lg]]
</nowiki>
</nowiki>
# Save the translated template and close the editing boxes of the original template and the original page without saving!
# Save the translated template and close the editing boxes of the original template and the original page without saving!

Latest revision as of 11:47, 9 August 2012

Translating templates

Information

This is just an example of template usage


In these pages we use a number of templates. You saw one example in the info box above. It was entered this way:

{{Info|1=This is just an example of template usage}}

The content between "1=" and "}}" is simply translated like any other text. However, some templates (like the one above) also contain text as part of the template itself. To translate that you have to do the following:

  1. Add your language code (lg in this example) to the name of the template like this
    {{Note/lg|...}}
  2. When you save the translation, a red link will appear instead of the template. Click that to start editing the translated template.
  3. Find the definition of the original template. This can be done as follows
    1. Go to the English version of the page you are translating
    2. Open it for editing (click the edit button on the top right of the page)
    3. Move below the buttons under the editing field. There you'll see a list of templates used in this page
    4. Find the template in question and click the edit link (in paranthesis - the link text may be translated)
  4. Copy the content of the original template into the translation of the template
  5. Translate the text. You should also change [[Category:Template]] to [[Category:Template/lg]]
  6. Save the translated template and close the editing boxes of the original template and the original page without saving!

Translated units are marked as fuzzy

Sometimes it may happen that you have translated a page, but the translation is marked as incomplete. Certain errors in the markup of the original page can cause this. The most common type of error is the appearance of unbalanced brackets or parentheses. The translation system requires that alle opening brackets ('[', '{' or '(' ) have a matching closing bracket (']', '}' or ')' ) in the same translation unit, otherwise the translation is considered incomplete.

The same rule is not enforced by the wiki software, so it is easy for writers to miss those mistakes. If a bracket characte is simply missing, just add it. However, sometimes the bracketed content extends over more than one translation unit, so that the matching closing bracket is in later unit. In this case you need to balance brackets in both units, but you can't simply add bracket characters without changing the meaning or formatting, so you must must comment out the added bracket character, like this

{{Info|1=Beginning of long info box... <!--}}-->

and in a later unit

<!--{{--> ...end of long info box}}

If the offending bracket is part of a smiley, you can replace it with an emoticon icon. For the standard smiley, :-), you can use the template {{Smiley}}

Please also correct the original page so other translators won't have the same problem, or leave a message on the discussion page.