Template:This is a: Difference between revisions
Jump to navigation
Jump to search

Consider discussing changes on the talk page before implementing them.
(CPU real time usage to render went way up after changing the "this is a" string to a switch statement. Nevertheless, the template's finally at a low enough expansion depth.) |
Tag: Undo |
||
| (84 intermediate revisions by 7 users not shown) | |||
| Line 1: | Line 1: | ||
<!-- | {{High-use|approx=2,800}} | ||
{{Documentation}} | |||
<includeonly> | |||
<onlyinclude><!-- | |||
Page display name | Page display name | ||
| Line 6: | Line 11: | ||
|{{yesno|{{{notitlechange|no}}} | |{{yesno|{{{notitlechange|no}}} | ||
|yes = | |yes = | ||
|no | |no = {{DISPLAYTITLE:{{mono|{{{name}}}}}|noerror}} | ||
}} | }} | ||
}}<!-- | }}<!-- | ||
| Line 16: | Line 18: | ||
-->{{yesno|{{{sprite|no}}} | -->{{yesno|{{{sprite|no}}} | ||
|yes = [[File:{{{name|{{ | |yes = [[File:{{{name|{{SUBPAGENAME}} }}}.png|left|{{{spritesize|64px}}}|link=]] | ||
|def = [[File:{{{sprite}}}|left|link=]] | |def = [[File:{{{sprite}}}|left|{{{spritesize|64px}}}|link=]] | ||
}}<!-- | }}<!-- | ||
| Line 23: | Line 25: | ||
-->{{yesno|{{{icon|no}}} | -->{{yesno|{{{icon|no}}} | ||
|yes = {{ | |yes = {{ {{{game}}} }} | ||
|def = {{ | |def = {{ {{{icon}}} }} | ||
}}<!-- | }}<!-- | ||
All the actual text | All the actual text | ||
-->{{this is a/strings|this is a | -->{{this is a/strings|this is a|plural={{#if:{{{name1|}}}|1}} | ||
|this = {{#if:{{{name|}}} | |this = {{#if:{{{name|}}}<!-- | ||
-->|{{this is a/strings|list | |||
|<code>{{{name}}}</code><!-- | |||
-->|{{#if:{{{name1|}}}|<code>{{{name1}}}</code> }}<!-- | |||
-->|{{#if:{{{name2|}}}|<code>{{{name2}}}</code> }}<!-- | |||
-->|{{#if:{{{name3|}}}|<code>{{{name3}}}</code> }}<!-- | |||
-->|{{#if:{{{name4|}}}|<code>{{{name4}}}</code> }}<!-- | |||
-->|{{#if:{{{name5|}}}|<code>{{{name5}}}</code> }} }} | |||
|{{yesno|{{{this}}}|yes={{{this|{{this is a/strings|this}} }}} }} <!-- If the parameter "this" is defined as anything except a 0, no etc., then it reads as a translation of the word "this" --> | |{{yesno|{{{this}}}|yes={{{this|{{this is a/strings|this}} }}} }} <!-- If the parameter "this" is defined as anything except a 0, no etc., then it reads as a translation of the word "this" --> | ||
}} | }} | ||
|dx = {{#switch:{{{dx}}}<!-- | |||
-->|#default=<!-- | |||
-->|dx8={{Dx8}}<!-- | |||
-->|dx9={{Dx9}}<!-- | |||
-->|dx95|dx90c={{Dx95}} | |||
}} | |||
|internal = {{yesno|{{{internal|}}}|yes={{this is a/strings|internal}} }} | <!-- The type and whether the word is plural are passed so the sentence can be properly conjugated in appropriate languages --> | ||
| | |cut = {{yesno|{{{cut|}}}|yes={{this is a/strings|cut|type={{{1}}}|plural={{#if:{{{name1|}}}|1}} }} }} | ||
|internal = {{yesno|{{{internal|}}}|yes={{this is a/strings|internal|type={{{1}}}|plural={{#if:{{{name1|}}}|1}} }} }} | |||
|semi-internal = {{yesno|{{{semi-internal|}}}|yes={{this is a/strings|semi-internal|type={{{1}}}|plural={{#if:{{{name1|}}}|1}} }} }} | |||
|type = {{if empty|{{this is a/strings|type|{{{1}}} }} |{{{1}}} }} <!-- | |type = {{if empty <!-- if not a valid type, default to whatever the parameter says --> | ||
|{{this is a/strings|type|{{{1}}}|plural={{#if:{{{name1|}}}|1}}}} | |||
|{{{1}}} | |||
}} | |||
<!-- Pass the type parameter for conjugation --> | |||
|type-param = {{{1|}}} | |||
|in = {{#if:{{{game|}}}<!-- | |in = {{#if:{{{game|}}}<!-- | ||
-->|{{this is a/strings|list | -->|{{this is a/strings|list | ||
|{{ | |{{ {{{game}}}|4}}<!-- | ||
-->|{{ | -->|{{#if:{{{game1|}}}|{{ {{{game1}}}|4}} }}<!-- | ||
-->|{{ | -->|{{#if:{{{game2|}}}|{{ {{{game2}}}|4}} }}<!-- | ||
-->|{{ | -->|{{#if:{{{game3|}}}|{{ {{{game3}}}|4}} }}<!-- | ||
-->|{{ | -->|{{#if:{{{game4|}}}|{{ {{{game4}}}|4}} }}<!-- | ||
-->|{{ | -->|{{#if:{{{game5|}}}|{{ {{{game5}}}|4}} }}<!-- | ||
-->}} | -->}} | ||
|{{#if:{{{series|}}} | |{{#if:{{{series|}}} | ||
|{{ | |{{ {{{series}}} series|4}} | ||
|{{this is a/strings|all games | |{{this is a/strings|all games | ||
|engine = {{this is a/strings|list | |engine = {{this is a/strings|list | ||
| Line 66: | Line 88: | ||
|since = {{#if:{{{since|}}}|{{this is a/strings|since|since={{ | |for the shader = {{#if:{{{shader|}}}<!-- | ||
|before = {{#if:{{{before|}}}|{{this is a/strings|before|before={{ | -->|{{#ifeq:{{{1}}}|shader parameter|<!-- | ||
|except = {{#if:{{{except|}}}|{{this is a/strings|except|except={{ | -->{{this is a/strings|for the shader|shader=<!-- | ||
-->{{this is a/strings|list<!-- | |||
-->| [[{{{shader}}}]]<!-- | |||
-->|{{#if:{{{shader1|}}}|[[{{{shader1}}}]]}}<!-- | |||
-->|{{#if:{{{shader2|}}}|[[{{{shader2}}}]]}}<!-- | |||
-->|{{#if:{{{shader3|}}}|[[{{{shader3}}}]]}}<!-- | |||
-->|{{#if:{{{shader4|}}}|[[{{{shader4}}}]]}}<!-- | |||
-->|{{#if:{{{shader5|}}}|[[{{{shader5}}}]]}}<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
-->}} | |||
|since = {{#if:{{{since|}}}|{{this is a/strings|since|since={{ {{{since}}}|4}} }} }} | |||
|before = {{#if:{{{before|}}}|{{this is a/strings|before|before={{ {{{before}}}|4}} }} }} | |||
|except = {{#if:{{{except|}}}|{{this is a/strings|except|except={{ {{{except}}}|4}} }} }} | |||
|except-multi = {{#if:{{{except-multi|}}}|{{this is a/strings|except|except={{{except-multi}}} }} }} | |except-multi = {{#if:{{{except-multi|}}}|{{this is a/strings|except|except={{{except-multi}}} }} }} | ||
| Line 79: | Line 117: | ||
|yes = | |yes = | ||
|no = {{#if:{{this is a/strings|type|{{{1}}} }} | |no = {{#if:{{this is a/strings|type|{{{1}}} }} | ||
|{{#if:{{{game|}}} |{{this is a/category|{{{1}}}| | |{{#if:{{{game|}}} |{{this is a/category|{{{1}}}|in={{{game}}} |cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{game1|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{game1|}}}|{{this is a/category|{{{1}}}|in={{{game1}}}|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{game2|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{game2|}}}|{{this is a/category|{{{1}}}|in={{{game2}}}|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{game3|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{game3|}}}|{{this is a/category|{{{1}}}|in={{{game3}}}|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{game4|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{game4|}}}|{{this is a/category|{{{1}}}|in={{{game4}}}|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{game5|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{game5|}}}|{{this is a/category|{{{1}}}|in={{{game5}}}|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{engine|}}} |{{this is a/category|{{{1}}}| | -->{{#if:{{{engine|}}} |{{this is a/category|{{{1}}}|in={{{engine}}} base |cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{engine1|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{engine1|}}}|{{this is a/category|{{{1}}}|in={{{engine1}}} base|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{engine2|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{engine2|}}}|{{this is a/category|{{{1}}}|in={{{engine2}}} base|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
-->{{#if:{{{series|}}}|{{this is a/category|{{{1}}}| | -->{{#if:{{{series|}}}|{{this is a/category|{{{1}}}|in={{{series}}} series|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
Add to Category:Source base (type) if game, engine, and series are all unspecified | Add to Category:Source base (type) if game, engine, and series are all unspecified | ||
-->{{#if:{{{game|}}}{{{engine|}}}{{{series|}}}||{{this is a/category|{{{1}}}| | -->{{#if:{{{game|}}}{{{engine|}}}{{{series|}}}||{{this is a/category|{{{1}}}|in=source base|cut={{{cut|}}}|internal={{{internal|}}}|semi-internal={{{semi-internal|}}}|no-non-int={{{no-non-int|}}} }} }}<!-- | ||
Add shaders to Category:Shaders | |||
-->{{#switch:{{{1}}}|pixel shader|vertex shader={{this is a/category|Shader|in=}}}} | |||
}} | }} | ||
}}<!-- | }}<!-- | ||
| Line 108: | Line 150: | ||
Warning if {{{1}}} is not present | Warning if {{{1}}} is not present | ||
-- | -->{{#if:{{{1|}}}||{{warning|{{this is a/strings|missing parameter }} }} }}<!-- | ||
Warning if parameters such as {{{game}}} don't use the full name of a game, engine, etc. (e.g. if {{{game}}} is set to "hl2" instead of "Half-Life 2") | |||
-->{{#if:<!-- | |||
-->{{This is a/check name|param=game|arg={{{game|}}}}}<!-- | |||
-->{{This is a/check name|param=game1|arg={{{game1|}}}}}<!-- | |||
-->{{This is a/check name|param=game2|arg={{{game2|}}}}}<!-- | |||
-->{{This is a/check name|param=game3|arg={{{game3|}}}}}<!-- | |||
-->{{This is a/check name|param=game4|arg={{{game4|}}}}}<!-- | |||
-->{{This is a/check name|param=game5|arg={{{game5|}}}}}<!-- | |||
-->{{This is a/check name|param=engine|arg={{{engine|}}}}}<!-- | |||
-->{{This is a/check name|param=engine1|arg={{{engine1|}}}}}<!-- | |||
-->{{This is a/check name|param=engine2|arg={{{engine2|}}}}}<!-- | |||
-->{{#if:{{{series|}}}|{{This is a/check name|param=series|arg={{{series|}}} series}}}}<!-- | |||
-->|{{Warning|<!-- | |||
-->{{#if:{{{game|}}}|{{This is a/check name|param=game|arg={{{game|}}}}}|}}<!-- | |||
-->{{#if:{{{game1|}}}|{{This is a/check name|param=game1|arg={{{game1|}}}}}|}}<!-- | |||
-->{{#if:{{{game2|}}}|{{This is a/check name|param=game2|arg={{{game2|}}}}}|}}<!-- | |||
-->{{#if:{{{game3|}}}|{{This is a/check name|param=game3|arg={{{game3|}}}}}|}}<!-- | |||
-->{{#if:{{{game4|}}}|{{This is a/check name|param=game4|arg={{{game4|}}}}}|}}<!-- | |||
-->{{#if:{{{game5|}}}|{{This is a/check name|param=game5|arg={{{game5|}}}}}|}}<!-- | |||
-->{{#if:{{{engine|}}}|{{This is a/check name|param=engine|arg={{{engine|}}}}}|}}<!-- | |||
-->{{#if:{{{engine1|}}}|{{This is a/check name|param=engine1|arg={{{engine1|}}}}}|}}<!-- | |||
-->{{#if:{{{engine2|}}}|{{This is a/check name|param=engine2|arg={{{engine2|}}}}}|}}<!-- | |||
-->{{#if:{{{series|}}}|{{This is a/check name|param=series|arg={{{series|}}} series}}|}}<!-- | |||
--><br><small>{{This is a/strings|false warn}}</small><!-- | |||
-->}}<!-- | |||
-->{{ACategory|this is a template errors}}<!-- | |||
-->}}</onlyinclude> | |||
</includeonly> | |||
Latest revision as of 15:12, 13 September 2025
This template is used on approximately 2,800 pages and changes may be widely noticed.
Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage.Consider discussing changes on the talk page before implementing them.
The above documentation is transcluded from Template:This is a/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
