Difference between revisions of "Template:Item infobox/Sandbox"

From Team Fortress Wiki
Jump to: navigation, search
(added code to hide Giftability for Untradable items)
m (Localize the string "Normal" in 3D view.)
Line 1: Line 1:
 
<noinclude><!--  
 
<noinclude><!--  
  
    // ## Translators: make changes here but please condense them into one edit.
+
Translators: make changes here, but please condense them into one edit.
  
    //
+
NOTE:
    // NOTE:
+
 
    //
+
The coding of this template is quite complicated and may be difficult to comprehend unless you have an advanced understanding of template and ParserFunctions syntax. As it is also used on over 15,000 pages (around 50% of all articles), it is advised that you take care when editing it. Please do not make significant changes without discussing it first on the talk page. If you want to test changes to this template, please do so on its sandbox page: Template:Item infobox/sandbox.
    // The coding of this template is quite complicated and may be difficult to comprehend unless
+
 
    // you have an advanced understanding of template and ParserFunctions syntax. As it is also  
+
If you need help editing this template, please post on the talk page.
    // used on over 15,000 pages (around 50% of all articles), it is advised that you take care when editing it. Please do not make
 
    // significant changes without discussing it first on the talk page.
 
    //
 
    // If you need help editing this template, please post on the talk page.
 
    //
 
  
 
--></noinclude>{{#switch: {{#ifeq: {{NAMESPACE}} | User | {{#ifeq: {{PAGENAME}} | {{SUBPAGENAME}} | error | normal}} | normal}}
 
--></noinclude>{{#switch: {{#ifeq: {{NAMESPACE}} | User | {{#ifeq: {{PAGENAME}} | {{SUBPAGENAME}} | error | normal}} | normal}}
Line 106: Line 101:
 
                           |3d-festive-alt = yes
 
                           |3d-festive-alt = yes
 
                           |view1={{{view1|{{BASEPAGENAME}} 3D.jpg}}}
 
                           |view1={{{view1|{{BASEPAGENAME}} 3D.jpg}}}
                           |view1name={{{view1name|Normal}}}
+
                           |view1name={{{view1name|{{common string|Normal}}}}}
 
                           |view2={{{view2|{{BASEPAGENAME}} Festive RED 3D.jpg}}}
 
                           |view2={{{view2|{{BASEPAGENAME}} Festive RED 3D.jpg}}}
 
                           |view2name={{{view2name|{{common string|Festive}} ({{common string|RED}})}}}
 
                           |view2name={{{view2name|{{common string|Festive}} ({{common string|RED}})}}}
Line 173: Line 168:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class1}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class1}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class1-name|{{#ifeq: {{{team-colors-class1}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class1}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 182: Line 177:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class2}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class2}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class2-name|{{#ifeq: {{{team-colors-class2}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class2}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 191: Line 186:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class3}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class3}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class3-name|{{#ifeq: {{{team-colors-class3}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class3}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 200: Line 195:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class4}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class4}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class4-name|{{#ifeq: {{{team-colors-class4}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class4}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 209: Line 204:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class5}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class5}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class5-name|{{#ifeq: {{{team-colors-class5}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class5}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 218: Line 213:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class6}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class6}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class6-name|{{#ifeq: {{{team-colors-class6}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class6}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 227: Line 222:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class7}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class7}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class7-name|{{#ifeq: {{{team-colors-class7}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class7}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 236: Line 231:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class8}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class8}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class8-name|{{#ifeq: {{{team-colors-class8}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class8}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 245: Line 240:
 
   | <td colspan="2" style="padding:none;">
 
   | <td colspan="2" style="padding:none;">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
 
       <table style="width:100%; background:none; border:none; padding:none; margin:none;" cellspacing="0" cellpadding="0">
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{#ifeq: {{{team-colors-class9}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class9}}}}}}}'''</td>
+
       <td style="width:100%; background:#f9d48a; text-align:center; border-right:1px solid #fff;">'''{{{team-colors-class1-name|{{#ifeq: {{{team-colors-class9}}} | other | {{common string|Other classes}} |{{class link|{{{team-colors-class9}}}}}}}}}}'''</td>
 
       </table>
 
       </table>
 
     </td>
 
     </td>
Line 737: Line 732:
 
   | zh-hant = {{tooltip|禮品包裝|該項目是否能夠使用禮品包裝道具包裝。}}:
 
   | zh-hant = {{tooltip|禮品包裝|該項目是否能夠使用禮品包裝道具包裝。}}:
 
   }}]]</td><!--  
 
   }}]]</td><!--  
   --><td class="infobox-data">{{#switch:{{lc:{{{gift|¬}}}}}
+
   --><td class="infobox-data">{{#switch:{{BASEPAGENAME}}
  | ¬
+
  | Gift Wrap
  | yes = {{common string|yes}}
+
  | Giftapult
  | no  = {{common string|no}}
+
  | Description Tag = {{common string|no}}
  | #default = {{{gift|}}}
+
  | #default = {{common string|yes}}
 
  }}</td></tr>}}}}<!--  
 
  }}</td></tr>}}}}<!--  
  
