Name – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Ooops! Missed a broken link.)
(Switched parameters for ease of use. Second (format request) is now optional, defaulting to "long")
Line 1: Line 1:
<includeonly>{{#switch:{{#replace:{{#replace:{{#replace:{{#replace:{{lc:{{{2}}}}}| |}}|:|}}|/|}}|-|}}
<includeonly>{{#switch:{{#replace:{{#replace:{{#replace:{{#replace:{{lc:{{{1}}}}}| |}}|:|}}|/|}}|-|}}
|bi
|bi
|bis
|bis
Line 6: Line 6:
|bohemiainteractive
|bohemiainteractive
|bohemiainteractivestudio
|bohemiainteractivestudio
|bohemiainteractivestudios={{#switch:{{lc:{{{1}}}}}
|bohemiainteractivestudios={{#switch:{{lc:{{{2}}}}}
     |img=bi
     |img=bi
    |image=bi
     |short=BI
     |short=BI
     |#default=Bohemia Interactive}}
     |#default=Bohemia Interactive}}
Line 22: Line 23:
|arma1armedassault
|arma1armedassault
|arma2armedassault
|arma2armedassault
|arma3armedassault={{#switch:{{lc:{{{1}}}}}
|arma3armedassault={{#switch:{{lc:{{{2}}}}}
     |img=arma
     |img=arma
    |image=arma
     |short=Arma
     |short=Arma
     |#default=Armed Assault}}
     |#default=Armed Assault}}
|a2
|a2
|arma2={{#switch:{{lc:{{{1}}}}}
|arma2={{#switch:{{lc:{{{2}}}}}
     |img=arma2
     |img=arma2
    |image=arma2
     |short=Arma 2
     |short=Arma 2
     |#default=Arma 2}}
     |#default=Arma 2}}
|a3
|a3
|arma3={{#switch:{{lc:{{{1}}}}}
|arma3={{#switch:{{lc:{{{2}}}}}
     |img=arma3
     |img=arma3
    |image=arma3
     |short=Arma 3
     |short=Arma 3
     |#default=Arma 3}}
     |#default=Arma 3}}
|zeus
|zues
|azeus
|a1zeus
|a2zeus
|a3zeus
|azues
|a1zues
|a2zues
|a3zues
|armazeus
|armazues
|arma1zeus
|arma2zeus
|arma3zeus
|arma1zues
|arma2zues
|arma3zues={{#switch:{{lc:{{{2}}}}}
    |img=zeus
    |image=zeus
    |short=Zeus
    |#default=Arma 3: Zeus}}
|aiv
|aiv
|aaiv
|aaiv
Line 62: Line 88:
|arma1australiansinvietnam
|arma1australiansinvietnam
|arma2australiansinvietnam
|arma2australiansinvietnam
|arma3australiansinvietnam={{#switch:{{lc:{{{1}}}}}
|arma3australiansinvietnam={{#switch:{{lc:{{{2}}}}}
     |img=aiv
     |img=aiv
    |image=aiv
     |short=AiV
     |short=AiV
     |#default=Australians in Vietnam}}
     |#default=Australians in Vietnam}}
Line 83: Line 110:
|arma1operationarrowhead
|arma1operationarrowhead
|arma2operationarrowhead
|arma2operationarrowhead
|arma3operationarrowhead={{#switch:{{lc:{{{1}}}}}
|arma3operationarrowhead={{#switch:{{lc:{{{2}}}}}
     |img=arma2oa
     |img=arma2oa
    |image=arma2oa
     |short=Arma 2:OA
     |short=Arma 2:OA
     |#default=Arma 2: Operation Arrowhead}}
     |#default=Arma 2: Operation Arrowhead}}
Line 104: Line 132:
|arma1britisharmedforces
|arma1britisharmedforces
|arma2britisharmedforces
|arma2britisharmedforces
|arma3britisharmedforces={{#switch:{{lc:{{{1}}}}}
|arma3britisharmedforces={{#switch:{{lc:{{{2}}}}}
     |img=arma2baf
     |img=arma2baf
    |image=arma2baf
     |short=Arma 2:BAF
     |short=Arma 2:BAF
     |#default=Arma 2: British Armed Forces}}
     |#default=Arma 2: British Armed Forces}}
Line 134: Line 163:
|arma1privatemilitarycompany
|arma1privatemilitarycompany
|arma2privatemilitarycompany
|arma2privatemilitarycompany
|arma3privatemilitarycompany={{#switch:{{lc:{{{1}}}}}
|arma3privatemilitarycompany={{#switch:{{lc:{{{2}}}}}
     |img=arma2pmc
     |img=arma2pmc
    |image=arma2pmc
     |short=Arma 2:PMC
     |short=Arma 2:PMC
     |#default=Arma 2: Private Military Company}}
     |#default=Arma 2: Private Military Company}}
Line 164: Line 194:
|arma1armyofczechrepublic
|arma1armyofczechrepublic
|arma2armyofczechrepublic
|arma2armyofczechrepublic
|arma3armyofczechrepublic={{#switch:{{lc:{{{1}}}}}
|arma3armyofczechrepublic={{#switch:{{lc:{{{2}}}}}
     |img=arma2acr
     |img=arma2acr
    |image=arma2acr
     |short=Arma 2:ACR
     |short=Arma 2:ACR
     |#default=Arma 2: Army of Czech Republic}}
     |#default=Arma 2: Army of Czech Republic}}
|zeus
|zues
|azeus
|a1zeus
|a2zeus
|a3zeus
|azues
|a1zues
|a2zues
|a3zues
|armazeus
|armazues
|arma1zeus
|arma2zeus
|arma3zeus
|arma1zues
|arma2zues
|arma3zues={{#switch:{{lc:{{{1}}}}}
    |img=zeus
    |short=Zeus
    |#default=Arma 3: Zeus}}
|ofp
|ofp
|aofp
|aofp
Line 206: Line 216:
|arma1operationflashpoint
|arma1operationflashpoint
|arma2operationflashpoint
|arma2operationflashpoint
|arma3operationflashpoint={{#switch:{{lc:{{{1}}}}}
|arma3operationflashpoint={{#switch:{{lc:{{{2}}}}}
     |img=ofp
     |img=ofp
    |image=ofp
     |short=OFP
     |short=OFP
     |#default=Operation Flashpoint}}
     |#default=Operation Flashpoint}}
Line 245: Line 256:
|arma1operationflashpointelite
|arma1operationflashpointelite
|arma2operationflashpointelite
|arma2operationflashpointelite
|arma3operationflashpointelite={{#switch:{{lc:{{{1}}}}}
|arma3operationflashpointelite={{#switch:{{lc:{{{2}}}}}
     |img=ofpe
     |img=ofpe
    |image=ofpe
     |short=OFP:E
     |short=OFP:E
     |#default=Operation Flashpoint: Elite}}
     |#default=Operation Flashpoint: Elite}}
Line 284: Line 296:
|arma1operationflashpointresistance
|arma1operationflashpointresistance
|arma2operationflashpointresistance
|arma2operationflashpointresistance
|arma3operationflashpointresistance={{#switch:{{lc:{{{1}}}}}
|arma3operationflashpointresistance={{#switch:{{lc:{{{2}}}}}
     |img=ofpr
     |img=ofpr
    |image=ofpr
     |short=OFP:R
     |short=OFP:R
     |#default=Operation Flashpoint: Resistance}}
     |#default=Operation Flashpoint: Resistance}}
Line 323: Line 336:
|arma1virtualbattlespace1
|arma1virtualbattlespace1
|arma2virtualbattlespace1
|arma2virtualbattlespace1
|arma3virtualbattlespace1={{#switch:{{lc:{{{1}}}}}
|arma3virtualbattlespace1={{#switch:{{lc:{{{2}}}}}
     |img=vbs1
     |img=vbs1
    |image=vbs1
     |short=VBS1
     |short=VBS1
     |#default=Virtual Battlespace 1}}
     |#default=Virtual Battlespace 1}}
Line 344: Line 358:
|arma1virtualbattlespace2
|arma1virtualbattlespace2
|arma2virtualbattlespace2
|arma2virtualbattlespace2
|arma3virtualbattlespace2={{#switch:{{lc:{{{1}}}}}
|arma3virtualbattlespace2={{#switch:{{lc:{{{2}}}}}
     |img=vbs2
     |img=vbs2
    |image=vbs2
     |short=VBS2
     |short=VBS2
     |#default=Virtual Battlespace 2}}
     |#default=Virtual Battlespace 2}}
Line 365: Line 380:
|arma1virtualbattlespace3
|arma1virtualbattlespace3
|arma2virtualbattlespace3
|arma2virtualbattlespace3
|arma3virtualbattlespace3={{#switch:{{lc:{{{1}}}}}
|arma3virtualbattlespace3={{#switch:{{lc:{{{2}}}}}
     |img=vbs3
     |img=vbs3
    |image=vbs3
     |short=VBS3
     |short=VBS3
     |#default=Virtual Battlespace 3}}
     |#default=Virtual Battlespace 3}}
Line 399: Line 415:
|arma1takeonhelicopters
|arma1takeonhelicopters
|arma2takeonhelicopters
|arma2takeonhelicopters
|arma3takeonhelicopters={{#switch:{{lc:{{{1}}}}}
|arma3takeonhelicopters={{#switch:{{lc:{{{2}}}}}
     |img=TKOH
     |img=TKOH
    |image=TKOH
     |short=TKOH
     |short=TKOH
     |#default=Take On Helicopters}}
     |#default=Take On Helicopters}}
Line 433: Line 450:
|arma1takeonmars
|arma1takeonmars
|arma2takeonmars
|arma2takeonmars
|arma3takeonmars={{#switch:{{lc:{{{1}}}}}
|arma3takeonmars={{#switch:{{lc:{{{2}}}}}
     |img=TKOM
     |img=TKOM
    |image=TKOM
     |short=TKOM
     |short=TKOM
     |#default=Take On Mars}}
     |#default=Take On Mars}}
|#default='''[[Bohemia_Interactive_Community:Naming_Conventions|{{{2}}}]]'''}}</includeonly><noinclude>
|#default='''[[Bohemia_Interactive_Community:Naming_Conventions|{{{1}}}]]'''}}</includeonly><noinclude>


{{Important|Not currently in use. Awaiting peer review and feedback, before including in {{Template|Command}} and {{Template|Function}} to correct badly formed entries.
{{Important|Not currently in use. Awaiting peer review and feedback, before including in {{Template|Command}} and {{Template|Function}} to correct badly formed entries.
Line 447: Line 465:
==Usage==
==Usage==
;Takes two parameters
;Takes two parameters
:The first parameter is the format request. Either "''img''", "''short''" or "''long''" (the long name is returned by default).
:The first parameter is the input string to be verified or corrected.
:The second parameter is the input string to be verified or corrected.
:The second (optional) parameter is the format request.
::Either "''img''" or "''image''", "''short''" or "''long''". The long name is returned by default if this parameter is omitted.
Will return the input string linked to [[Bohemia_Interactive_Community:Naming_Conventions|Naming Conventions]] if no matches are found.
Will return the input string linked to [[Bohemia_Interactive_Community:Naming_Conventions|Naming Conventions]] if no matches are found.
:''e.g.'' {{Inline code|<nowiki>{{Name|long|wjhbvkwfk}}</nowiki>}} produces "{{Name|long|wjhbvkwfk}}".
:''e.g.'' {{Inline code|<nowiki>{{Name|wjhbvkwfk}}</nowiki>}} produces "{{Name|wjhbvkwfk}}".


===Examples===
===Examples===
*{{Inline code|<nowiki>{{Name|img|ArmA 2}}</nowiki>}} produces "{{Name|img|ArmA 2}}"
*{{Inline code|<nowiki>{{Name|ArmA 2|img}}</nowiki>}} produces "{{Name|ArmA 2|img}}"
*{{Inline code|<nowiki>{{Name|short|arma:arc}}</nowiki>}} produces "{{Name|short|arma:arc}}" and correctly interprets a possible typo.
*{{Inline code|<nowiki>{{Name|arma:arc|short}}</nowiki>}} produces "{{Name|arma:arc|short}}" and correctly interprets a possible typo.
*{{Inline code|<nowiki>{{Name|long|ArmA 2: OFP: E}}</nowiki>}} produces "{{Name|long|ArmA 2: OFP: E}}"
*{{Inline code|<nowiki>{{Name|ArmA 2: OFP: E}}</nowiki>}} produces "{{Name|ArmA 2: OFP: E}}"
*{{Inline code|<nowiki>{{Name|doesn't actually matter if we want the long name|A1 Zues}}</nowiki>}} produces "{{Name|doesn't actually matter if we want the long name|A1 Zues}}" even though "Zeus" is both spelled incorrectly and is an Arma 3 DLC!
*{{Inline code|<nowiki>{{Name|A1 Zues}}</nowiki>}} produces "{{Name|A1 Zues}}" even though both "Zeus" is spelled incorrectly and is an Arma 3 DLC!
:''etc.'' - You get the idea :-)
:''etc.'' - You get the idea :-)


Line 462: Line 481:


===Handling===
===Handling===
{| class="wikitable" style="width:600px;"
{| class="operators"
|+ The following naming conventions are handled
|+ The following naming conventions are handled
|-
|-
! Full Name !! Short Name !! Image Link Prefix
! Full Name                       !! Short Name !! Image Link Prefix
|-
|-
| Bohemia Interactive || BI || bi
| Bohemia Interactive             || BI         || bi
|-
|-
| Armed Assault || Arma || arma
| Armed Assault                   || Arma       || arma
|-
|-
| Arma 2 || Arma 2 || arma2
| Arma 2                           || Arma 2     || arma2
|-
|-
| Arma 3 || Arma 3 || arma3
| Arma 3                           || Arma 3     || arma3
|-
|-
| Australians in Vietnam || AiV || aiv
| Arma 3: Zeus                    || Zeus      || zeus
|-
|-
| Arma 2: Operation Arrowhead || Arma 2:OA || arma2oa
| Australians in Vietnam          || AiV        || aiv
|-
|-
| Arma 2: British Armed Forces || Arma 2:BAF || arma2baf
| Arma 2: Operation Arrowhead      || Arma 2:OA  || arma2oa
|-
| Arma 2: British Armed Forces     || Arma 2:BAF || arma2baf
|-
|-
| Arma 2: Private Military Company || Arma 2:PMC || arma2pmc
| Arma 2: Private Military Company || Arma 2:PMC || arma2pmc
|-
|-
| Arma 2: Army of Czech Republic || Arma 2:ACR || arma2acr
| Arma 2: Army of Czech Republic   || Arma 2:ACR || arma2acr
|-
| Arma 3: Zeus || Zeus || zeus
|-
|-
| Operation Flashpoint || OFP || ofp
| Operation Flashpoint             || OFP       || ofp
|-
|-
| Operation Flashpoint: Elite || OFP:E || ofpe
| Operation Flashpoint: Elite     || OFP:E     || ofpe
|-
|-
| Operation Flashpoint: Resistance || OFP:R || ofpr
| Operation Flashpoint: Resistance || OFP:R     || ofpr
|-
|-
| Virtual Battlespace 1 || VBS1 || vbs1
| Virtual Battlespace 1           || VBS1       || vbs1
|-
|-
| Virtual Battlespace 2 || VBS2 || vbs2
| Virtual Battlespace 2           || VBS2       || vbs2
|-
|-
| Virtual Battlespace 3 || VBS3 || vbs3
| Virtual Battlespace 3           || VBS3       || vbs3
|-
|-
| Take On Helicopters || TKOH || TKOH
| Take On Helicopters             || TKOH       || TKOH
|-
|-
| Take On Mars || TKOM || TKOM
| Take On Mars                     || TKOM       || TKOM
|}
|}


[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 10:46, 30 April 2014


Not currently in use. Awaiting peer review and feedback, before including in {{Command}} and {{Function}} to correct badly formed entries.

Eventually this should replace multiple templates, providing a simple way to organise game naming convention.

Please add any switch cases omitted, or if unsure about how to do it, leave a message on the talk page.

Usage

Takes two parameters
The first parameter is the input string to be verified or corrected.
The second (optional) parameter is the format request.
Either "img" or "image", "short" or "long". The long name is returned by default if this parameter is omitted.

Will return the input string linked to Naming Conventions if no matches are found.

e.g. {{Name|wjhbvkwfk}} produces "wjhbvkwfk".

Examples

  • {{Name|ArmA 2|img}} produces "arma2"
  • {{Name|arma:arc|short}} produces "Arma 2:ACR" and correctly interprets a possible typo.
  • {{Name|ArmA 2: OFP: E}} produces "Operation Flashpoint: Elite"
  • {{Name|A1 Zues}} produces "Arma 3: Zeus" even though both "Zeus" is spelled incorrectly and is an Arma 3 DLC!
etc. - You get the idea :-)

In other words, it takes a multitude of possible (slightly and wildly incorrect) interpretations (including several possible typos) of how BI games should be named, and returns the conventionally correct version required, depending on circumstance.

Handling

The following naming conventions are handled
Full Name Short Name Image Link Prefix
Bohemia Interactive BI bi
Armed Assault Arma arma
Arma 2 Arma 2 arma2
Arma 3 Arma 3 arma3
Arma 3: Zeus Zeus zeus
Australians in Vietnam AiV aiv
Arma 2: Operation Arrowhead Arma 2:OA arma2oa
Arma 2: British Armed Forces Arma 2:BAF arma2baf
Arma 2: Private Military Company Arma 2:PMC arma2pmc
Arma 2: Army of Czech Republic Arma 2:ACR arma2acr
Operation Flashpoint OFP ofp
Operation Flashpoint: Elite OFP:E ofpe
Operation Flashpoint: Resistance OFP:R ofpr
Virtual Battlespace 1 VBS1 vbs1
Virtual Battlespace 2 VBS2 vbs2
Virtual Battlespace 3 VBS3 vbs3
Take On Helicopters TKOH TKOH
Take On Mars TKOM TKOM