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

Content deleted Content added
+{{Portal|Paleontology}} for Fossil taxa cats
updated sandbox to live version
Line 112:
['Insects'] = { --"group"
['yearmin'] = 17581757, --integer; lowest possible year (and thus decade) displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Insects described in 1901]]
['parent1'] = 'century', --[[Category:Insects described in the 20th century]]
Line 125 ⟶ 126:
['Beetles'] = { --"subgroup" to Insects
['yearmin'] = 1757, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Beetles described in 1901]]
['parent1'] = 'century', --[[Category:Beetles described in the 20th century]]
Line 139 ⟶ 141:
['Butterflies'] = { --"subgroup" to Insects
['yearmin'] = 17581757, --integer; lowest possible year (and thus decade) displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Butterflies described in 1901]]
['parent1'] = 'century', --[[Category:Butterflies described in the 20th century]]
Line 154 ⟶ 156:
['Moths'] = { --"subgroup" to Insects
['yearmin'] = 1758, --integer; lowest possible year (and thus decade) displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Moths described in 1901]]
['parent1'] = 'century', --[[Category:Moths described in the 20th century]]
Line 184 ⟶ 185:
['Bacteria'] = { --"group"
['yearmin'] = 17581753, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Bacteria described in 1901]]
['parent1'] = 'century', --[[Category:Bacteria described in the 20th century]]
Line 228 ⟶ 229:
['Species'] = {
['yearmin'] = 1753, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Species described in 1901]]
['parent1'] = 'century', --[[Category:Species described in the 20th century]]
Line 246 ⟶ 248:
['Taxa'] = {
['yearmin'] = 1753, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Taxa described in 1901]]
['parent1'] = 'century', --[[Category:Taxa described in the 20th century]]
Line 260 ⟶ 263:
['Fossil taxa'] = {
['yearmin'] = 1753, --integer; lowest possible year displayed in nav bars; 0/nil defaults to 1758 per ICZN Art. 5
['year'] = { --[[Category:Fossil taxa described in 1901]]
['parent1'] = 'century', --[[Category:Fossil taxa described in the 20th century]]
Line 492 ⟶ 496:
if currYDC == 'year' then
if nav == nil then
local args = { linkcatifexists2min = 'yes'minYear }
nav = frame:expandTemplate{ title = 'Navseasoncats', args = args }
end
Line 509 ⟶ 513:
categories[iparent] = '[[Category:'..currYear..' in biology'..sortkey..']]' --if/when all biology cats exists, merge this elseif with 'paleontology'
end
elseif parent == 'environment' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[Category:'..currYear..' in the environment'..sortkey..']]'
elseif parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[Category:'..currYear..' in '..parent..sortkey..']]'
elseif parent == 'environment' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
categories[iparent] = '[[Category:'..currYear..' in the environment'..sortkey..']]'
elseif mw.ustring.match(parent, '^%u%l') then --e.g. Animals/Insects
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
Line 552 ⟶ 556:
if isNilOrEmpty(sortkey) then sortkey = addOrd(currCent) end --default to currCent
categories[iparent] = '[[Category:'..currGroup..' by year of formal description|'..sortkey..']]'
elseif parent == 'biology' or parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end
if tonumber(currCent) < 19 then
categories[iparent] = '[[Category:'..addOrd(currCent)..' century in science'..sortkey..']]' --biology cat structure doesn't exist pre-1865, as of 10/2018
else
categories[iparent] = '[[Category:'..addOrd(currCent)..' century in biology'..sortkey..']]' --if/when all biology cats exists, merge this elseif with 'paleontology'
end
elseif parent == 'paleontology' then
if isNilOrEmpty(sortkey) then sortkey = '' --default to none
else sortkey = '|'..sortkey end