MilMo Wiki

READ MORE

MilMo Wiki
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template is used to retrieve in-game text, based on the game text database which is taken from the [https://translate.milmogame.com/ translation repository].
+
This template is used to retrieve in-game text, based on the game text database which is taken from the [https://translate.milmogame.com/ translation repository]. It is one of the most powerful and crucial templates for the [[MilMo Wiki:Projects#Language projects|translation projects]].
 
'''Note: this template is (very) slow.'''
 
   
 
== Usage ==
 
== Usage ==
Line 11: Line 9:
   
 
; lang ''(optional)''
 
; lang ''(optional)''
Language code. Currently we have 2 languages (as in-game): en/pt. Other lang codes will use en database.
+
Language code. Currently we have 2 main complete languages (as in-game): en/pt. and incomplete beta languages (de/es/fr/pl/ro/sv). Other lang codes will use en database.
   
 
; all <code>x_&lt;name&gt;</code> and <code>y_&lt;name&gt;</code> parameters
 
; all <code>x_&lt;name&gt;</code> and <code>y_&lt;name&gt;</code> parameters
Line 27: Line 25:
 
|-
 
|-
 
| <code><nowiki>{{gameText|Abilities_DPS_1_N|lang=pt}}</nowiki></code> || {{unitTest|Ataque da Víbora|{{gameText|Abilities_DPS_1_N|lang=pt}}}}
 
| <code><nowiki>{{gameText|Abilities_DPS_1_N|lang=pt}}</nowiki></code> || {{unitTest|Ataque da Víbora|{{gameText|Abilities_DPS_1_N|lang=pt}}}}
  +
|-
  +
| <code><nowiki>{{gameText|Abilities_DPS_1_N|lang=es}}</nowiki></code> || {{unitTest|Ataque de Víbora|{{gameText|Abilities_DPS_1_N|lang=es}}}}
  +
|-
  +
| <code><nowiki>{{gameText|Abilities_DPS_1_N|lang=de}}</nowiki></code> || {{unitTest|Venom-Streik|{{gameText|Abilities_DPS_1_N|lang=de}}}}
  +
|-
  +
| <code><nowiki>{{gameText|Abilities_DPS_1_N|lang=fr}}</nowiki></code> || {{unitTest|Attaque de Vipèr|{{gameText|Abilities_DPS_1_N|lang=fr}}}}
 
|-
 
|-
 
| <code><nowiki>{{gameText|World_7506}}</nowiki></code> || {{unitTest|Belongs to<br/>{0}|{{gameText|World_7506}}}}
 
| <code><nowiki>{{gameText|World_7506}}</nowiki></code> || {{unitTest|Belongs to<br/>{0}|{{gameText|World_7506}}}}
 
|-
 
|-
 
| <code><nowiki>{{gameText|World_7506|nl2br=no}}</nowiki></code> || {{unitTest|Belongs to\n{0}|{{gameText|World_7506|nl2br=no}}}}
 
| <code><nowiki>{{gameText|World_7506|nl2br=no}}</nowiki></code> || {{unitTest|Belongs to\n{0}|{{gameText|World_7506|nl2br=no}}}}
  +
|-
  +
| <code><nowiki>{{gameText|World_13555}}</nowiki></code> || {{unitTest|I should wait until I'm level {0} to enter there.|{{gameText|World_13555}}}}
 
|-
 
|-
 
| <code><nowiki>{{gameText|World_13555|x_0=15}}</nowiki></code> || {{unitTest|I should wait until I'm level 15 to enter there.|{{gameText|World_13555|x_0=15}}}}
 
| <code><nowiki>{{gameText|World_13555|x_0=15}}</nowiki></code> || {{unitTest|I should wait until I'm level 15 to enter there.|{{gameText|World_13555|x_0=15}}}}
Line 39: Line 45:
 
|}
 
|}
   
== Game Text list ==
+
== Translation databases ==
  +
The following Modules hold all translations that {{tl|GameText}} bases its output on.
You can view the entire game text database [[:Módulo:GameText/db-en|(en) here]] and [[:Módulo:GameText/db-pt|(pt) here]]. It is a huge table, please be patient.
 
  +
  +
{| class="wikitable"
  +
|-
  +
! Language !! Template
  +
|-
  +
| [[File:Flag-en.png|24px|link=|English]] English || [[:Module:GameText/db-en]]
  +
|-
  +
| [[File:Flag_of_Brazil.png|24px|link=|Portuguese]] Portuguese (BR) || [[:Module:GameText/db-pt]]
  +
|-
  +
| [[File:Germany_Flag.png|24px|link=|German]] German || [[:Module:GameText/db-de]]
  +
|-
  +
| [[File:CELAC_Flag.png|24px|link=|Spanish]] Spanish (LA) || [[:Module:GameText/db-es]]
  +
|-
  +
| [[File:French_Republic_Flag.png|24px|link=|French]] French || [[:Module:GameText/db-fr]]
  +
|-
  +
| [[File:Flag_of_Poland.png|24px|link=|Polish]] Polish || [[:Module:GameText/db-pl]]
  +
|-
  +
| [[File:Flag_of_Romania.png|24px|link=|Romanian]] Romanian || [[:Module:GameText/db-ro]]
  +
|-
  +
| [[File:Kingdom_of_Sweden_Flag.png|24px|link=|Swedish]] Swedish || [[:Module:GameText/db-sv]]
  +
|}
  +
  +
== See also ==
  +
* {{tl|TemplateText}} for the template text functionality.
   
 
<includeonly>
 
<includeonly>

Latest revision as of 12:34, 16 February 2021

This template is used to retrieve in-game text, based on the game text database which is taken from the translation repository. It is one of the most powerful and crucial templates for the translation projects.

Usage

{{gameText|<index key>|lang=<lang>|nl2br=no|x_<name>=<value>...|y_<name>=<value>...}}

Unnamed Parameter 1

Index key for text. Same as in-game language. See examples below.

lang (optional)

Language code. Currently we have 2 main complete languages (as in-game): en/pt. and incomplete beta languages (de/es/fr/pl/ro/sv). Other lang codes will use en database.

all x_<name> and y_<name> parameters

Replacement for placeholder. There are 2 types of placeholder in the game text: {xxx} and <yyy>, indexed by x_... and y_..., respectively. See examples below.

nl2br

By default, link breaks (\n) in gameText will be replaced with >br/<. If nl2br is set, it will output raw text.

Examples

Code Result
{{gameText|Abilities_DPS_1_N}} Venom Strike
{{gameText|Abilities_DPS_1_N|lang=pt}} Ataque da Víbora
{{gameText|Abilities_DPS_1_N|lang=es}} Ataque de Víbora
{{gameText|Abilities_DPS_1_N|lang=de}} Venom-Streik
{{gameText|Abilities_DPS_1_N|lang=fr}} Attaque de Vipère FAIL! (expected: Attaque de Vipèr)
{{gameText|World_7506}} Belongs to
{0}
{{gameText|World_7506|nl2br=no}} Belongs to\n{0}
{{gameText|World_13555}} I should wait until I'm level {0} to enter there.
{{gameText|World_13555|x_0=15}} I should wait until I'm level 15 to enter there.
{{gameText|World_11380}} {0} just reached Level {1}!
{{gameText|World_11380|x_0=PlayerName|x_1=21}} PlayerName just reached Level 21!

Translation databases

The following Modules hold all translations that {{GameText}} bases its output on.

Language Template
English English Module:GameText/db-en
Portuguese Portuguese (BR) Module:GameText/db-pt
German German Module:GameText/db-de
Spanish Spanish (LA) Module:GameText/db-es
French French Module:GameText/db-fr
Polish Polish Module:GameText/db-pl
Romanian Romanian Module:GameText/db-ro
Swedish Swedish Module:GameText/db-sv

See also