Difference between revisions of "Template:WA VersionHistory"

From Worms Knowledge Base

Jump to: navigation, search
m (class="noprint")
(Example: + portuguese)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| width="100%" class="toccolours collapsible noprint"
+
{{WA VersionHistory/core2|lang={{{1|en}}}}}<noinclude>
 +
----
 +
This navbox should help people navigate inside the version history pages.
 +
__NOTOC__
 +
==Usage==
 +
<nowiki>{{WA VersionHistory|language code}}</nowiki>
 +
 
 +
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]])
 +
*pt : Portuguese ([[Template:WA VersionHistory/pt]])
 +
 
 +
===Example===
 +
<nowiki>{{WA VersionHistory|en}}</nowiki>
 +
<nowiki>{{WA VersionHistory|es}}</nowiki>
 +
<nowiki>{{WA VersionHistory|ru}}</nowiki>
 +
<nowiki>{{WA VersionHistory|fr}}</nowiki>
 +
<nowiki>{{WA VersionHistory|pt}}</nowiki>
 +
 
 +
==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:
 +
 
 +
<nowiki>{{#switch:{{{string|}}}|</nowiki>
 +
|title=
 +
|v35LinkName=
 +
|betaLinkName=
 +
|alphaLinkName=
 +
|releaseLinkName=
 +
<nowiki>}}</nowiki>
 +
 
 +
You need to translate the following strings:
 +
 
 +
{|
 
|-
 
|-
! style="text-align: center;" colspan="2" | W:A Version History
+
! String ID
 +
! Description
 +
! Example string in English
 
|-
 
|-
! v3.5
+
| <code>title</code>
| [[Worms Armageddon ReadMe (English)/v3.5 Beta 1 Update|Beta 1]]&nbsp;· <!--
+
| Navbox title
-->[[Worms Armageddon ReadMe (English)/v3.5 Beta 2 Update|Beta 2]]
+
| W:A Version History
 
|-
 
|-
! v3.6.x.x
+
| <code>v35LinkName</code>
| [[Worms Armageddon ReadMe (English)/v3.6.19.7 Beta Update|19.7]] (<!--
+
| Links to the v3.5 Beta update subpages
-->[[Worms Armageddon ReadMe (English)/v3.6.19.11 Beta Update|.11]]&nbsp;· <!--
+
| <nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update
-->[[Worms Armageddon ReadMe (English)/v3.6.19.12 Beta Update|.12]]&nbsp;· <!--
+
|-
-->[[Worms Armageddon ReadMe (English)/v3.6.19.14 Beta Update|.14]]&nbsp;· <!--
+
| <code>betaLinkName</code>
-->[[Worms Armageddon ReadMe (English)/v3.6.19.15 Beta Update|.15]]&nbsp;· <!--
+
| Links to the Beta update subpages
-->[[Worms Armageddon ReadMe (English)/v3.6.19.17 Beta Update|.17]]&nbsp;· <!--
+
| <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Beta Update
-->[[Worms Armageddon ReadMe (English)/v3.6.19.17a Beta Update|.17a]]&nbsp;· <!--
+
|-
-->[[Worms Armageddon ReadMe (English)/v3.6.19.18 Beta Update|.18]]&nbsp;· <!--
+
| <code>alphaLinkName</code>
-->[[Worms Armageddon ReadMe (English)/v3.6.19.19 Beta Update|.19]])&nbsp;· <!--
+
| Link to the Alpha update subpage
 +
| <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Alpha Update
 +
|-
 +
| <code>releaseLinkName</code>
 +
| Link to the stable update subpage
 +
| <nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Update
 +
|}
  
-->[[Worms Armageddon ReadMe (English)/v3.6.20.1 Beta Update|20.1]] (<!--
+
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.
-->[[Worms Armageddon ReadMe (English)/v3.6.20.2 Beta Update|.2]]&nbsp;· <!--
+
-->[[Worms Armageddon ReadMe (English)/v3.6.20.3 Beta Update|.3]])&nbsp;· <!--
+
  
-->[[Worms Armageddon ReadMe (English)/v3.6.21.1 Beta Update|21.1]] (<!--
+
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,
-->[[Worms Armageddon ReadMe (English)/v3.6.21.2 Beta Update|.2]]&nbsp;· <!--
+
-->[[Worms Armageddon ReadMe (English)/v3.6.21.3 Beta Update|.3]])&nbsp;· <!--
+
  
-->[[Worms Armageddon ReadMe (English)/v3.6.22.1 Beta Update|22.1]]&nbsp;· <!--
+
<nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update
  
-->[[Worms Armageddon ReadMe (English)/v3.6.23.0 Beta Update|23.0]] (<!--
+
becomes
-->[[Worms Armageddon ReadMe (English)/v3.6.23.1 Beta Update|.1]]&nbsp;· <!--
+
-->[[Worms Armageddon ReadMe (English)/v3.6.23.2 Beta Update|.2]])&nbsp;· <!--
+
  
-->[[Worms Armageddon ReadMe (English)/v3.6.24.1 Beta Update|24.1]] (<!--
+
[[{{WAreadmepage|en}}/v3.5 Beta 1 Update]]
-->[[Worms Armageddon ReadMe (English)/v3.6.24.2 Beta Update|.2]])&nbsp;· <!--
+
[[{{WAreadmepage|en}}/v3.5 Beta 2 Update]]
  
-->[[Worms Armageddon ReadMe (English)/v3.6.25.1a Beta Update|25.1a]]&nbsp;· <!--
+
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
 +
 
 +
[[{{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.
 +
 
 +
===Content of [[Template:WA VersionHistory/en]]===
 +
 
 +
<nowiki>{{#switch:{{{string|}}}|</nowiki>
 +
|title=W:A Version History
 +
|v35LinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v3.5 Beta {{{ver}}} Update
 +
|betaLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Beta Update
 +
|alphaLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Alpha Update
 +
|releaseLinkName=<nowiki>{{WAreadmepage|en}}</nowiki>/v{{{ver}}} Update
 +
<nowiki>}}</nowiki>
  
-->[[Worms Armageddon ReadMe (English)/v3.6.26.4 Beta Update|26.4]] (<!--
 
-->[[Worms Armageddon ReadMe (English)/v3.6.26.5 Beta Update|.5]])&nbsp;· <!--
 
  
-->[[Worms Armageddon ReadMe (English)/v3.6.28.0 Beta Update|28.0]]&nbsp;· <!--
 
-->[[Worms Armageddon ReadMe (English)/v3.6.29.0 Beta Update|29.0]]
 
|}<noinclude>
 
----
 
This navbox should help people navigate inside the version history pages.
 
 
</noinclude>
 
</noinclude>

Latest revision as of 04:18, 26 March 2020

W:A Version History
v3.5 Beta 1 • Beta 2
v3.6.x.x 19.7 (.11 • .12 • .14 • .15 • .17 • .17a • .18 • .19) • 20.1 (.2 • .3) • 21.1 (.2 • .3) • 22.1 • 23.0 (.1 • .2) • 24.1 (.2) • 25.1a • 26.4 (.5) • 28.0 • 29.0 • 30.0 • 31.0 • 31.2b
v3.7.x.x 0.0 • 2.1
v3.8.x 0 • 1

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

Example

{{WA VersionHistory|en}}
{{WA VersionHistory|es}}
{{WA VersionHistory|ru}}
{{WA VersionHistory|fr}}
{{WA VersionHistory|pt}}

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
}}


Personal tools