Template:Translation/ru/doc: Difference between revisions

From PZwiki
(documentation)
 
(Update to the new version)
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>{{Translate}}
<noinclude>{{Documentation subpage}}</noinclude>{{Translate}}
The {{tlx|Translation}} template is used to create a list of English and the non-English equivalent, for use in templates for automatic translation.  
The {{tlx|Translation}} template is used to maintain a list of English and the non-English equivalent for item names and common words, for use in templates and to translate elements of pages automatically. Each language subpage is a user-editable database containing English words and the non-English equivalents.
 
Using the database helps in maintaining the same translations uniformly and easy changes in case something changes in the game update, so adding a word there and using proper template is preferred to translating the words directly.
 
==Database format==
The entries are stored in the <code>| English word | english word = Translated word</code> with each pipe being equivalent to translate (for example different casing of the word).
 
HTML comments in the format of  <code><nowiki><</nowiki>!-- Comment --></code> can be stored to aid categorization and finding certain words. These are not included anywhere, but can be translated to help finding proper words for other translators.  


==Usage==
==Usage==
This template is one of 3 templates used for translating.  
When incorporating to a page, one of the 3 templates should be used, depending on the situation. Using wrong one can lead to extra work being done in wiki, preventing showing certain pages in extreme cases.


#{{tlx|Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).  
#{{tlx|Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).
#{{tlx|T}} Should be used where a link is required. It will automatically get the translated word from the list in {{tlx|Translation}}.  
#{{tlx|T}} Should be used where a link is required. It will automatically get the translated word from the list in {{tlx|Translation}}.
#{{tlx|Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.  
#{{tlx|Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.


===Examples===
===Examples===
{{tlx|Translation|Hammer}}
{{tlx|Translation|Language}}
;Produces:
;Produces:
{{Translation|Hammer}}
{{Translation|Language}}
 
(Which will show the translated word, if it's in the database).


==How to add entries==
==How to add entries==
===Getting started===
===Getting started===
#Make sure you're on the correct Template page and not the Documentation subpage ([[Template:Translation{{Subpage}}|if on the wrong page, this will be a link]]).
#Make sure you're on the correct page – a template and not the documentation subpage ([[Template:Translation{{Subpage}}|this will be a link if you're on the wrong page]]).
#Click the '''Edit''' button at the very top, not the one next to Template documentation. Or click <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} here]</span> to edit current page.
#Click the '''Edit''' button at the very top, not the one next to Template documentation. Or click <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} here]</span> to edit current page.
===Making the edits===
===Making the edits===
#Once in the edit screen, you'll see a list of entries that look like: <code>| Hammer = {{Translation|Hammer}}</code>
#Once in the edit screen, you'll see a list of entries that look like: <code>| Language = {{Translation|Language}}</code>
#Check to see if there is a category for the word(s) you want to add, such as <code><nowiki><</nowiki>!-- Food --></code>, or add a new one.
#Check to see if there is a category for the word(s) you want to add, such as <code><nowiki><</nowiki>!-- Other --></code>, or add a new one.
#Add your word(s) in the following format (each entry should be on a new line separated by a pipe <code>|</code>): <code>| Hammer = {{Translation|Hammer}}</code>
#Add your word(s) in the following format (each entry should be on a new line separated by a pipe <code>|</code>): <code>| Language = {{Translation|Language}}</code>


==See also==
==See also==
*[[Template:T]]
*[[Template:T]]
*[[Template:Subpage]]
*[[Template:Subpage]]

Revision as of 19:20, 4 June 2023

Notebook.png
This is a documentation subpage for Template:Translation/ru.
It contains usage information and other content that is not part of the original template page.
Translation icon.png
This template needs to be translated.
Editors are encouraged to translate this page to the best of their ability.

The {{Translation}} template is used to maintain a list of English and the non-English equivalent for item names and common words, for use in templates and to translate elements of pages automatically. Each language subpage is a user-editable database containing English words and the non-English equivalents.

Using the database helps in maintaining the same translations uniformly and easy changes in case something changes in the game update, so adding a word there and using proper template is preferred to translating the words directly.

Database format

The entries are stored in the | English word | english word = Translated word with each pipe being equivalent to translate (for example different casing of the word).

HTML comments in the format of <!-- Comment --> can be stored to aid categorization and finding certain words. These are not included anywhere, but can be translated to help finding proper words for other translators.

Usage

When incorporating to a page, one of the 3 templates should be used, depending on the situation. Using wrong one can lead to extra work being done in wiki, preventing showing certain pages in extreme cases.

  1. {{Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).
  2. {{T}} Should be used where a link is required. It will automatically get the translated word from the list in {{Translation}}.
  3. {{Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.

Examples

{{Translation|Language}}

Produces

Language

(Which will show the translated word, if it's in the database).

How to add entries

Getting started

  1. Make sure you're on the correct page – a template and not the documentation subpage (this will be a link if you're on the wrong page).
  2. Click the Edit button at the very top, not the one next to Template documentation. Or click here to edit current page.

Making the edits

  1. Once in the edit screen, you'll see a list of entries that look like: | Language = Language
  2. Check to see if there is a category for the word(s) you want to add, such as <!-- Other -->, or add a new one.
  3. Add your word(s) in the following format (each entry should be on a new line separated by a pipe |): | Language = Language

See also