Name – Template
Jump to navigation
Jump to search
Fred Gandt (talk | contribs) m (Ooops! Missed a broken link.) |
Fred Gandt (talk | contribs) (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:{{{ | <includeonly>{{#switch:{{#replace:{{#replace:{{#replace:{{#replace:{{lc:{{{1}}}}}| |}}|:|}}|/|}}|-|}} | ||
|bi | |bi | ||
|bis | |bis | ||
Line 6: | Line 6: | ||
|bohemiainteractive | |bohemiainteractive | ||
|bohemiainteractivestudio | |bohemiainteractivestudio | ||
|bohemiainteractivestudios={{#switch:{{lc:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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}} | ||
|ofp | |ofp | ||
|aofp | |aofp | ||
Line 206: | Line 216: | ||
|arma1operationflashpoint | |arma1operationflashpoint | ||
|arma2operationflashpoint | |arma2operationflashpoint | ||
|arma3operationflashpoint={{#switch:{{lc:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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:{{{ | |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|{{{ | |#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 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 [[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 | :''e.g.'' {{Inline code|<nowiki>{{Name|wjhbvkwfk}}</nowiki>}} produces "{{Name|wjhbvkwfk}}". | ||
===Examples=== | ===Examples=== | ||
*{{Inline code|<nowiki>{{Name | *{{Inline code|<nowiki>{{Name|ArmA 2|img}}</nowiki>}} produces "{{Name|ArmA 2|img}}" | ||
*{{Inline code|<nowiki>{{Name | *{{Inline code|<nowiki>{{Name|arma:arc|short}}</nowiki>}} produces "{{Name|arma:arc|short}}" and correctly interprets a possible typo. | ||
*{{Inline code|<nowiki>{{Name | *{{Inline code|<nowiki>{{Name|ArmA 2: OFP: E}}</nowiki>}} produces "{{Name|ArmA 2: OFP: E}}" | ||
*{{Inline code|<nowiki>{{Name | *{{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=" | {| 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 | ||
|- | |- | ||
| | | Arma 3: Zeus || Zeus || zeus | ||
|- | |- | ||
| | | 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 | ||
|- | |- | ||
| 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
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
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 |