Content deleted Content added
Tom.Reding (talk | contribs) +Basic description for Fish year cats |
Tom.Reding (talk | contribs) +currYearSortkey = last 2 digits of year (see Category:Fish described in the 20th century) |
||
Line 17:
['min'] = 1758, --integer; lowest possible year displayed in nav bars; default to 1758 per ICZN Art. 5
['year'] = { --[[Category:Fish described in 1901]]
['description'] = '', --'Description tbd; year; This category should only contain species
['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 century]]
Line 87:
local currGroup = mw.ustring.match(currCat, '^%w+') --Fish/Spiders/default/etc.
if map[currGroup] == nil then map[currGroup] = map['Fish'] end --'Fish' == default
local currYDC = nil --
local currYearSortkey = nil --'Fish described in 20th century|currYearSortkey' in 'Fish described in YYYY' type cats
local currYear = mw.ustring.match(currCat, 'in (%d%d%d%d)$')
local currDeca = mw.ustring.match(currCat, 'the (%d%d%d%d)s$')
Line 98 ⟶ 99:
if currYear then
currYDC = 'year'
currYearSortkey = mw.ustring.match(currCat, 'in %d%d(%d%d)$')
parentDeca = mw.ustring.match(currYear, '^(%d%d%d)%d$') .. '0'
if mw.ustring.match(currYear, '^%d%d00') then --1900 in 19th century
Line 133 ⟶ 135:
categories[iparent] = '[[Category:' .. currGroup .. ' described in the ' .. parentDeca .. 's]]'
elseif parent == 'century' then
categories[iparent] = '[[Category:' .. currGroup .. ' described in the ' .. addOrd(parentCent) .. ' century|' .. currYearSortkey .. ']]'
else --i.e. Animals; require capital first letter?
categories[iparent] = '[[Category:' .. parent .. ' described in ' .. currYear .. ']]'
|