Palia Wiki:Translation portal/Editors

From Palia Wiki
Jump to navigation Jump to search


A picture is worth a thousand words! A gallery of examples on how to tag a page can be found here: Translation portal/Gallery

Translation Tags

To mark a section of text as needing to be translated, simply make use of the ‎<translate>...‎</translate> tags. Translate tags are used to designate exactly which text should be translated.

For example: ‎<translate>Some kind of information might go here‎</translate>

Translation Comments

Translation Comments are automatically added by FuzzyBot after a page has been reviewed by an administrator.

They will appear in the editor as HTML comments like so:

<!--T:1-->
<!--T:2-->
<!--T:3-->
<!--T:4-->

The numbers in these comments represent the translation number for the set of tags (usually the order the tag was created in).

  • Do not add these tags manually. Doing so will prevent the section from being translated properly.
  • Do not remove these tags. Deleting the comment will remove the associated translation!
  • Do not modify these tags. The number within the comment links to a page where translations are stored.

The number T:4 is used by FuzzyBot when generating the translated version of pages to know what content to replace.

Translation Variables

To maintain continuity of complex formulas between translations of an article, the ‎<tvar>...‎</tvar> (Translation Variable) tag can be used.

For example: ‎<tvar name=1>{{Template|With|Complex|Parameters}}‎</tvar>

Important: tvar must be placed between a pair of translate tags.

Note 1: Any name can be used for the Translation Variable. The name used by the variable will be the name that the Translator sees and uses in the translation.
Editor ==> Translator
‎<tvar name=example> ==> $example
‎<tvar name=data> ==> $data
‎<tvar name=1> ==> $1
‎<tvar name=2> ==> $2
Note 2: Variable names are per Translate Tag, not per page, so two different pairs of translate tags can each have a Translation Variable $1. It's simplest to name the variables consecutively (Eg. 1, 2, 3, 4...), however additional context can sometimes be useful.

Commonly Used Translations

To minimize the amount of repetitive words that need translating, the {{Heading}} Template provides a number of commonly used translations for page headers. See the template documentation for a list of commonly used headers, and use this template wherever possible instead of a set of Translate Tags.

== <translate>General</translate> ===
== <translate>Notes</translate> ===
== <translate>Gallery</translate> ===
== {{Heading|General}} ==
== {{Heading|Notes}} ==
== {{Heading|Gallery}} ==

Localized Links

By default page links are not automatically translated and may result in ugly links.

For example: [[Villagers]] would become [[Villagers/de]] on a German page.

The {{LocalizedLink}} template (Or {{LL}} for short) may be used instead. This template reads and displays the translated page name.

For example: {{LL|Villagers}} will read the translated title from the localized language translation of the page and output it.
Villagers is displaying in the current language, right?

Using Templates

A lot of Templates are designed to handle any translations within the template themselves. {{NPC}}, {{Skill}}, {{Item}}, {{Quest}} and some other templates will automatically fetch the translated title from the page given in the template. You can just use ‎<tvar name=1>{{Item|Cantankerous Koi}}‎</tvar> and not have to worry about making translators type the translation of Cantankerous Koi on every page that references it.

Magic Words

Please try to avoid using magic words (like {{PAGENAME}}) in content pages, unless you are using them in Templates for things like checking expressions. Magic words make things difficult for translations. While it is annoying to type Eshe or Cantankerous Koi 12 times, magic words either require special treatment from translators or end being something like Eshe/it on translated pages. That doesn't really roll off the tongue!

If it's necessary to use a {{PAGENAME}} use one of these instead:

  • {{UntranslatedPagename}} (Which would print Cantankerous Koi on the Cantankerous Koi/it page) or
  • {{TranslatedPagename}} (Which will print the translated page name if it is available, or the /it instead. ie: Cantankerous Koi/it)

Reminder: writing out the page's name is still the preferred method.

Languages

If you are working on a template that needs to check the pages language, or need to show the language that a page is in you can use the {{PAGELANGUAGE}} magic word. This magic word will output the pages language code (eg; "en", "fr", "de", "it", etc).

It can be used in conjuction with the {{#language:}} module.

Markup Output Description
{{#language:{{PAGELANGUAGE}}}} English Outputs the current pages language in the current pages language.
{{#language:{{PAGELANGUAGE}}|it}} inglese Outputs English in Italian.
{{#language:it|{{PAGELANGUAGE}}}} Italian Outputs Italian in English.

Categories

In order for Translated pages to be categorized properly, {{#translation:}} should be added to the pages categories, like so:

[[Category:Materials{{#translation:}}]]
[[Category:Furniture{{#translation:}}]]
[[Category:Templates{{#translation:}}]]

Adding this tag to the category will ensure that the main page is still tagged as normal (eg; Category:Materials, Category:Furniture, Category:Templates), while translated pages are categorized as follows:

Category:Materials/fr
Category:Materials/de
Category:Furniture/fr
Category:Furniture/de
Category:Templates/fr
Category:Templates/de

Category Template

It may also be easier (and look nicer) to use the {{Category}} template. Instead of using category link tags, the template will format the category links with {{#translation:}} for you:

{{Category
 |Materials
 |Furniture
 |Templates
}}

Just as the previous example, the page will be added to Category:Materials, Category:Furniture, and Category:Templates.