Difference between revisions of "Template:WA VersionHistory"
From Worms Knowledge Base
Explorer09 (Talk | contribs) (Use the new format. Also update the template documentation.) |
Explorer09 (Talk | contribs) (Use Template:WAreadmepage along with this template.) |
||
Line 9: | Line 9: | ||
===Language codes supported=== | ===Language codes supported=== | ||
− | *en : English | + | *en : English ([[Template:WA VersionHistory/en]]) |
− | *es : Spanish | + | *es : Spanish ([[Template:WA VersionHistory/es]]) |
− | *ru : Russian | + | *ru : Russian ([[Template:WA VersionHistory/ru]]) |
− | *fr : French | + | *fr : French ([[Template:WA VersionHistory/fr]]) |
===Example=== | ===Example=== | ||
Line 48: | Line 48: | ||
| <code>v35LinkName</code> | | <code>v35LinkName</code> | ||
| Links to the v3.5 Beta update subpages | | Links to the v3.5 Beta update subpages | ||
− | | | + | | <nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update |
|- | |- | ||
| <code>betaLinkName</code> | | <code>betaLinkName</code> | ||
| Links to the Beta update subpages | | Links to the Beta update subpages | ||
− | | | + | | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Beta Update |
|- | |- | ||
| <code>alphaLinkName</code> | | <code>alphaLinkName</code> | ||
| Link to the Alpha update subpage | | Link to the Alpha update subpage | ||
− | | | + | | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Alpha Update |
|- | |- | ||
| <code>releaseLinkName</code> | | <code>releaseLinkName</code> | ||
| Link to the stable update subpage | | Link to the stable update subpage | ||
− | | | + | | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Update |
|} | |} | ||
Line 67: | Line 67: | ||
For <code>v35LinkName</code>, {{{ver}}} will be expanded with either '1' or '2' (without quotes). This is for v3.5 Beta 1 and Beta 2, respectively. So, | For <code>v35LinkName</code>, {{{ver}}} will be expanded with either '1' or '2' (without quotes). This is for v3.5 Beta 1 and Beta 2, respectively. So, | ||
− | + | <nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update | |
becomes | becomes | ||
− | [[ | + | [[{{WAreadmepage|en}}/v3.5 Beta 1 Update]] |
− | [[ | + | [[{{WAreadmepage|en}}/v3.5 Beta 2 Update]] |
For <code>betaLinkName</code>, <code>alphaLinkName</code>, and <code>releaseLinkName</code>, {{{ver}}} will be expanded with the version number, but without the 'v' letter that we often write in something like 'v3.7.0.0'. So, | For <code>betaLinkName</code>, <code>alphaLinkName</code>, and <code>releaseLinkName</code>, {{{ver}}} will be expanded with the version number, but without the 'v' letter that we often write in something like 'v3.7.0.0'. So, | ||
− | + | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Beta Update | |
− | + | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Alpha Update | |
− | + | <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Update | |
will become | will become | ||
− | [[ | + | [[{{WAreadmepage|en}}/v3.6.19.7 Beta Update]] |
... | ... | ||
− | [[ | + | [[{{WAreadmepage|en}}/v3.6.31.0 Beta Update]] |
− | [[ | + | [[{{WAreadmepage|en}}/v3.6.31.2b Alpha Update]] |
− | [[ | + | [[{{WAreadmepage|en}}/v3.7.0.0 Update]] |
Because {{{ver}}} is never expanded with the letter 'v', the above example adds the 'v' before the {{{ver}}} token. | Because {{{ver}}} is never expanded with the letter 'v', the above example adds the 'v' before the {{{ver}}} token. | ||
Line 94: | Line 94: | ||
<nowiki>{{#switch:{{{string|}}}|</nowiki> | <nowiki>{{#switch:{{{string|}}}|</nowiki> | ||
|title=W:A Version History | |title=W:A Version History | ||
− | |v35LinkName= | + | |v35LinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update |
− | |betaLinkName= | + | |betaLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Beta Update |
− | |alphaLinkName= | + | |alphaLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Alpha Update |
− | |releaseLinkName= | + | |releaseLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Update |
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
</noinclude> | </noinclude> |
Revision as of 07:50, 28 February 2013
This navbox should help people navigate inside the version history pages.
Usage
{{WA VersionHistory|language code}}
The language will default to English (en) if the parameter is empty.
Language codes supported
- en : English (Template:WA VersionHistory/en)
- es : Spanish (Template:WA VersionHistory/es)
- ru : Russian (Template:WA VersionHistory/ru)
- fr : French (Template:WA VersionHistory/fr)
Example
{{WA VersionHistory|en}} {{WA VersionHistory|es}} {{WA VersionHistory|ru}} {{WA VersionHistory|fr}}
Adding a new language
This template uses a string table for localized strings. The string table is a sub-template with the name like Template:WA VersionHistory/en. To add a new language, create a sub-template with your language code in the name.
Then copy and paste the content below to your new sub-template:
{{#switch:{{{string|}}}| |title= |v35LinkName= |betaLinkName= |alphaLinkName= |releaseLinkName= }}
You need to translate the following strings:
String ID | Description | Example string in English |
---|---|---|
title
|
Navbox title | W:A Version History |
v35LinkName
|
Links to the v3.5 Beta update subpages | {{WAreadmepage|en}}/v3.5 Beta {{{ver}}} Update |
betaLinkName
|
Links to the Beta update subpages | {{WAreadmepage|en}}/v{{{ver}}} Beta Update |
alphaLinkName
|
Link to the Alpha update subpage | {{WAreadmepage|en}}/v{{{ver}}} Alpha Update |
releaseLinkName
|
Link to the stable update subpage | {{WAreadmepage|en}}/v{{{ver}}} Update |
The {{{ver}}} token will be expanded with the version number for each W:A update. They are used differently among string IDs, so please pay attention.
For v35LinkName
, {{{ver}}} will be expanded with either '1' or '2' (without quotes). This is for v3.5 Beta 1 and Beta 2, respectively. So,
{{WAreadmepage|en}}/v3.5 Beta {{{ver}}} Update
becomes
Worms Armageddon ReadMe (English)/v3.5 Beta 1 Update Worms Armageddon ReadMe (English)/v3.5 Beta 2 Update
For betaLinkName
, alphaLinkName
, and releaseLinkName
, {{{ver}}} will be expanded with the version number, but without the 'v' letter that we often write in something like 'v3.7.0.0'. So,
{{WAreadmepage|en}}/v{{{ver}}} Beta Update {{WAreadmepage|en}}/v{{{ver}}} Alpha Update {{WAreadmepage|en}}/v{{{ver}}} Update
will become
Worms Armageddon ReadMe (English)/v3.6.19.7 Beta Update ... Worms Armageddon ReadMe (English)/v3.6.31.0 Beta Update Worms Armageddon ReadMe (English)/v3.6.31.2b Alpha Update Worms Armageddon ReadMe (English)/v3.7.0.0 Update
Because {{{ver}}} is never expanded with the letter 'v', the above example adds the 'v' before the {{{ver}}} token.
Content of Template:WA VersionHistory/en
{{#switch:{{{string|}}}| |title=W:A Version History |v35LinkName={{WAreadmepage|en}}/v3.5 Beta {{{ver}}} Update |betaLinkName={{WAreadmepage|en}}/v{{{ver}}} Beta Update |alphaLinkName={{WAreadmepage|en}}/v{{{ver}}} Alpha Update |releaseLinkName={{WAreadmepage|en}}/v{{{ver}}} Update }}