Modulo:Val: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
+ ÷
 
(7 versioni intermedie di 3 utenti non mostrate)
Riga 36:
category = ''
else
category = '[[Category:Errori di compilazione del template ValM]]' --localizzazione
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:ValM|<span title="' ..
msg:gsub('"', '&quot;') ..
'">warning</span>]]</sup>'
else
body = '<strong class="error">' ..
'Errore in &#123;&#123;[[Template:valM|valM]]&#125;&#125;: ' ..
msg ..
'</strong>'
Riga 58:
[","] = ", ",
["by"] = " su ",
["-"] = "-",
["–"] = "-",
["and"] = " e ",
["or"] = " o " ,
Riga 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
Riga 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 .. (table.removeconcat(dpart, 1) or ''))
for _--table.insert(groups, vnumdot in.. ipairs(table.remove(dpart, 1) door ''))
--for _, v in ipairs(dpart) do
-- table.insert(groups, '<span style="margin-left:.25em;">' .. v .. '</span>')
--end
end
result = sign .. table.concat(groups)
Line 798 ⟶ 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