Module:Convert/text and Module:Convert/text/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
update from sandbox per Template talk:Convert#Module version 31 |
add tilde (~) for uncertainty notation + associated error message |
||
| Line 89: | Line 89: | ||
cvt_bad_frac = { '"$1" needs an integer above 1' , 'invalid fraction' , 'option', 'invalid_fraction' }, |
cvt_bad_frac = { '"$1" needs an integer above 1' , 'invalid fraction' , 'option', 'invalid_fraction' }, |
||
cvt_bad_prec = { 'Precision "$1" must be an integer' , 'invalid precision' , 'option', 'invalid_precision' }, |
cvt_bad_prec = { 'Precision "$1" must be an integer' , 'invalid precision' , 'option', 'invalid_precision' }, |
||
cvt_bad_range = { 'Invalid range' , 'invalid range' , 'option', 'invalid_range' }, |
|||
cvt_bad_sigfig = { '"$1" needs a positive integer' , 'invalid sigfig' , 'option', 'invalid_sigfig' }, |
cvt_bad_sigfig = { '"$1" needs a positive integer' , 'invalid sigfig' , 'option', 'invalid_sigfig' }, |
||
cvt_empty_option = { 'Ignored empty option "$1"' , 'empty option' , 'option', 'empty_option' }, |
cvt_empty_option = { 'Ignored empty option "$1"' , 'empty option' , 'option', 'empty_option' }, |
||
| Line 151: | Line 152: | ||
["*"] = "×", |
["*"] = "×", |
||
["/"] = " / ", -- for a table of high/low temperatures with {{convert|83|/|63|F|disp=br()|abbr=values}} |
["/"] = " / ", -- for a table of high/low temperatures with {{convert|83|/|63|F|disp=br()|abbr=values}} |
||
["~"] = "uncertainty", |
|||
} |
} |
||
| Line 166: | Line 168: | ||
-- In addition, the following "words" are accepted without spaces, for example, {{convert|1-2|ft}}. |
-- In addition, the following "words" are accepted without spaces, for example, {{convert|1-2|ft}}. |
||
-- Words must be in correct order for searching, for example, 'x' after 'xx'. |
-- Words must be in correct order for searching, for example, 'x' after 'xx'. |
||
local range_words = { '-', '–', 'xx', 'x', '*' } |
local range_words = { '-', '–', 'xx', 'x', '*', '~' } |
||
local ranges = { |
local ranges = { |
||
| Line 302: | Line 304: | ||
["round"] = { |
["round"] = { |
||
["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5 |
["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5 |
||
["1"] = "opt_round=1", -- round output value to nearest 1 (same as but clearer than "|0") |
|||
["5"] = "opt_round=5", -- round output value to nearest 5 |
["5"] = "opt_round=5", -- round output value to nearest 5 |
||
["10"] = "opt_round=10", -- round output value to nearest 10 (same as but clearer than "|-1") |
["10"] = "opt_round=10", -- round output value to nearest 10 (same as but clearer than "|-1") |
||