Anonymous user
Module:Convert/text: Difference between revisions
extra range types needed for ranges of more than two values
(add spell option; use more commonly used comma rather than colon for list) |
(extra range types needed for ranges of more than two values) |
||
Line 148:
cvt_bad_default = { 'Unit "%s" has an invalid default', 'unknown' },
cvt_bad_num = { 'Value "%s" must be a number', 'general' },
cvt_bad_prec = { 'Parameter precision "%s" must be an integer', 'general' },
cvt_bad_sigfig = { 'Parameter sigfig "%s" must be a positive integer', 'general' },
Line 159 ⟶ 158:
cvt_no_default = { 'Unit "%s" has no default output unit', 'unknown' },
cvt_no_num = { 'Need value', 'general' },
cvt_no_num2 = { 'Need
cvt_no_unit = { 'Need name of unit', 'unknown' },
cvt_should_be = { '%s', 'general', regex = unitcode_regex, replace = unitcode_replace },
Line 182 ⟶ 181:
-- Text to separate values in a range.
local range_types = {
["+"] = " + ",
[","] = ", ",
[", and"] = ", and ",
[", or"] = ", or ",
["by"] = " by ",
["-"] = "–",
["to about"] = " to about ",
["and"] = {
["or"] = {
["to"] = {
["to(-)"] = { off = " to ", on = "–" },
["xx"] = " × ",
["
▲ ["+/-"] = { ["off"] = " ± ", ["on"] = " ± ", ["adj"] = " ± " },
▲ ["x"] = { ["off"] = " by ", ["on"] = " × ", is_range_x = true },
}
|