Modulo:Val: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
fix |
|||
(14 versioni intermedie di 3 utenti non mostrate) | |||
Riga 36:
category = ''
else
category = '[[Category:Errori di compilazione del template
end
iswarning = false -- problems are infrequent so try showing large error so editor will notice
if iswarning then
body = '<sup class="noprint Inline-Template" style="white-space:nowrap;">' ..
'[[Template:
msg:gsub('"', '"') ..
'">warning</span>]]</sup>'
else
body = '<strong class="error">' ..
'Errore in {{[[Template:
msg ..
'</strong>'
Riga 58:
[","] = ", ",
["by"] = " su ",
["-"] = "
["–"] = "
["and"] = " e ",
["or"] = " o " ,
Riga 67:
["/"] = "/",
---
["~"] = "~",
["÷"] = "÷",
["a"] = " a ",
["ai"] = " ai ",
["su"] = " su ",
["e"] = " e ",
["o"] = " o " ,
["fino"] = " fino a " ,
["xo"] = " × ",
["−"] = "−",
["+"] = "+",
["e i"] = " e i "
}
local range_repeat_unit = {
-- WP:UNIT wants unit repeated when a "multiply" range is used.
--["x"] = true,
--["×"] = true,
}
Line 548 ⟶ 555:
-- Return sign and numstr (unsigned digits or numdot only) after formatting.
-- Four-digit integers are not formatted with gaps.
fmt = (fmt or 'gaps'):lower()
if fmt == 'none' or (fmt == '' and #numstr == 4 and numstr:match('^%d+$')) then
return sign .. numstr
Line 568 ⟶ 575:
table.insert(groups, '<span style="margin-left:.25em;">' .. v .. '</span>')
end
-- Nota su en.wiki viene divisa anche la parte decimale del numero
if dpart then
table.insert(groups, numdot ..
--for _, v in ipairs(dpart) do
-- table.insert(groups, '<span style="margin-left:.25em;">' .. v .. '</span>') --end
end
result = sign .. table.concat(groups)
Line 791 ⟶ 800:
local function main(frame)
local getArgs = require('Module:Arguments').getArgs
local args = getArgs(frame, {wrappers = { 'Template:Val', 'Template:M', 'Template:MNL' }})
local nocat = args.nocategory
local numbers = {} -- table of number tables, perhaps with range text
|