Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Convert/text and Module:Convert/text/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Created page with "-- Text used by Module:Convert for enwiki. -- This is a separate module to simplify translation for use on another wiki. -- See en:Template:Convert/Transwiki guide if copying to another wiki. -- Some units accept an SI prefix before the unit code, such as "kg" for kilogram. local SIprefixes = { -- The prefix field is what the prefix should be, if different from the prefix used. ['Q'] = { exponent = 30, name = 'quetta', }, ['R'] = { exponent = 27,..."
 
Created page with "-- Text used by Module:Convert for enwiki. -- This is a separate module to simplify translation for use on another wiki. -- See en:Template:Convert/Transwiki guide if copying to another wiki. -- Some units accept an SI prefix before the unit code, such as "kg" for kilogram. local SIprefixes = { -- The prefix field is what the prefix should be, if different from the prefix used. ['Q'] = { exponent = 30, name = 'quetta', }, ['R'] = { exponent = 27,..."
 
Line 188: Line 188:
["input"] = "input",
["input"] = "input",
["lang"] = "lang",
["lang"] = "lang",
["link"] = "lk",
["lk"] = "lk",
["lk"] = "lk",
["order"] = "order",
["order"] = "order",
Line 215: Line 216:
-- that do not start with "opt_".
-- that do not start with "opt_".
-- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated.
-- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated.
-- Options removed in January 2018 with remnants still in Module:Convert:
--    abbr=mos (in a range, repeat the input unit)
--    adj=1 (set opt_singular to make the unit name singular when 0 < abs(value) <= 1)
local en_option_value = {
local en_option_value = {
["$"] = 'TEXT',                    -- TEXT should be a currency symbol that will be used instead of "$"
["$"] = 'TEXT',                    -- TEXT should be a currency symbol that will be used instead of "$"
Line 240: Line 244:
["ri2"] = "opt_ri=2",          -- round input with precision = 2
["ri2"] = "opt_ri=2",          -- round input with precision = 2
["ri3"] = "opt_ri=3",          -- round input with precision = 3
["ri3"] = "opt_ri=3",          -- round input with precision = 3
["~"] = "opt_also_symbol",      -- same as abbr=~ so can have {{convert|1|C|K|abbr=off|adj=~}}
},
},
["altitude_ft"] = 'INTEGER',
["altitude_ft"] = 'INTEGER',
Line 276: Line 281:
},
},
["frac"] = 'INTEGER',
["frac"] = 'INTEGER',
["input"] = 'TEXT',                -- TEXT should be value><space><unitcode> or <wikidata-property-id>
["input"] = 'TEXT',                -- TEXT should be <value><space><unitcode> or <wikidata-property-id>
["lang"] = {                        -- language for output digits (both en and local digits are always accepted for input)
["lang"] = {                        -- language for output digits (both en and local digits are always accepted for input)
["en"] = "opt_lang_en",        -- use en digits for numbers, regardless of local language
["en"] = "opt_lang_en",        -- use en digits for numbers, regardless of local language