モジュール:サンドボックス/FlatLanguage/LAWSH
表示
モジュールの解説[作成]
local p = {};
function p.get_progress (frame)
local QID = frame.args[1]
local text
local title = mw.wikibase.getSitelink(QID)
if title then
text = '[[' .. title .. ']] [[d:' .. QID .. ']]'
progress = tonumber(frame:callParserFunction('PAGESIZE', {title, 'R'}))
if progress > 39000 then
text = text .. ' {{CI|A}}'
elseif progress > 13000 then
text = text .. ' {{CI|B}}'
else
text = text .. ' {{CI|C}}'
end
else
text = '[[d:' .. QID .. ']] {{CI|NA}}'
end
return text
end
return p