This template is protected from editing.

Difference between revisions of "Template:Item price"

From Team Fortress Wiki
Jump to: navigation, search
(move position of € symbol per talk page)
m (Fix lang templates to avoid this template appearing as 'missing translations'.)
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{#switch:{{uc:{{{1|{{{currency|}}}}}}}}
+
{{#if:{{{1|}}}{{{currency|}}}
| USD = {{tooltip|$|United States dollars}}{{Item price/core|currency=USD|item={{{item|{{BASEPAGENAMEE}}}}}}}
+
| {{#switch:{{lc:{{{1|{{{currency|}}}}}}}}
| GBP = {{tooltip|£|Pound sterling}}{{Item price/core|currency=GBP|item={{{item|{{BASEPAGENAMEE}}}}}}}
+
| usd = <!--
| EUR = {{Item price/core|currency=EUR|item={{{item|{{BASEPAGENAMEE}}}}}}}{{tooltip|€|Euros}}
+
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}}
 +
    }}
 +
 
 +
| gbp = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}}
 +
    }}
 +
 
 +
| eur = <!--
 +
  -->{{Item price/core|currency=eur|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|€|{{common string|Euros}}}}
 +
 
 +
| rub = <!--
 +
  -->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|{{common string|rubles}}|{{common string|rubles-tooltip}}}}
 +
 
 +
| brl = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|R$&nbsp;|{{common string|reais}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=brl|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|R$&nbsp;|{{common string|reais}}}}
 +
    }}
 +
 
 +
| jpy = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|¥&nbsp;|{{common string|Japanese Yen}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=jpy|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|¥&nbsp;|{{common string|Japanese Yen}}}}
 +
    }}
 +
 
 +
| krw = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|₩&nbsp;|{{common string|south korean won}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=krw|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|₩&nbsp;|{{common string|south korean won}}}}
 +
    }}
 +
 
 +
| try = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|₺|{{common string|turkish lira}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=try|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|₺|{{common string|turkish lira}}}}
 +
    }}
 +
 
 +
| cny = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|¥&nbsp;|{{common string|chinese yuan}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=cny|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|¥&nbsp;|{{common string|chinese yuan}}}}
 +
    }}
 +
 
 +
| hkd = <!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|HK$&nbsp;|{{common string|hong kong dollar}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=hkd|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|HK$&nbsp;|{{common string|hong kong dollar}}}}
 +
    }}
 +
 
 +
| pln = <!--
 +
  -->{{Item price/core|currency=pln|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|zł|{{common string|Złoty}}}}<!--
 +
  -->}}
 +
 
 +
| <!--
 +
  # All of the above neatly combined.
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=usd|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|$|{{common string|United States dollars}}}}
 +
    }}<!--
 +
 
 +
-->&#32;/&#32;<!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|{{common string|Pound sterling}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=gbp|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|£|{{common string|Pound sterling}}}}
 +
    }}<!--
 +
 
 +
-->&#32;/&#32;<!--
 +
  -->{{Item price/core|currency=eur|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|€|{{common string|Euros}}}}<!--
 +
 
 +
-->&#32;/&#32;<!--
 +
  -->{{Item price/core|currency=rub|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|{{common string|rubles}}|{{common string|rubles-tooltip}}}}<!--
 +
 
 +
-->&#32;/&#32;<!--
 +
  -->{{lang incomplete
 +
    | en = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|R$&nbsp;|{{common string|reais}}}}
 +
    | ru = {{ns:0}}
 +
    }}<!--
 +
  -->{{Item price/core|currency=brl|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{lang incomplete
 +
    | en = {{ns:0}}
 +
    | ru = {{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|R$&nbsp;|{{common string|reais}}}}
 +
    }}<!--
 +
 
 +
-->&#32;/&#32;<!--
 +
  -->{{Item price/core|currency=pln|item={{{item|{{BASEPAGENAME}}}}}}}<!--
 +
  -->{{{{#ifeq:{{{tooltips|yes}}}|yes|tooltip|1}}|zł|{{common string|Złoty}}}}
  
| ALL
 
| #default = {{#ifeq:{{Item price/core|currency=USD|item={{{item|{{BASEPAGENAMEE}}}}}}}|-|NULL|<!--
 
  -->{{tooltip|$|United States dollars}}{{Item price/core|currency=USD|item={{{item|{{BASEPAGENAMEE}}}}}}}<!--
 
-->}}{{#ifeq:{{Item price/core|currency=GBP|item={{{item|{{BASEPAGENAMEE}}}}}}}|-|NULL|<!--
 
  -->&#32;/&#32;{{tooltip|£|Pound sterling}}{{Item price/core|currency=GBP|item={{{item|{{BASEPAGENAMEE}}}}}}}<!--
 
-->}}{{#ifeq:{{Item price/core|currency=EUR|item={{{item|{{BASEPAGENAMEE}}}}}}}|-|NULL|<!--
 
  -->&#32;/&#32;{{Item price/core|currency=EUR|item={{{item|{{BASEPAGENAMEE}}}}}}}{{tooltip|€|Euros}}<!--
 
-->}}
 
 
}}<noinclude>{{doc begin}}
 
}}<noinclude>{{doc begin}}
This is a template to display item prices. The prices themselves are defined in the template {{tl|Item price/core}}. This template acts as a container to ''display'' the item prices.
+
* {{tl|Item price}} is used to format prices with {{tl|tooltip}}s and the proper currency symbols.
 +
* {{tl|Item price/core}} is used to get the price directly.
 +
* '''{{tl|Dictionary/price}}''' stores the actual price values. Edit them there.
 +
* To edit the translations for 'United States dollars', etc, please see {{tl|Dictionary/common strings}}.
  
 
=== Usage ===
 
=== Usage ===
* {{tlx|item price|USD}} on the article [[Black Box]] generates: {{item price|item=Black_Box|USD}}
+
* {{tlx|item price|2=currency=usd}} on the article [[Black Box]] generates: {{item price|item=Black Box|currency=usd}}
* {{tlx|item price|all|3=item=Familiar_Fez}} generates: {{item price|item=Familiar_Fez|all}}
+
* {{tlx|item price|2=item=Familiar Fez}} generates: {{item price|item=Familiar Fez}}
 +
* You can also remove the tooltips on the currency symbols: {{tlx|item price|3=item=Degreaser|4=tooltips=no}} generates: {{item price|item=Degreaser|tooltips=no}}
  
 
[[Category:Templates|Item price]]
 
[[Category:Templates|Item price]]
 
</noinclude>
 
</noinclude>

Latest revision as of 04:01, 12 February 2024

$Template:Dictionary/price/item price / £Template:Dictionary/price/item price / Template:Dictionary/price/item price / Template:Dictionary/price/item pricerub / R$ Template:Dictionary/price/item price / Template:Dictionary/price/item price

Documentation for Item price

Usage

  • {{item price|currency=usd}} on the article Black Box generates: $1.99
  • {{item price|item=Familiar Fez}} generates: $7.49 / £5.99 / 7.15 / 695rub / R$ 37.99 / 30.95
  • You can also remove the tooltips on the currency symbols: {{item price|item=Degreaser|tooltips=no}} generates: $1.99 / £1.59 / 1.89€ / 185rub / R$ 9.99 / 8.25zł