Template:Damage/doc: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 39: Line 39:
*'''lang''' - is used for multi-language support. The following changes will apply if this is set.
*'''lang''' - is used for multi-language support. The following changes will apply if this is set.
**Passive names are collected from translated pages' '''<nowiki>{{DISPLAYTITLE}}</nowiki>''' if exists. This acts like ''alias'' but can still be overwriten by ''alias''.
**Passive names are collected from translated pages' '''<nowiki>{{DISPLAYTITLE}}</nowiki>''' if exists. This acts like ''alias'' but can still be overwriten by ''alias''.
**Translations will be fetched from '''Template:Damage/[lang]''' (i.e. '''Template:Damage/zh-hans''') and applied to table.
**Translations will be fetched from ''Template:Damage/[lang]'' (i.e. ''Template:Damage/zh-hans'') and applied to table. Text will be unchanged if no translated text found.
***Text will not be translated if no any translation found.
**To define your translation, you should add the following to ''Template:Damage/[lang]''. <syntaxhighlight>
***To define your translation, you should add the following to '''Template:Damage/[lang]'''. <syntaxhighlight>
{{#arraydefine:$t|
{{#arraydefine:$t|
original text 1=translated text 1,
original text 1 (key1)=translated text 1(value1),
original text 2=translated text 2,
original text 2 (key2)=translated text 2(value2),
...,
...,
}}
}}
</syntaxhighlight>
</syntaxhighlight>
****Some translations do not act entirely. They are formatted with some words replaced. In such cases, translations for pattern and static words should be given. Use ''{n}'' in pattern to indicate where to substitute words. ''{n}'' starts from 1.
**Notable information in translations:
*****''Per Group'' and ''Per {count_name}'' → Translations ''Per {1}'' and ''Group'' needed.
***''PvP'' and ''PvE'' are templates ''<nowiki>{{PvE}}</nowiki>'' and ''<nowiki>{{PvP}}</nowiki>'', translate them with key ''PvP'' and ''PvE'' and values with corresponding template title.
***Some translations do not act entirely. They are formatted with some words replaced. In such cases, translations for pattern and static words should be given. Use ''{n}'' in pattern to indicate where to substitute words. ''{n}'' starts from 1.
****''Per Group'' and ''Per {count_name}'' → Translations ''Per {1}'' and ''Group'' needed.


=== Extra ===
=== Extra ===