Module:Val and Module:Val/sandbox: Difference between pages
(Difference between pages)
Content deleted Content added
use i18n from Module:Val/sandbox added by User:Moroboshi |
reverse syncing, completely forgot that I had already worked on this lol |
||
Line 101: | Line 101: | ||
end |
end |
||
numbers.has_ranges = true |
numbers.has_ranges = true |
||
⚫ | |||
else |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end |
|||
end |
end |
||
numbers[index] = range |
numbers[index] = range |
||
Line 156: | Line 154: | ||
arg = '0' .. arg |
arg = '0' .. arg |
||
end |
end |
||
if prefix == '' then |
if prefix == '±' then |
||
-- Ignore. |
|||
⚫ | |||
-- Display for first number, ignore for others. |
-- Display for first number, ignore for others. |
||
if index == 1 then |
if index == 1 then |
||
Line 168: | Line 164: | ||
propersign = minus |
propersign = minus |
||
isnegative = true |
isnegative = true |
||
elseif prefix ~= "" then -- ignore if prefix is empty |
|||
else |
|||
return fail() |
return fail() |
||
end |
end |
||
Line 429: | Line 425: | ||
if unit and not unit.more_ignored then |
if unit and not unit.more_ignored then |
||
assert(type(unit.symbol) == 'string' and unit.symbol ~= '') |
assert(type(unit.symbol) == 'string' and unit.symbol ~= '') |
||
if unit.alias then |
if unit.alias and (unit.link or unit.scale_text or unit.si) then |
||
⚫ | |||
if unit.link or unit.scale_text or unit.si then |
|||
⚫ | |||
⚫ | |||
end |
|||
end |
|||
if unit.si then |
|||
if unit.scale_text then |
if unit.scale_text then |
||
return false |
return false |