Line 1,189: Line 1,184:
 
   <th class="infobox-header" colspan="2">{{lang
 
   <th class="infobox-header" colspan="2">{{lang
 
     | en = Available Qualities
 
     | en = Available Qualities
     | cs = Dostupné kvality
+
     | cs = Dostupné Kvality
 
     | da = Tilgængelige Kvaliteter
 
     | da = Tilgængelige Kvaliteter
 
     | de = Verfügbare Qualitäten
 
     | de = Verfügbare Qualitäten
     | es = Aspectos disponibles
+
     | es = Aspectos Disponibles
     | fi = Olemassaolevat laadut
+
     | fi = Olemassaolevat Laadut
     | fr = Qualités disponibles
+
     | fr = Qualités Disponibles
     | hu = Rendekjezésre álló ritkaságok
+
     | hu = Rendekjezésre álló Ritkaságok
     | it = Qualità disponibili
+
     | it = Qualità Disponibili
 
     | ja = 存在するクオリティ
 
     | ja = 存在するクオリティ
 
     | ko = 존재하는 품질
 
     | ko = 존재하는 품질
     | no = Tilgjengelige kvaliteter
+
     | no = Tilgjengelige Kvaliteter
     | pl = Dostępne jakości
+
     | pl = Dostępne Jakości
 
     | pt = Qualidades Disponíveis
 
     | pt = Qualidades Disponíveis
     | pt-br = Qualidades disponíveis
+
     | pt-br = Qualidades Disponíveis
 
     | ru = Доступные качества
 
     | ru = Доступные качества
     | sv = Tillgängliga kvaliteter
+
     | sv = Tillgängliga Kvaliteter
 
     | tr = Mevcut Nitelikler
 
     | tr = Mevcut Nitelikler
 
     | zh-hans = 可获取的品质
 
     | zh-hans = 可获取的品质
Line 1,222: Line 1,217:
 
  -->{{#switch:{{lc:{{{loadout|¬}}}}}
 
  -->{{#switch:{{lc:{{{loadout|¬}}}}}
 
  | no
 
  | no
  | ¬ = {{ns:0}}<!-- Hide loadout by default, and if loadout is set to 'no' -->
+
  | ¬ = {{ns:0}}<!-- Hide loadout by default and if loadout is set to 'no' -->
 
  | #default = <tr>
 
  | #default = <tr>
 
   <th class="infobox-header" colspan="2">{{lang
 
   <th class="infobox-header" colspan="2">{{lang
Line 1,425: Line 1,420:
 
     | weapons = {{#if: {{{contributed-by|}}}|{{ns:0}}|{{#ifeq: {{lc:{{{game|}}}}}|tfc|{{ns:0}}|{{lang cat|Valve-made items|sort={{ucfirst:{{{type|-}}}}}&#32;{{BASEPAGENAME}}}}}}}}
 
     | weapons = {{#if: {{{contributed-by|}}}|{{ns:0}}|{{#ifeq: {{lc:{{{game|}}}}}|tfc|{{ns:0}}|{{lang cat|Valve-made items|sort={{ucfirst:{{{type|-}}}}}&#32;{{BASEPAGENAME}}}}}}}}
 
}}
 
}}
}}<!--  
+
}}
 +
{{#ifeq:{{{limited|}}}|yes|{{lang cat|Limited items}}}}<!--  
  
 
   // Deprecated parameter tracking.
 
   // Deprecated parameter tracking.
Line 1,470: Line 1,466:
 
| type    = style
 
| type    = style
 
| image    = Warning_yellow.png
 
| image    = Warning_yellow.png
| contents = This template '''MUST NOT''' be used on User pages. Please use [[Template:User item infobox]] instead.
+
| contents = This template <strong>must not</strong> be used on user pages. Please use [[Template:User item infobox]] instead.
 
}}
 
}}
 
{{documentation}}
 
{{documentation}}
 
[[Category:Infobox templates|Item infobox]]
 
[[Category:Infobox templates|Item infobox]]

Revision as of 18:00, 29 August 2017