Content deleted Content added
Tom.Reding (talk | contribs) +3rd method for finding commons media: check Commons gallery property (P935); var ce; from sandbox |
Tom.Reding (talk | contribs) +[Category:Described in year error|U] for unknown configuration; --ce |
||
Line 5:
--[[========================================================================
========================================================================]]--
['tocmin'] = 401, --integer; minimum category size to
['Fish'] = { --group
Line 173:
local currGroup = mw.ustring.match(currCat, '^%w+') --Fish/Spiders/default/etc.
if conf[currGroup] == nil then conf[currGroup] = conf['Fish'] end --'Fish' == default
local currYDC = nil --possible values: year/decade/century
local currYear = mw.ustring.match(currCat, 'described in (%d%d%d%d)$')
local currDeca = mw.ustring.match(currCat, 'described in the (%d%d%d%d)s$')
Line 210:
description = conf[currGroup][currYDC].description
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
Line 277:
trackingCategories[2] = '[[Category:Described in year error|C]]' --invalid century-parent
end
else
trackingCategories[2] = '[[Category:Described in year error|U]]' --unknown configuration
end
|