Module:Convert/text: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
("invalid option" is better than "unknown option" as it can be more than "unknown"; rework links in eng_scales) |
(minor tweak) |
||
Line 130: | Line 130: | ||
-- Convention: parms.opt_xxx refers to an option that is set here |
-- Convention: parms.opt_xxx refers to an option that is set here |
||
-- (not intended to be set by the template which invokes this module). |
-- (not intended to be set by the template which invokes this module). |
||
-- Example: |
-- Example: At en.wiki, "abbr" includes: |
||
-- ["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["opt_nocomma"] = true |
||
-- parms["abbr"] = nil |
-- parms["abbr"] = nil |
||
-- |
-- Therefore parms.abbr will be nil, or will have one of the listed values |
||
-- |
-- that do not start with "opt_". |
||
local en_option_value = { |
local en_option_value = { |
||
["abbr"] = { |
["abbr"] = { |
||
Line 141: | Line 142: | ||
["comma"] = "opt_nocomma", -- no numsep in input or output numbers |
["comma"] = "opt_nocomma", -- no numsep in input or output numbers |
||
["in"] = "in", -- use symbol for LHS unit |
["in"] = "in", -- use symbol for LHS unit |
||
["mos"] = "mos", -- in range, repeat the input unit (no longer used) |
["mos"] = "mos", -- in a range, repeat the input unit (no longer used) |
||
["none"] = "off", -- old name for "off" |
["none"] = "off", -- old name for "off" |
||
["off"] = "off", -- use name for all units |
["off"] = "off", -- use name for all units |
||
Line 147: | Line 148: | ||
["out"] = "out", -- use symbol for RHS unit (default) |
["out"] = "out", -- use symbol for RHS unit (default) |
||
["values"] = "opt_values", -- show only input and output numbers, not units |
["values"] = "opt_values", -- show only input and output numbers, not units |
||
["~"] = " |
["~"] = "opt_also_symbol", -- show input unit symbol as well as name |
||
}, |
}, |
||
["adj"] = { |
["adj"] = { |