Anonymous user
Module:Convert/text: Difference between revisions
Jump to navigation
Jump to search
"invalid option" is better than "unknown option" as it can be more than "unknown"; rework links in eng_scales
(add sortable=on, sp=us, customary_units; tweak) |
("invalid option" is better than "unknown option" as it can be more than "unknown"; rework links in eng_scales) |
||
Line 16:
-- Some units can be qualified with one of the following prefixes, when linked.
local customary_units = {
}
-- Names when using engineering notation (a prefix of "eN" where N is a number).
-- key = { "name",
-- If lk=on and link is defined, the name of the number will appear as a link.
local eng_scales = {
["3"] = { "thousand", exponent = 3 },
["6"] = { "million", exponent = 6 },
["9"] = { "billion", link = "
["12"] = { "trillion", link = "
["15"] = { "quadrillion", link = "
}
-- When appropriate, the following categories can be included in the output.
local all_categories = {
general =
mismatch =
option =
unknown =
}
Line 71 ⟶ 72:
cvt_no_num2 = { 'Need second value', 'general' },
cvt_no_unit = { 'Need name of unit', 'unknown' },
cvt_unknown_option = { 'Ignored
cvt_should_be = { '%s', 'general', regex = unitcode_regex, replace = unitcode_replace },
cvt_sigfig_pos = { 'sigfig "%s" must be positive', 'general' },
Line 79 ⟶ 80:
-- Text to join input value/unit with output value/unit.
local disp_joins = {
[
[
[
[
[
[
[
[
[
}
-- Text to separate values in a range.
local range_types = {
[
[
[
[
[
[
[
[
[
[
}
local range_aliases = {
[
[
[
[
[
[
[
}
|