Difference between revisions of "Template:Version"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+special default text option;)
m (Actualización español)
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[{{ lang | en = Version history |de=Version history/de|pl=Version history/pl| ru = Version history/ru|zh-cn=Version history/zh-cn | force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version | de = Version | pl = wersji | ru = версия | force = {{{lang|}}}}}&#32;|{{#if: {{{2|}}}|{{{2}}}&#32;}}}}{{{1}}}]]<noinclude>
+
<includeonly>[[{{ lang  
 +
| en = Version history  
 +
| de=Version history/de
 +
| hr=Version history/hr
 +
| pl=Version history/pl
 +
| ru = Version history/ru
 +
| zh-cn=Version history/zh-cn  
 +
| ko=Version history/ko
 +
| hu=Version history/hu
 +
| it=Version history/it
 +
| ja=Version history/ja
 +
| tr=Version history/tr
 +
| es = Version history/es
 +
| force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version  
 +
| de = Version  
 +
| hr = inačica
 +
| pl = wersji  
 +
| ru = версия  
 +
| ko = 버전
 +
| hu = verzió
 +
| it = Versione
 +
| ja = バージョン
 +
| tr = Sürüm
 +
| es = Versión
 +
| force = {{{lang|}}}}}&#32;|{{#if: {{{2|}}}|{{{2}}}&#32;}}}}{{{1}}}]]</includeonly><noinclude>
 +
This template links to a release in the version history. '''Only use this template to link to versions for which there is no article linking to it.''' For example it shouldn't be used for links like [[0.90.0]].
  
 +
== Pseudo code ==
 
<pre>
 
<pre>
 
if {{{2|}}} // prefix text is undefined OR defined as a non-empty string
 
if {{{2|}}} // prefix text is undefined OR defined as a non-empty string
Line 11: Line 37:
 
</pre>
 
</pre>
  
{{Parameter Table|parameters=
+
== Parameters ==
{{Parameter Row|1|Version number; may begin with a “v”}}
+
 
{{Parameter Row|2|Text shown and linked in front of the version number. When set to <tt>!</tt> it shows the default text.|<tt>version</tt> (or the localisation)}}
+
{{Parameter table|parameters=
{{Parameter Row|lang|Force a specific language if set.|Not set}}
+
{{Parameter row|1|Version number; may begin with a “v”}}
 +
{{Parameter row|2|Text shown and linked in front of the version number. When set to <tt>!</tt> it shows the default text.|<tt>version</tt> (or the localisation)}}
 +
{{Parameter row|lang|Force a specific language if set.|Not set}}
 
}}
 
}}
  
 +
== Localization ==
 
The version number can be preceded by a 'v'. It links to the localized pages for the following languages:
 
The version number can be preceded by a 'v'. It links to the localized pages for the following languages:
 
* German
 
* German
Line 22: Line 51:
 
* Russian
 
* Russian
 
* Chinese (zh-cn)
 
* Chinese (zh-cn)
 +
* Korean
 +
* Hungarian
  
 
The “version” default text is translated into the following languages:
 
The “version” default text is translated into the following languages:
Line 27: Line 58:
 
* Polish
 
* Polish
 
* Russian
 
* Russian
 +
* Korean
 +
* Hungarian
 +
* Italian
  
 
== Examples ==
 
== Examples ==
Line 40: Line 74:
 
|}
 
|}
  
[[Category:Templates]]
+
[[Category:Translating templates]]
 
</noinclude>
 
</noinclude>

Revision as of 18:18, 12 June 2019

This template links to a release in the version history. Only use this template to link to versions for which there is no article linking to it. For example it shouldn't be used for links like 0.90.0.

Pseudo code

if {{{2|}}} // prefix text is undefined OR defined as a non-empty string
   if {{{2}}} // prefix text is defined as a non-empty string
      "{{{2}}} {{{1}}}"
   else // prefix text is undefined
      "version {{{1}}}"
else // prefix text is defined as an empty string
   "{{{1}}}"

Parameters

# Optional Description Default
1 No Version number; may begin with a “v”
2 Yes Text shown and linked in front of the version number. When set to ! it shows the default text. version (or the localisation)
lang Yes Force a specific language if set. Not set

Localization

The version number can be preceded by a 'v'. It links to the localized pages for the following languages:

  • German
  • Polish
  • Russian
  • Chinese (zh-cn)
  • Korean
  • Hungarian

The “version” default text is translated into the following languages:

  • German
  • Polish
  • Russian
  • Korean
  • Hungarian
  • Italian

Examples

Usage Produces
{{version|0.17}}
 version 0.17
{{version|0.17|}}
 0.17
{{version|0.17|prefix text here}}
 prefix text here 0.17