Module:Category described in year: Difference between revisions

Content deleted Content added
Remove plant decade cats, per RFC
m +Tracking cat code (T)
Line 203:
--produce description & toc
if currYDC then
description =if conf[currGroup][currYDC].description then
description = conf[currGroup][currYDC].description
if mw.ustring.match(description, '%%year%%') then
if mw.ustring.match(description, '%%year%%') then
if currYear then description = mw.ustring.gsub(description, '%%year%%', currYear) --"2001"
else description = mw.ustring.gsub(description, '%%year%%', 'this year') end
end
if mw.ustring.match(description, '%%decade%%') then
if currDeca then description = mw.ustring.gsub(description, '%%decade%%', currDeca .. 's') --"2000s"
else description = mw.ustring.gsub(description, '%%decade%%', 'this decade') end
end
if mw.ustring.match(description, '%%century%%') then
if currCent then description = mw.ustring.gsub(description, '%%century%%', addOrd(currCent)) --"21st"
else description = mw.ustring.gsub(description, '%%century%%', 'this century') end
end
if mw.site.stats.pagesInCategory(currCat, 'pages') >= conf['tocmin'] then --expensive
local args = { numerals = 'no' }
toc = frame:expandTemplate{ title = 'Category TOC', args = args }
end
else
trackingCategories[2] = '[[Category:Described in year error|T]]' --null description text
end
end