Content deleted Content added
sync with live |
|||
Line 1:
-- This module implements [[Template:Class mask]].
local p = {}
Line 45 ⟶ 44:
if args.ignorenamespace then
return nil
if title.isRedirect then
end
local ns = title.namespace
if ns
return talkDefault
elseif ns
return resolveFQSgrade('file', args)
elseif ns
return resolveFQSgrade('category', args)
elseif ns
return resolveFQSgrade('portal', args)
elseif ns
return resolveFQSgrade('template', args)
elseif ns
return resolveFQSgrade('project', args)
elseif ns
return resolveFQSgrade('draft', args)
elseif ns == 109 then -- Book talk▼
▲ return resolveExtraGrade('book', args)
else
return 'NA'
Line 76:
local ret
if not grade or grade == '¬' then -- undefined▼
▲ if not grade or grade == '¬' then
ret = '¬'
elseif grade == '' then▼
-- Ucfirst
Line 152 ⟶ 148:
elseif grade == 'template' or grade == 'temp' or grade == 'tpl' or grade == 'templ' then
ret = resolveFQSgrade('template', args)
-- FM
Line 166 ⟶ 158:
else
-- Upper-case syntax
ret = args[
-- Lower-case syntax
if not ret then
▲ ret = mw.language.getContentLanguage():ucfirst(normalizedGrade)
end
end
end
▲ end
end
Line 191 ⟶ 178:
function p._main(args, title)
title = title or mw.title.getCurrentTitle().subjectPageTitle
local docWarning = getDocWarning(title) or ''
local grade = getGrade(args, title) or ''
Line 198 ⟶ 185:
function p.main(frame)
return p._main(args)
end
|