Module:Election results: Difference between revisions
No edit summary |
No edit summary |
||
| Line 34: | Line 34: | ||
local lang = mw.getContentLanguage() | local lang = mw.getContentLanguage() | ||
local function fmt(n) | local function fmt(n) | ||
-- Check if vote totals should be hidden | |||
if args.no_percentages == "true" then | |||
return '–' | |||
end | |||
return n and tonumber(n) and lang:formatNum(tonumber(n)) or nil | return n and tonumber(n) and lang:formatNum(tonumber(n)) or nil | ||
end | end | ||