Module:Convert/text: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(update from sandbox per Template talk:Convert:Module version 3) |
(update from sandbox per Template talk:Convert#Module version 4) |
||
Line 97: | Line 97: | ||
-- Text to join input value/unit with output value/unit. |
-- Text to join input value/unit with output value/unit. |
||
local disp_joins = { |
local disp_joins = { |
||
-- Position: before after between (wrt output; "between" is for a combination; default "; "). |
|||
["or"] = { " or " , "" }, |
["or"] = { " or " , "" , " or " }, |
||
["sqbr-sp"] = { " [" , "]" }, |
["sqbr-sp"] = { " [" , "]" }, |
||
["sqbr-nbsp"] = { " [" , "]" }, |
["sqbr-nbsp"] = { " [" , "]" }, |
||
Line 105: | Line 106: | ||
["slash-nosp"] = { "/" , "" }, |
["slash-nosp"] = { "/" , "" }, |
||
["b"] = { " (" , ")" }, |
["b"] = { " (" , ")" }, |
||
["(or)"] = { " (" , ")", " or " }, |
|||
["br"] = { "<br/>" , "" }, |
["br"] = { "<br/>" , "" }, |
||
} |
} |
||
Line 230: | Line 232: | ||
["5"] = "opt_round5", -- round output value to nearest 5 |
["5"] = "opt_round5", -- round output value to nearest 5 |
||
["b"] = "b", -- join: '(...)' |
["b"] = "b", -- join: '(...)' |
||
["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination |
|||
["br"] = "br", -- join: '<br/>' |
["br"] = "br", -- join: '<br/>' |
||
["comma"] = "comma", -- join: ',' |
["comma"] = "comma", -- join: ',' |
||
Line 252: | Line 255: | ||
["x"] = "x", -- join: <first>...<second> (user-specified text) |
["x"] = "x", -- join: <first>...<second> (user-specified text) |
||
}, |
}, |
||
-- frac=x is handled as a special case: x must be an integer (possibly in local language) = |
-- frac=x is handled as a special case: x must be an integer (possibly in local language) = 2 or more |
||
["lang"] = { -- language for output digits (both en and local digits are always accepted for input) |
|||
["lang"] = { |
|||
["en"] = "opt_lang_en", -- use en digits for |
["en"] = "opt_lang_en", -- use en digits for numbers, regardless of local language |
||
["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en) |
|||
}, |
}, |
||
["lk"] = { |
["lk"] = { |