Template:ShipCost

From HandWiki
Revision as of 19:40, 13 November 2022 by MainEditor (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Template documentation[view] [edit] [history] [purge]


Purpose

The purpose of this template is to abstract and format ship costs.

Currently configured so no adjustments or conversions are applied.

Usage

{{ShipCost|country|value|currency_units|year=|origin=|r=|force=|lk=|exact=|qty=|tot=|suffix=|est=|ref=|mode=}}

Parameters

A description of the template's parameters are listed below.

Field name Usage Example Description
country_code mandatory GBR The country code of the currency, see the examples to find out what is currently supported. EUR for Euro (inflation adjustment would require using a country-specific code).
value mandatory 10000.01 The value, in the country_code currency, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234).
currency_units optional m Used to represent smaller or larger numbers. Available options are as follows.
  • ct – to represent cent(s)
  • p – to represent penny (pence)
  • pa – to represent paisa (paise) (generalized to mean cents)
  • po – to represent poysha (generalized to mean cents)
  • ba – to represent baisa(s) (generalized to mean 1/1000)
  • k – to represent thousand(s)
  • m – to represent million(s)
  • b – to represent short scale billion(s)
  • t – to represent short scale trillion(s)
  • l – to represent lakh(s)
  • c – to represent crore(s)
  • lc – to represent lakh crore(s)
  • Brackets in the sense may be singular (or) plural.

The Indian units can be applied to any currency.

lk optional lk=on This parameter gives you the option of internally linking currency names (paise, which is generalized here to mean cents in the source currency) and/or number names (billion, trillion, lakh, crore). By default, the parameter is set to "off" (i.e. it is set not to link). Available options are as follows.
  • on – to link all units
  • source – to link the source value
  • original – to link the values in the original currency
  • inflated – to link the inflated value in the original currency
  • result – to link the inflated and converted vales
  • converted – to link the converted value
  • source-converted – to link the source and converted values
year optional year=2002 This parameter allows entering values from previous years. The year will be displayed and historic values will be inflated to the latest year available in {{Inflation}} if index is also provided then converted by {{ToUSD}}. If no index name is present, the conversion will be attempted for the year indicated (but see force). If year is not provided, just a conversion will be performed at the most current rate available.
origin optional origin=ESP The country code of the shipyard's location, by default that corresponding to the currency is assumed (no country assumed for Euro).
r optional r=3 Sets the digits to which the results must be rounded. A negative value indicates rounding to an upper significant digit, and a positive value indicates a fractional digit including trailing zeros. Defaults to 2.
force optional force=yes This parameter allows to force a conversion at the most current rate available when data is lacking for the provided year when its value is yes.
exact optional exact=source This provides some control over formatting. source requests to display the input value normally (in American fashion) after applying the units. on does this for both the input and result values. Otherwise all values will be displayed as per {{Format price}}.
qty optional qty=first This allows adding a phrase that indicates to how many or which units the cost applies to.
tot optional tot=yes yes indicates that the cost includes technology transfer.
suffix optional suffix=and training facilities This allows appending an arbitrary wikitext to the output.
est optional est=yes yes indicates that the cost is estimated.
ref optional ref=<ref>some wikitext ref</ref> This allows displaying one or more references. Each one must consist of a ref wikitext element. The placement of the references is normalized (currently after the year, but this might be changed in the future).
mode optional mode=historical This parameter allows to disable adjustment even if the template is configured to enable it.

Examples

