Module:High-use: Difference between revisions

no edit summary
m (1 revision imported)
en>Trappist the monk
No edit summary
Line 40: Line 40:
return_value = string.format("approximately %s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) )
return_value = string.format("approximately %s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) )
end
end
 
-- Insert percentage of pages if that is likely to be >= 1%
-- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes
if count and count > 250000 then
if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5)
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5)
if percent >= 1 then
if percent >= 1 then
Anonymous user