-- Text used by Module:Convert, for enit.wikipedia.org (EnglishItalian).
-- imported and localized from :en:Module:Convert/text
-- This is a separate module to simplify translation for use on another wiki.
-- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki.
-- https://en.wikipedia.org/w/index.php?title=Module%3AConvert%2Ftext&type=revision&diff=895419771&oldid=676179811
local translation_table = {
numdot = ',', -- decimal mark
numsep = ' ', -- separator for number grouping
per_word = 'per', -- for units like "miles per gallon"
plural_suffix = '', -- disable plural unit names
specials = { -- for special processing by makeunits
-- PLEASE DO NOT CHANGE THE FOLLOWING
-- until all the units have been fixed
-- (the text used here must be the same as that used in the unit definitions).
utype = {
-- ["unit type in local language"] = "name_used_in_this_script"
["efficenza del carburante"] = "type_fuel_efficiency",
["lunghezza"] = "type_length",
["temperatura"] = "type_temperature",
["volume"] = "type_volume",
},
},
ucode = {
exception = {
-- ["unit code in local language"] = "name_used_in_module_convert"
["ft"] = "integer_more_precision",
["in"] = "subunit_more_precision",
["lb"] = "integer_more_precision",
},
},
istemperature = {
-- Common temperature scales (not keVT or MK).
-- ["unit code in local language"] = 1
["C"] = true,
["F"] = true,
["K"] = true,
["R"] = true,
},
},
usesymbol = {
-- Use unit symbol not name if abbr not specified.
-- ["unit code in local language"] = 1
["C"] = 1,
["F"] = 1,
["K"] = 1,
["R"] = 1,
["C-change"] = 1,
["F-change"] = 1,
["K-change"] = 1,
},
},
alttype = {
-- Unit has an alternate type that is a valid conversion.
-- ["unit code in local language"] = "alternate type in local language"
["Nm"] = "energia",
["ftlb"] = "momento meccanico",
["ftlb-f"] = "momento meccanico",
["ftlbf"] = "momento meccanico",
["inlb"] = "momento meccanico",
["inlb-f"] = "momento meccanico",
["inlbf"] = "momento meccanico",
["inoz-f"] = "momento meccanico",
["inozf"] = "momento meccanico",
},
},
},
},
},
mtext = {
-- Text used by Module:Convert/makeunits.
titles = {
-- name_used_in_this_script = "Title of page"
conversion_data = 'ModuleTemplate:ConvertConverti/manMan/conversionConversion data/man',
},
},
},
}
-- 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.
['Y'] = { exponent = 24, name = 'yotta', },
['Z'] = { exponent = 21, name = 'zetta', },
['E'] = { exponent = 18, name = 'exa' , },
['P'] = { exponent = 15, name = 'peta' , },
['T'] = { exponent = 12, name = 'tera' , },
['G'] = { exponent = 9, name = 'giga' , },
['M'] = { exponent = 6, name = 'mega' , },
['k'] = { exponent = 3, name = 'chilo' , },
['h'] = { exponent = 2, name = 'hectoetto', },
['da']= { exponent = 1, name = 'deca' , },
['d'] = { exponent = -1, name = 'deci' , },
['c'] = { exponent = -2, name = 'centi', },
['m'] = { exponent = -3, name = 'milli', },
['μ'] = { exponent = -6, name = 'micro', prefix = 'µ' }, -- key = 'GREEK SMALL LETTER MU' (U+03BC) utf-8 CE BC
['µ'] = { exponent = -6, name = 'micro', prefix = 'μ'}, -- key = 'MICRO SIGN' (U+00B5) utf-8 C2 B5
['u'] = { exponent = -6, name = 'micro', prefix = 'µμ' }, -- not an SI prefix, but allow for people typing this
['n'] = { exponent = -9, name = 'nano' , },
['p'] = { exponent =-12, name = 'pico' , },
['f'] = { exponent =-15, name = 'femto', },
['a'] = { exponent =-18, name = 'atto' , },
['z'] = { exponent =-21, name = 'zepto', },
['y'] = { exponent =-24, name = 'yocto', },
}
-- Some units can be qualified with one of the following prefixes, when linked.
local customary_units = {
{ "US", link = "Sistema consuetudinario statunitense" },
{ "U.S.", link = "Sistema consuetudinario statunitense" },
{ "imperial", link = "Sistema imperiale britannico" },
{ "imp", link = "Sistema imperiale britannico" },
}
-- If lk=on and link is defined, the name of the number will appear as a link.
local eng_scales = {
["3"] = { "migliaiomigliaia di", exponent = 3 },
["6"] = { "milionemilioni di", exponent = 6 },
["9"] = { "miliardomiliardi di", link = "Miliardo", exponent = 9 },
["12"] = { "bilione di", link = "Bilione", exponent = 12 },
["15"] = { "biliardo di", link = "Biliardo (numero)", exponent = 15 },
}
-- One of the following categories is included in the text of each message.
local all_categories = {
unit = "[[Categoria:Errori deldi modulocompilazione convert - unità di misuradel nontemplate valideConverti]]",
option = "[[Categoria:Errori deldi modulocompilazione convert - opzionidel nontemplate valideConverti]]",
warning = '[[Category:Convert invalid options]]',
tracking = '[[Category:Convert tracking]]',
}
-- All messages that may be displayed if a problem occurs.
local all_messages = {
-- Message format string, %s parameters: anchor, $1=title, $2=text, $3=category, $4=anchor.
-- Each displayed message starts with "Convert:" so can easily locate by searching article.
cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i>[[HelpTemplate:Convert messagesConverti/Man/Messaggi#%s$4|<span title="ConvertConverti: %s$1">convertconverti: %s$2</span>]]</i>]</sup>%s$3<span class="error"></span>',
cvt_format2 = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[[HelpTemplate:Convert messagesConverti/Man/Messaggi#%s$4|<span title="ConvertConverti: %s$1">%s$2</span>]]</sup>%s$3<span class="error"></span>',
cvt_format_preview = '<strong class="error">Errore in converti: $1 [[Template:Converti/Man/Messaggi#$4|(aiuto)]]</strong>$3',
-- Each of following messages is a table:
-- Each of following messages is a table:
-- { [1] = 'title', -- mouseover title text
-- { [21] = 'texttitle', -- linkmouseover title text displayed in article
-- [32] = 'category keytext', -- key tolink lookuptext categorydisplayed in all_categoriesarticle
-- [43] = 'anchorcategory key', -- anchor for linkkey to relevant sectionlookup oncategory helpin pageall_categories
-- [4] = 'anchor', -- anchor for link to relevant section on help page
-- regex = gsub_regex,
-- replaceregex = gsub_tablegsub_regex,
-- replace = gsub_table,
-- } Mouseover title text Link text CatKey Anchor
-- } cvt_bad_num = { 'Il valore "%s" deve essere un numero', Mouseover 'numerotitle nontext valido', 'option', 'invalid_number' }, Link text CatKey Anchor
cvt_bad_input = { 'L\'input "$1" deve essere un numero e unità di misura' , 'input non valido' , 'option', 'invalid_input' },
cvt_big_prec = { 'La precisione "%s" è troppo grande', 'precisione troppo grande', 'option', 'precision_too_large' },
cvt_bad_num = { 'Il cvt_invalid_numvalore "$1" deve essere = { 'Overflow aritmetico delun numero', 'overflownumero non aritmeticovalido', 'option', 'number_overflowinvalid_number' },
cvt_no_num cvt_big_prec = { 'ServeLa ilprecisione numero"$1" daè convertiretroppo grande', 'serveprecisione untroppo numerogrande', 'option', 'needs_numberprecision_too_large' },
cvt_no_num2 cvt_invalid_num = { 'ServeOverflow unaritmetico altrodel numero per un intervallo', 'serveoverflow un altro numeroaritmetico', 'option', 'needs_another_numbernumber_overflow' },
cvt_bad_frac cvt_no_num = { 'IlManca frazionaleil "%s"numero deveda essere un intero maggiore di 1convertire', 'frazioneserve nonun validanumero', 'option', 'invalid_fractionneeds_number' },
cvt_bad_prec cvt_no_num2 = { 'LaManca precisioneun "%s"altro devenumero essere un interoall\'intervallo', 'precisioneserve nonun altro validanumero', 'option', 'invalid_precisionneeds_another_number' },
cvt_bad_sigfig cvt_bad_frac = { 'sigfigA "%s$1" deve essereserve un numero intero positivomaggiore di 1', 'sigfigfrazione non validovalida', 'option', 'invalid_sigfiginvalid_fraction' }, },
cvt_empty_option cvt_bad_prec = { 'OpzioneLa vuotaprecisione "%s$1" ignoratadeve essere un numero intero', 'opzioneprecisione vuotanon valida', 'option', 'empty_optioninvalid_precision' },
cvt_bad_sigfig = { '"$1" deve essere un numero intero positivo', 'sigfig non valido', 'option', 'invalid_sigfig'},
cvt_deprecated = { 'Opzione "%s" deprecata', '*', 'option', 'opzione deprecata', format = 'cvt_format2' },
cvt_no_spell cvt_empty_option = { 'SpellingOpzione isvuota not"$1" availableignorata', 'bug, ask foropzione helpvuota', 'option', 'ask_for_helpempty_option' },
cvt_unknown_option cvt_deprecated = { 'Opzione "%s$1" no validadeprecata', è stata ignorata'*', 'opzione non validaoption', 'opzione 'optiondeprecata', format = 'invalid_optioncvt_format2', nowarn=true }, -- },fatto
cvt_bad_default cvt_no_spell = { 'L\'unitàSpelling diis misuranot "%s" ha un valore di default non validoavailable', 'bug, ask for help', 'unitoption', 'ask_for_help' },
cvt_bad_unit cvt_unknown_option = { 'LIgnorata l\'unità di misuraopzione "%s$1" non è valida', 'unità di misuraopzione non valida', 'unitoption', 'unit_invalid_hereinvalid_option' },
cvt_wd_fail = { 'Non in grado di accedere a Wikidata' , 'problema con wikidata' , 'option', 'wikidata_problem' }, --TODO documentazione errore
cvt_no_default = { 'L\'unità di misura "%s" non ha un\'unità di conversione valida', 'bug, ask for help', 'unit', 'ask_for_help' },
cvt_no_unit cvt_bad_default = { 'Serve il nome dellL\'unità di misura', "$1" 'nomeha dell\un valore di default non valido'unità, mancante'bug, chiedere assistenza', 'unit', 'needs_unit_nameask_for_help' },
cvt_unknown cvt_bad_unit = { 'Il nome dellL\'unità di misura "%s$1" non è statovalida riconosciutoqui', 'unità di misura sconosciutanon valida', 'unit', 'unknown_unitunit_invalid_here' },
cvt_no_default = { 'L\'unità di misura "$1" non ha un\'unità di conversione di default valida', 'bug, chiedere assitenza', 'unit', 'ask_for_help' },
cvt_should_be = { '%s', 'unità ambigua', 'unit', 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace },
cvt_mismatch cvt_no_unit = { 'NonManca possoil convertirenome ldell\'unità di misura "%s" in "%s"', 'nome dell\'unità di misura non compatibilimancante', 'unit', 'unit_mismatchneeds_unit_name' },
cvt_bug_convert cvt_unknown = { 'Bug:Unità nondi possomisura convertire"$1" tra le unità specificatesconosciuta', 'bug,unità askdi formisura helpsconosciuta', 'unit', 'ask_for_helpunknown_unit' },
cvt_should_be = { '$1', 'unità ambigua', 'unità ambigua', 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace },
cvt_lookup = { 'L\'unità "%s" non è definitia correttamente', 'bug, ask for help', 'unit', 'ask_for_help' },
cvt_mismatch = { 'Non posso convertire da "$1" a "$2"', 'unità di misura incompatibili', 'unit', 'unit_mismatch' },
cvt_bug_convert = { 'Bug: non posso convertire tra le unità specificate', 'bug, ask for help', 'unit', 'ask_for_help' },
cvt_lookup = { 'L\'unità "$1" non è definita correttamente', 'bug, chiedere assistenza', 'unit', 'ask_for_help' },
}
-- Text to join input value/unit with output value/unit.
local disp_joins = {
-- [1]=before output, [2]=after output, [3]=between outputs in a combination; default "; "
-- [wantname] gives default abbr=off
["or"] = { " o " , "" , " o ", wantname = true },
["sqbr-sp"] = { " [" , "]" },
["sqbr-nbsp"] = { " [" , "]" },
["comma"] = { ", " , "" , ", " },
["slash-sp"] = { " / " , "" , wantname = true },
["slash-nbsp"] = { " / ", "" , wantname = true },
["slash-nosp"] = { "/" , "" , wantname = true },
["b"] = { " (" , ")" },
["(or)"] = { " (" , ")", " or " },
["br"] = { "<br />" , "" , wantname = true },
["br()"] = { "<br />(" , ")", wantname = true },
}
-- Text to separate values in a range.
local range_types = {
-- Specifying a table requires either:
-- * "off" and "on" values (for "abbr=off" and "abbr=on"), or
-- * "input" and "output" values (for LHS and RHS);
-- other fields are optional.
-- When "adj=on|abbr=off" applies, spaces in range text are replaced with hyphens.
-- With "exception = true", that also occurs with "adj=on|abbr=on".
-- If "adj" is defined here, that text (unchanged) is used with "adj=on".
["+"] = " + ",
[","] = ", ",
[", and"] = " e ",
[",ed ori"] = " oed i ",
["by, or"] = " byo ",
["-by"] = "– per ",
["-"] ["to about"] = " a circa –",
["to about"] = " fino a circa ",
["and"] = { off = " and ", on = " and ", exception = true },
["and(-)"] = { inputoff = " ande ", outputon = "– e " },
["orand(-)"] = { offinput = " ore " , onoutput = " or –" , exception = true },
["toor"] = { off = " too " , on = " too " , exception = true },
["to(-)"] = { inputoff = " to fino a " , outputon = "– fino a " },
["to(-)"] = { input = " a ", output = "–" }, ["+/-"] = { off = " ± ", on = " ± ", adj = " ± ", is_range_change = true },
["by(x)"] = { input = " byper ", output = " × ", out_range_x = true },
["x"] = { off = " byper ", on = " × ", abbr_range_x = true },
["xx"] = " × ",
["X"] = { off = " by ", on = " × " }, -- TEMPORARY and undocumented option for experiments to compare with new abbr_range_x
["xx*"] = " × ",
["*/"] = "× / ", -- usefor "*"a totable replaceof "x" in {{converthigh/2}}low whichtemperatures is different from "x" in oldwith {{convert|83|/|63|F|disp=br()|abbr=values}}
}
local range_aliases = {
-- ["alternative name for a range"] = "standard range name"
["&"] = "and",
["–"] = "-",
["–"] = "-",
["toa-"] = "to(-)",
["×@"] = "xto(-)",
["××"] = "x",
["±×"] = "+/-x",
["±±"] = "+/-",
["±"] = "+/-",
["o"] = "or",
["e(-)"] = "and(-)",
["per"] = "x",
["per(x)"] = "by(x)",
["fino a"] = "to",
["fino a(-)"] = "to(-)",
["fino a circa"] = "to about"
}
local ranges = {
types = range_types,
aliases = range_aliases,
words = range_words,
}
-- Valid option names.
local en_option_name = {
-- ["local text for option name"] = "en name used in this module"
["$"] = "$",
["abbr"] = "abbr",
["adj"] = "adj",
["comma"] = "comma",
["debug"] = "debug",
["disp"] = "disp",
["frac"] = "frac",
["langinput"] = "langinput",
["lklang"] = "lklang",
["nearlk"] = "nearlk",
["order"] = "order",
["roundqid"] = "roundqid",
["sigfigqual"] = "sigfigqual",
["qualifier"] = "qual",
["sing"] = "adj", -- "sing" is an old alias for "adj"
["sortableround"] = "sortableround",
["spsigfig"] = "spsigfig",
-- ["sing"] = "adj", -- "sing" is an old alias for "adj"
["spell"] = "spell",
["styleinsortable"] = "styleinsortable",
-- ["styleoutsp"] = "styleoutsp",
-- ["spell"] = "spell",
["stylein"] = "stylein",
["styleout"] = "styleout",
["tracking"] = "tracking",
}
-- Convention: parms.opt_xxx refers to an option that is set here
-- (not intended to be set by the template which invokes this module).
-- Example: At en.wikienwiki, "abbr" includes:
-- ["comma"] = "opt_nocomma"
-- As a result, if the template uses abbr=comma, this scriptModule:Convert sets:
-- parms["opt_nocomma"] = true
-- parms["abbr"] = nil
-- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated.
local en_option_value = {
-- $=x is handled as a special case: x should be a currency symbol that will be used instead of "$"
["abbr"] = {
-- ["local text for option value"] = "en value used in this module"
["def"] = "", -- ignored (some wrapper templates call convert with "abbr=def" to mean "default abbreviation")
["comma"] = "opt_nocomma?", -- no numsep in input or output numbers
["defh"] = "on", -- ignoredabbr=on (some+ wrapper templates call convert withuse "abbr=defh" tofor meanhand "unit (default abbreviation")
["hhh"] = "onopt_hand_hh", -- abbr=on + use "hhh" for hand unit (default)
["hhin"] = "opt_hand_hhin", -- abbr=on + use "hh"symbol for handLHS unit
["innone"] = "inoff", -- useold symbolname for LHS unit"off"
["mosoff"] = "mosoff", -- in a range, repeat the inputuse unitname (nofor longerall used)units
["noneon"] = "offon", -- olduse namesymbol for "off"all units
["offout"] = "offout", -- use namesymbol for allRHS unit units(default)
["onvalues"] = "onopt_values", -- show only input and output numbers, -- use symbol for allnot units
["out~"] = "outopt_also_symbol", -- show input -- useunit symbol foras RHSwell unitas (default)name
--- localizzazioni in italiano
["values"] = "opt_values", -- show only input and output numbers, not units
["~valori"] = "opt_also_symbolopt_values", -- show only input unitand symboloutput as wellnumbers, asnot nameunits
},
["adj"] = {
["mid"] = "opt_adjectival, opt_adj_mid", -- adj=on with user-specified text after input unit (between input and output)
["1"] = "opt_singular", -- unit name is singular when value satisfies: (-1 <= v and v < 0) or (0 < v and v <= 1)
["flipoff"] = "opt_flip?", -- reverseignored (off orderis ofthe input/outputdefault)
["jon"] = "opt_use_nbspopt_adjectival", -- "join":unit usename " "is instead of " " between valuesingular and unit namehyphenated
["midpre"] = "opt_adjectival, opt_adj_midopt_one_preunit", -- adj=on with user-specified text afterbefore input unit (between input and output)
["nocommari0"] = "opt_nocomma?opt_ri=0", -- no numsep in -- round input orwith outputprecision = numbers0
["offri1"] = "opt_ri=1", -- ignoredround (offinput iswith theprecision = default)1
["onri2"] = "opt_adjectivalopt_ri=2", -- unitround nameinput iswith singularprecision and= hyphenated2
["preri3"] = "opt_one_preunitopt_ri=3", -- user-specifiedround textinput beforewith inputprecision = unit3
},
["ri0"] = "opt_ri=0", -- round input with precision = 0
["comma"] = {
["ri1"] = "opt_ri=1", -- round input with precision = 1
["ri25"] = "opt_ri=2opt_comma5", -- roundonly inputuse withnumsep precisiongrouping =if 5 or more 2digits
["ri3gaps"] = "opt_ri=3opt_gaps", -- rounduse inputgaps, withnot precisionnumsep, =to separate groups of 3digits
["gaps3"] = "opt_gaps, opt_gaps3", -- group only in threes rather than default of no gap before a single digit after decimal mark
},
["off"] = "opt_nocomma", -- no numsep in input or output numbers
["comma"] = {
},
["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits
["debug"] = {
["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits
["yes"] = "opt_sortable_debug", -- make the normally hidden sort key visible
["gaps3"] = "opt_gaps, opt_gaps3", -- group only in threes rather than default of no gap before a single digit after decimal mark
},
["gaps5"] = "opt_gaps?", -- deprecated 2015-05-29, was: opt_gaps + opt_comma5
["disp"] = {
["off"] = "opt_nocomma", -- no numsep in input or output numbers
["5"] = "opt_round=5", -- round output value to nearest 5
},
["b"] = "b", -- join: '(...)'
["debug"] = {
["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination
["yes"] = "opt_sortable_debug", -- make the normally hidden sort key visible
["br"] = "br", -- join: '<br />'
},
["br()"] = "br()", -- join: '<br />(...)'
["disp"] = {
["/comma"] = "or?comma", -- seejoin: "slash"','
["2flip"] = "opt_output_only?opt_flip", -- display only output value and symbol/name-- reverse order (notof input)/output
["5number"] = "opt_round=5opt_output_number_only", -- display output value (not input, and -- roundnot output value to nearest 5symbol/name)
["bor"] = "bor", -- join: '(...)or'
["out"] = "opt_output_only",
["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination
["output number only"] = "opt_output_number_only",
["br"] = "br", -- join: '<br />'
["output only"] = "opt_output_only",
["br()"] = "br()", -- join: '<br />(...)'
["preunit"] = "opt_two_preunits", -- user-specified text before input and output units
["comma"] = "comma", -- join: ','
["flipsqbr"] = "opt_flipsqbr", -- reversejoin: order of input/output'[...]'
["table"] = "opt_table", -- output is suitable for a table cell with align="right"
["flip5"] = "opt_flip, opt_round=5?", -- disp=flip + disp=5
["tablecen"] = "opt_tablecen", -- output is suitable for a table cell with align="center"
["nocomma"] = "opt_nocomma?", -- no numsep in input or output numbers
["numberunit"] = "opt_output_number_onlyopt_input_unit_only", -- display outputinput valuesymbol/name (not inputoutput, and not outputinput symbol/namevalue)
["unit or text"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known
["or"] = "or", -- join: 'or'
["outunit2"] = "opt_output_onlyopt_output_unit_only",
["x"] = "x", -- join: <first>...<second> (user-specified text)
["output number only"] = "opt_output_number_only",
-- localizzazioni in italiano
["output only"] = "opt_output_only",
["(o)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination
["preunit"] = "opt_two_preunits", -- user-specified text before input and output units
["sinverti"] = "or?opt_flip", -- reverse order of -- see "slash"input/output
["inverti5"] = "opt_flip, opt_round=5?", -- disp=flip + disp=5
["slash"] = "or?", -- 2014-11-03: "disp=slash" is now equivalent to "disp=or" as slash is unhelpful
["sqbrnovirgola"] = "sqbropt_nocomma?", -- no numsep in input or output -- join: '[...]'numbers
["tablenumero"] = "opt_tableopt_output_number_only", -- display output isvalue suitable(not forinput, aand tablenot celloutput with align="right"symbol/name)
["tableceno"] = "opt_tablecenor", -- output is suitable for a table cell with align="center" -- join: 'or'
["u2preunità"] = "opt_output_unit_only?opt_two_preunits", -- displayuser-specified outputtext symbol/name (notbefore input, and not output value)units
["quadre"] = "sqbr", -- join: '[...]'
["unit"] = "opt_input_unit_only", -- display input symbol/name (not output, and not input value)
["risultato"] = "opt_output_only",
["unit or text"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known
["valore risultato"] = "opt_output_number_only",
["unit2"] = "opt_output_unit_only",
["tabella"] = "opt_table", -- output is suitable for a table cell with align="right"
["x"] = "x", -- join: <first>...<second> (user-specified text)
["tabellac"] = "opt_tablecen", -- output is suitable for a table cell with align="center"
},
["unità"] = "opt_input_unit_only", -- display input symbol/name (not output, and not input value)
-- frac=x is handled as a special case: x must be an integer (possibly in local language) = 2 or more
["unità o testo"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known
["lang"] = { -- language for output digits (both en and local digits are always accepted for input)
["unità2"] = "opt_output_unit_only",
["en"] = "opt_lang_en", -- use en digits for numbers, regardless of local language
["virgola"] = "comma" -- join: ','
["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en)
},
-- frac=x is handled as a special case: x must be an integer (possibly in local language) = 2 or more
["lk"] = {
-- input=x is handled as a special case: x should be <value><space><unitcode> or <wikidata-property-id>
["in"] = "in", -- link LHS unit name or symbol
["lang"] = { ["off"] = "off", -- dolanguage notfor link:output samedigits as(both defaulten exceptand forlocal handdigits are always accepted for unitinput)
["onen"] = "onopt_lang_en", -- linkuse allen unitdigits namesfor ornumbers, symbols (but not twice forregardless theof samelocal unit)language
["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en)
["out"] = "out", -- link RHS unit name or symbol
},
["nearlk"] = {
["5in"] = "opt_round=5?in", -- roundlink outputLHS valueunit toname nearestor 5symbol
["off"] = "off", -- do not link: same as default except for hand unit
},
["on"] = "on", -- link all unit names or symbols (but not twice for the same unit)
["order"] = {
["flipout"] = "opt_flipout", -- reverselink RHS unit ordername ofor input/outputsymbol
["debug"] = "opt_sortable_on, opt_sortable_debug", -- |sortable=debug is the same as |sortable=on|debug=yes
},
},
["round"] = {
["order"] = {
["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5
["5flip"] = "opt_round=5opt_flip", -- roundreverse outputorder valueof to nearest 5input/output
["10out"] = "opt_round=10opt_order_out", -- do not show input; instead, use --order roundin output valuecombination, towith nearestthe 10first (sameoutput shown as butthe clearer than "|-1")input
},
["25"] = "opt_round=25", -- round output value to nearest 25
-- qid=x is handled as a special case: x should be a Wikidata Q item identifier.
["50"] = "opt_round=50", -- round output value to nearest 50
-- qual=x is handled as a special case: x should be a Wikidata Q item identifier.
["each"] = "opt_round_each", -- using default precision in a range, round each output separately (default uses highest precision of each item in range)
["round"] = {
},
["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5
-- sigfig=x is handled as a special case: x must be an integer (possibly in local language) = 1 or more
["0,5"] = "opt_round=0.5", -- round output value to nearest 0.5
["sortable"] = {
["off5"] = "opt_round=5", -- ignoredround output (offvalue isto thenearest default)5
["in10"] = "opt_sortable_on?opt_round=10", -- round output value to nearest 10 (same as but clearer than "on|-1")
["on25"] = "opt_sortable_onopt_round=25", -- output sort key-- forround use in a sortable table, based onoutput value from converting to a standard basenearest unit25
["out50"] = "opt_sortable_on?opt_round=50", -- sameround asoutput "on"value to nearest 50
["each"] = "opt_round_each", -- using default precision in a range, round each output separately (default uses highest precision of each item in range)
},
},
["sp"] = {
-- sigfig=x is handled as a special case: x must be an integer (possibly in local language) = 1 or more
["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre")
["sortable"] = {
},
["spelloff"] = { "", -- onlyignored English spelling(off is supported; not scientific notation; only somethe fractionsdefault)
["on"] = "opt_sortable_on", -- output sort key for use in a sortable table, based on value from converting to a standard base unit
["in"] = "opt_spell_in", -- spell input value in words
["debug"] = "opt_sortable_on, opt_sortable_debug", -- |sortable=debug is the same as |sortable=on|debug=yes
["In"] = "opt_spell_in, opt_spell_upper", -- spell input value in words with first letter uppercase
},
["on"] = "opt_spell_in, opt_spell_out", -- spell input and output values in words
-- ["sp"] = {
["On"] = "opt_spell_in, opt_spell_out, opt_spell_upper", -- same, with first letter of first word in result uppercase
-- ["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre")
},
-- },
-- stylein=x is handled as a special case: x can be any text
-- ["spell"] = { -- only English spelling is supported; not scientific notation; only some fractions
-- styleout=x is handled as a special case: x can be any text
-- ["in"] = "opt_spell_in", -- spell input value in words
-- ["In"] = "opt_spell_in, opt_spell_upper", -- spell input value in words with first letter uppercase
-- ["on"] = "opt_spell_in, opt_spell_out", -- spell input and output values in words
-- ["On"] = "opt_spell_in, opt_spell_out, opt_spell_upper", -- same, with first letter of first word in result uppercase
-- },
-- stylein=x is handled as a special case: x can be any text
-- styleout=x is handled as a special case: x can be any text
-- tracking=x is handled as a special case: x can be any text
}
return {
SIprefixes = SIprefixes,
all_categories = all_categories,
all_messages = all_messages,
currency = { ['$'] = true, ['£'] = true, ['€'] = true, ['₱'] = true, ['₽'] = true, ['¥'] = true },
customary_units = customary_units,
disp_joins = disp_joins,
en_option_name = en_option_name,
en_option_value = en_option_value,
eng_scales = eng_scales,
ranges = ranges,
translation_table = translation_table,
}
|