Module:Category described in year: Difference between revisions

Content deleted Content added
Grab commons link(s) from Wikidata from 2 places, avoiding dups; numerals=no to TOC; --ce
+Plants century description & nil check
Line 64:
},
['century'] = { --[[Category:Plants described in the 20th century]]
['description'] = 'For advice on using the subcategories of this category, see [[Wikipedia:WikiProject Plants/Description in year categories]].', --taken from [[Category:Plants described in the 21st century]]
['description'] = '', --'Description tbd; century; container category, etc....',
['parent1'] = 'formal', --[[Category:Plants by year of formal description]]
['parent2'] = 'Species', --[[Category:Species described in the 20th century]]
Line 124:
local ccPropState = currEntity:getBestStatements('P373')[1]
if ccPropState then
local ccPropVal = mw.ustring.gsub(ccPropState.mainsnak.datavalue.value, 'Category:', '')
if ccPropVal then
commonsLinks[1] = 'Category:' .. mw.ustring.gsub(ccPropVal, 'Category:', '')
end
end