Module:Category described in year/sandbox: Difference between revisions

Content deleted Content added
+[Category:Described in year error|U] for --unknown configuration
m Sync
Line 23:
['description'] = 'This category should only contain species-level articles.',
['parent1'] = 'century', --year/decade/century/formal, i.e. 'century' for [[Category:Fish described in the 20th century]]
['parent2'] = 'Animals', --[[Category:Animals described in the 20th century1901]]
},
['century'] = { --[[Category:Fish described in the 20th century]]
Line 55:
['year'] = { --[[Category:Plants described in 1901]]
['description'] = "This category includes plants that were ''first formally and validly described'' in %year% according to the rules of the [[International Code of Botanical Nomenclature]]. Use [[WP:RS|reliable sources]] like the [[International Plant Names Index]] to figure out the proper category. For examples see the [[Wikipedia:WikiProject Plants/Description in year categories|WikiProject Plants essay]] on this topic.", --taken from [[Category:Plants described in 1928]]
['parent1'] = 'decadecentury', --[[Category:Plants described in the 1900s]]
['parent2'] = 'Species', --[[Category:Species described in 1900]]
},
['decade'] = { --[[Category:Plants described in the 1900s]]
['description'] = '', --'Description tbd; decade; container category, etc....',
['parent1'] = 'century', --[[Category:Plants described in the 20th century]]
['parent2'] = 'Species', --[[Category:Species described in the 1900s]]
},
['century'] = { --[[Category:Plants described in the 20th century]]
Line 208 ⟶ 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