ShipCost syntax Results
{{ShipCost|ARG|3600000}} ARS FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|ARG|3600000|year=1992}} ARS FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1992)
{{ShipCost|ARG|3600000|year=1991}} Year not supported
{{ShipCost|AUS|3.6|m}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|AUS|3600000}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|AUS|3654000|year=1962}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|AUS|3654000|year=1962|origin=AUS}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|AUS|3654000|year=1962|origin=ESP}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|AUS|3654000|year=1962|r=3|ref=<ref name="qv">something1</ref>}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)[1]
{{ShipCost|AUS|3.6|m|qty=}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|AUS|3.6|m|qty=first}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" for the first unit
{{ShipCost|AUS|3.6|m|qty=1}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" per unit
{{ShipCost|AUS|3.6|m|qty=8}} A$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" for 8 units
{{ShipCost|AUS|3650000|year=1962|exact=on|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2]
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|suffix= + [[Technology transfer|ToT]]|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2] for 8 units + ToT
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2] for 8 units + ToT
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2] for 8 units + ToT and training facilities
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|est=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2] for 8 units + ToT and training facilities (est.)
{{ShipCost|AUS|3650000|year=1962|exact=on|mode=historical|qty=8|tot=yes|est=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$Template:FXConvert/Formatnum (1962)[1][2] for 8 units + ToT and training facilities (est.)
{{ShipCost|BEL|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|BEL|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|BEL|3600000|year=1998}} BEF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|BEL|3600000|year=1947}} BEF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1947)
{{ShipCost|BEL|3600000|year=1946}} Year not supported
{{ShipCost|BRA|3600000}} R$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|BRA|3600000|year=1995}} R$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1995)
{{ShipCost|BRA|3600000|year=1994}} Year not supported
{{ShipCost|CAN|3600000}} CA$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|CAN|3600000|year=1962}} CA$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|CHN|3600000}} CN¥FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|CHN|3600000|year=1949}} CN¥FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1949)
{{ShipCost|CHN|3600000|year=1948}} Year not supported
{{ShipCost|GER|3600000}} Use DEU
{{ShipCost|GER|3600000|year=1999}} Use DEU
{{ShipCost|GER|3600000|year=1998}} Use DEU
{{ShipCost|GER|3600000|year=1949}} Use DEU
{{ShipCost|GER|3600000|year=1948}} Use DEU
{{ShipCost|DEU|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|DEU|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|DEU|3600000|year=1998}} DM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|DEU|3600000|year=1949}} DM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1949)
{{ShipCost|DEU|3600000|year=1948}} Year not supported
{{ShipCost|DNK|3600000}} DKK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|DNK|3600000|year=1874}} DKK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1874)
{{ShipCost|DNK|3600000|year=1873}} Year not supported
{{ShipCost|ESP|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|ESP|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|ESP|3600000|year=1998}}  FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|ESP|3600000|year=1869}}  FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1869)
{{ShipCost|ESP|3600000|year=1868}} Year not supported
{{ShipCost|EUR|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|EUR|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|FIN|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|FIN|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|FIN|3600000|year=1998}} FIM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|FIN|3600000|year=1861}} FIM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1861)
{{ShipCost|FIN|3600000|year=1860}} Year not supported
{{ShipCost|FRA|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|FRA|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|FRA|3600000|year=1998}} FRF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|FRA|3600000|year=1960}} FRF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1960)
{{ShipCost|FRA|3600000|year=1959}} FF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1959)
{{ShipCost|FRA|3600000|year=1796}} FF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1796)
{{ShipCost|FRA|3600000|year=1795}} Year not supported
{{ShipCost|GBR|3600000}} yes|yes|GB|}}£FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|GBR|3600000|year=1962}} yes|yes|GB|}}£FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|GRC|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|GRC|3600000|year=2001}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2001)
{{ShipCost|GRC|3600000|year=2000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2000)
{{ShipCost|GRC|3600000|year=1955}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1955)
{{ShipCost|GRC|3600000|year=1954}} Year not supported
{{ShipCost|HRV|3600000}} HRK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|HRV|3600000|year=1995}} HRK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1995)
{{ShipCost|HRV|3600000|year=1994}} Year not supported
{{ShipCost|IRL|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|IRL|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|IRL|3600000|year=1998}} IR£FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|IRL|3600000|year=1939}} IR£FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1939)
{{ShipCost|IRL|3600000|year=1038}} Year not supported
{{ShipCost|ITA|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|ITA|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|ITA|3600000|year=1998}} Lit. FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|ITA|3600000|year=1863}} Lit. FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1863)
{{ShipCost|ITA|3600000|year=1862}} Year not supported
{{ShipCost|JPN|3600000}} ¥FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|JPN|3600000|year=1962}} ¥FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|KOR|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|KOR|3600000|year=1962}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
{{ShipCost|LUX|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|LUX|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|LUX|3600000|year=1998}} LUF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|LUX|3600000|year=1945}} LUF FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1945)
{{ShipCost|LUX|3600000|year=1944}} Year not supported
{{ShipCost|MLT|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|MLT|3600000|year=2008}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2008)
{{ShipCost|MLT|3600000|year=2007}} Lm FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2007)
{{ShipCost|MLT|3600000|year=1973}} Lm FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1973)
{{ShipCost|MLT|3600000|year=1972}} Year not supported
{{ShipCost|MYS|3600000}} RM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|MYS|3600000|year=1976}} RM FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1976)
{{ShipCost|MYS|3600000|year=1975}} Year not supported
{{ShipCost|NLD|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|NLD|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|NLD|3600000|year=1998}} ƒFXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|NLD|3600000|year=1815}} ƒFXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1815)
{{ShipCost|NLD|3600000|year=1814}} Year not supported
{{ShipCost|NOR|3600000}} NOK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|NOR|3600000|year=1876}} NOK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1876)
{{ShipCost|NOR|3600000|year=1875}} Year not supported
{{ShipCost|NZL|3600000}} NZ$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|NZL|3600000|year=1968}} NZ$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1968)
{{ShipCost|NZL|3600000|year=1967}} Year not supported
{{ShipCost|PHL|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|PHL|3600000|year=1946}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1946)
{{ShipCost|PHL|3600000|year=1945}} Year not supported
{{ShipCost|POL|3600000}} PLN FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|POL|3600000|year=1995}} PLN FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1995)
{{ShipCost|POL|3600000|year=1994}} PLZ FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1994)
{{ShipCost|POL|3600000|year=1951}} PLZ FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1951)
{{ShipCost|POL|3600000|year=1950}} Year not supported
{{ShipCost|PRT|3600000}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|PRT|3600000|year=1999}} FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1999)
{{ShipCost|PRT|3600000|year=1998}} PTE FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1998)
{{ShipCost|PRT|3600000|year=1912}} PTE FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1912)
{{ShipCost|PRT|3600000|year=1911}} Year not supported
{{ShipCost|ROU|3600000}} RON FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|ROU|3600000|year=2006}} RON FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2006)
{{ShipCost|ROU|3600000|year=2005}} Year not supported
{{ShipCost|ROU|3600000|year=2004}} ROL FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (2004)
{{ShipCost|ROU|3600000|year=1953}} ROL FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1953)
{{ShipCost|ROU|3600000|year=1952}} Year not supported
{{ShipCost|ROU|3600000|year=1951}} Year not supported
{{ShipCost|SWE|3600000}} SEK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|SWE|3600000|year=1874}} SEK FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1874)
{{ShipCost|SWE|3600000|year=1873}} Year not supported
{{ShipCost|USA|3600}} US$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|USA|3600|year=1790}} US$FXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1790)
{{ShipCost|ZAF|3600000}} Template:ZARFXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale"
{{ShipCost|ZAF|3600000|year=1962}} Template:ZARFXConvert/Wordify error: cannot parse value "Template:FXConvert/Scale" (1962)
  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 something1
  2. 2.0 2.1 2.2 2.3 2.4 2.5 something2

