Difference between revisions of "Template:Version"
From Kerbal Space Program Wiki
Lajoswinkler (talk | contribs) m |
(*use more specific category; +sections and introduction;) |
||
Line 1: | Line 1: | ||
− | [[{{ 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 | force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version | de = Version | hr = inačica | pl = wersji | ru = версия | force = {{{lang|}}}}} |{{#if: {{{2|}}}|{{{2}}} }}}}{{{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 | force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version | de = Version | hr = inačica | pl = wersji | ru = версия | force = {{{lang|}}}}} |{{#if: {{{2|}}}|{{{2}}} }}}}{{{1}}}]]</includeonly><noinclude> |
+ | This template links to a release in the version history. | ||
+ | == 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 10: | Line 12: | ||
"{{{1}}}" | "{{{1}}}" | ||
</pre> | </pre> | ||
+ | |||
+ | == Parameters == | ||
{{Parameter Table|parameters= | {{Parameter Table|parameters= | ||
Line 17: | Line 21: | ||
}} | }} | ||
+ | == 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 40: | Line 45: | ||
|} | |} | ||
− | [[Category: | + | [[Category:Translating templates]] |
</noinclude> | </noinclude> |
Revision as of 19:32, 4 February 2014
This template links to a release in the version history.
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
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)
The “version” default text is translated into the following languages:
- German
- Polish
- Russian
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 |