Module:Pagetype: Difference between revisions

m
1 revision imported
m (Changed protection level for "Module:Pagetype": Nearly 8 million transclusions, only template used in WPBannerMeta not to be fully protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)))
 
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 195:
function p._main(args)
local redirect = detectRedirects(args)
local pagetype = ""
if redirect then
returnpagetype = redirect
else
returnpagetype = getNsDetectValue(args)
end
if yesno(args.plural, false) then
if cfg.irregularPlurals[pagetype] then
pagetype = cfg.irregularPlurals[pagetype]
else
pagetype = pagetype .. cfg.plural -- often 's'
end
end
if yesno(args.caps, false) then
pagetype = mw.ustring.upper(mw.ustring.sub(pagetype, 1, 1)) ..
mw.ustring.sub(pagetype, 2)
end
return pagetype
end
 
verified
5,307

edits