Module:Convert/text: Difference between revisions

minor tweak
("invalid option" is better than "unknown option" as it can be more than "unknown"; rework links in eng_scales)
(minor tweak)
Line 130:
-- 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: TheAt option nameden.wiki, "abbr" in this module can be assigned the valueincludes:
-- ["comma"] = "opt_nocomma"
-- "comma" at en.wiki (abbr=comma). In that case, this script sets:
-- As a result, if the template uses abbr=comma, this script sets:
-- parms["opt_nocomma"] = true
-- parms["abbr"] = nil
-- The result is thatTherefore parms.abbr will be nil, or will have one of the listed values
-- listed values that do not start with "opt_".
local en_option_value = {
["abbr"] = {
Line 141 ⟶ 142:
["comma"] = "opt_nocomma", -- no numsep in input or output numbers
["in"] = "in", -- use symbol for LHS unit
["mos"] = "mos", -- in a range, repeat the input unit (no longer used)
["none"] = "off", -- old name for "off"
["off"] = "off", -- use name for all units
Line 147 ⟶ 148:
["out"] = "out", -- use symbol for RHS unit (default)
["values"] = "opt_values", -- show only input and output numbers, not units
["~"] = "opt_extraopt_also_symbol", -- show input unit symbol as well as name
},
["adj"] = {
Anonymous user