Module:Convert/text: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(new options for bn:: group 3-then-2; no plural unit names; new parameters: comma=5/gaps/gaps5)
(add spell option; use more commonly used comma rather than colon for list)
Line 161: Line 161:
cvt_no_num2 = { 'Need second value', 'general' },
cvt_no_num2 = { 'Need second value', 'general' },
cvt_no_unit = { 'Need name of unit', 'unknown' },
cvt_no_unit = { 'Need name of unit', 'unknown' },
cvt_unknown_option = { 'Ignored invalid option "%s"', 'option', warning = true },
cvt_should_be = { '%s', 'general', regex = unitcode_regex, replace = unitcode_replace },
cvt_should_be = { '%s', 'general', regex = unitcode_regex, replace = unitcode_replace },
cvt_spell_unavailable = { 'Spelling is not available', 'option', warning = true },
cvt_unknown = { 'Unit "%s" is not known', 'unknown' },
cvt_unknown = { 'Unit "%s" is not known', 'unknown' },
cvt_unknown_option = { 'Ignored invalid option "%s"', 'option', warning = true },
}
}


Line 215: Line 216:
["sortable"] = "sortable",
["sortable"] = "sortable",
["sp"] = "sp",
["sp"] = "sp",
["spell"] = "spell",
}
}


Line 261: Line 263:
["comma"] = "comma", -- join: ','
["comma"] = "comma", -- join: ','
["flip"] = "opt_flip", -- reverse order of input/output
["flip"] = "opt_flip", -- reverse order of input/output
["flip5"] = "opt_flip:opt_round5", -- disp=flip + disp=5
["flip5"] = "opt_flip, opt_round5", -- disp=flip + disp=5
["nocomma"] = "opt_nocomma", -- no numsep in input or output numbers
["nocomma"] = "opt_nocomma", -- no numsep in input or output numbers
["number"] = "opt_output_number_only",
["number"] = "opt_output_number_only",
Line 282: Line 284:
["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits
["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits
["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits
["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits
["gaps5"] = "opt_gaps:opt_comma5", -- opt_gaps + opt_comma5
["gaps5"] = "opt_gaps, opt_comma5", -- opt_gaps + opt_comma5
},
},
["lang"] = {
["lang"] = {
Line 299: Line 301:
["sp"] = {
["sp"] = {
["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre")
["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre")
},
["spell"] = { -- only English spelling is supported; only for input; not scientific notation; only some fractions
["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
},
},
}
}