See also

  • {{FXConvert}}: Inflates and converts a given currency to US dollars. It is used by {{ShipCost}}.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template in articles based on this TemplateData.

TemplateData for ShipCost

Template presents the cost of a ship.

Template parameters

ParameterDescriptionTypeStatus
Currency country code1

ISO 3166-1 alpha-3 country code of the currency, see the examples to find out what is currently supported. EUR for Euro (inflation adjustment would require using a country-specific code).

Example
GBR
Linerequired
Value2

The value, in the source, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234).

Example
500000000
Numberrequired
Currency units3

Use this to represent larger numbers such as crores, billions et al.

Example
c, lc, b, m, k, cr, p, pa, po, ba
Linesuggested
Linkinglk

Gives option to whether link currency names (paise, etc.) or number names (crores, lakhs, billions, trillions)

Example
on, off, source, original, inflated, result, converted, source-converted
Linesuggested
Yearyear

This parameter allows for inflation. Historic values will be inflated to the most current values available then converted.

Example
2015
Numbersuggested
Originorigin

ISO 3166-1 alpha-3 country code of the shipyard's location, by default that corresponding to the currency is assumed (no country assumed for Euro).

Example
ESP
Lineoptional
Rounding digitsr

Used to round significant digits. A value of "0" will drop paise or cent values from the converted number. By default the conversion will be rounded to two significant figures.

Example
0
Numberoptional
Forceforce

This parameter allows to force a conversion at the most current rate available when data is lacking for the provided year when its value is "yes".

Example
yes
Lineoptional
Exactexact

This provides some control over formatting. "source" requests to display the input value normally (in American fashion) after applying the units. "on" does this for both the input and result values. Otherwise all values will be displayed as per Format price.

Example
source, on
Lineoptional
Quantityqty

This allows adding a phrase that indicates to how many or which units the cost applies to.

Example
first, 1, 4
Lineoptional
Technology transfertot

yes indicates that the cost includes technology transfer

Example
yes
Lineoptional
Suffixsuffix

This allows appending an arbitrary wikitext to the output.

Example
and training facilities
Lineoptional
Estimatedest

yes indicates that the cost is estimated

Example
yes
Lineoptional
Referencesref

This allows displaying one or more references. Each one must consist of a ref wikitext element. The placement of the references is normalized (currently after the year, but this might be changed in the future).

Example
<ref>some wikitext ref</ref>
Contentsuggested
Modemode

This parameter allows to disable the adjustment even if the template is enabling it.

Default
(blank)
Example
historical
Lineoptional