Template:Translation projects: Difference between revisions
m ({{language info}} en=?) |
(Moved displaytitle code to {{common}} because this template is no longer called on all pages.) |
||
Line 15: | Line 15: | ||
--></indicator><!-- |
--></indicator><!-- |
||
// displaytitle preparation |
// displaytitle preparation, for {{common}} |
||
-->{{#ifeq:{{NAMESPACENUMBER}}|0|<!-- |
-->{{#ifeq:{{NAMESPACENUMBER}}|0|<!-- |
||
-->{{#vardefine: |
-->{{#vardefine:__global__trp_displaytitle|{{{displaytitle|{{tr|{{BASEPAGENAME}}}}}}}}}<!-- |
||
-->{{#vardefine: |
-->{{#vardefine:__global__trp_displaytitle_suffix| {{note|small=y|({{FULLPAGENAME}})}}}}<!-- not using {{note|paren=y}} because we want to force English parentheses |
||
-->}}<!-- |
-->}}<!-- |
||
Line 25: | Line 25: | ||
-->}}<!-- end of if |
-->}}<!-- end of if |
||
// displaytitle |
|||
-->{{#if:{{#var:__global__is_italic_title}}|<!-- the global var is set in {{italic title}} |
|||
-->{{#vardefine:_trp:_displaytitle|{{#if:{{#var:_trp:_displaytitle}}|<!-- |
|||
--><i>{{#var:_trp:_displaytitle}}</i><!-- |
|||
-->|<!-- |
|||
-->{{#ifeq:{{NAMESPACENUMBER}}|0||{{NAMESPACE}}:}}<i>{{PAGENAME}}</i><!-- don't italicize the namespace |
|||
-->}}}}<!-- |
|||
-->}}<!-- |
|||
-->{{#if:{{#var:_trp:_displaytitle}}|{{DISPLAYTITLE:{{#var:_trp:_displaytitle}}{{#var:_trp:_displaytitle_suffix}}|noreplace}}}}<!-- |
|||
--></includeonly><noinclude>{{doc}} |
--></includeonly><noinclude>{{doc}} |
Latest revision as of 17:12, 24 June 2022
This template helps organizing the many translation projects of the Terraria Wiki. It is transcluded by {{language info}}, so there is no need to transclude it manually anywhere.
Effects
It handles two tasks:
- Indexing a page, i.e. categorizing it appropriately and adding an identifier to it.
- Translating the page's title.
The template is fully automatic, hence it takes the information it needs for the first task from the article's title and the information it needs for the second task from the wiki's page database.
Indexing
The category will be the respective <language> translation
category, found in the main category. The identifier consists of a flag of the country that the language is generally associated with. It will be visible in the upper right corner of the page, in the page status indicator section. It can be clicked to reveal a banner with a short informational sentence and clicked again to hide it again.
Language | Language code | Category | Flag |
---|---|---|---|
Arabic |
|
Arabic translation | |
Bulgarian |
|
Bulgarian translation | |
Czech |
|
Czech translation | |
Danish |
|
Danish translation | |
Greek |
|
Greek translation | |
Spanish |
|
Spanish translation | |
Finnish |
|
Finnish translation | |
Hindi |
|
Hindi translation | |
Indonesian |
|
Indonesian translation | |
Italian |
|
Italian translation | |
Japanese |
|
Japanese translation | |
Lithuanian |
|
Lithuanian translation | |
Latvian |
|
Latvian translation | |
Dutch |
|
Dutch translation | |
Norwegian |
|
Norwegian translation | |
Romanian |
|
Romanian translation | |
Slovak |
|
Slovak translation | |
Swedish |
|
Swedish translation | |
Thai |
|
Thai translation | |
Turkish |
|
Turkish translation | |
Vietnamese |
|
Vietnamese translation | |
Cantonese |
|
Cantonese translation |
Usage
{{ translation projects | displaytitle = <translated page title> }}
Since this template is transcluded by {{language info}}, the parameter must be passed to that template, i.e.:
{{ language info | displaytitle = <translated page title> }}
- displaytitle
Use this parameter to provide a custom translation of the page title. It defaults to {{tr}}
, and can thus usually be omitted.