Changes
Jump to navigation
Jump to search
m
if param == 'MBA' then param = 'MusicBrainz' end --it's weird; 'MusicBrainz' for cat name only if param == 'MBRG' then param = 'MusicBrainz release group' end --it's weird; 'MusicBrainz release group' for cat name only if param == 'MBW' then param = 'MusicBrainz work' end --it's weird; 'MusicBrainz work' for cat name only local articleCat = 'Wikipedia articles with '..paramcategory..' identifiers' local userCat = 'User pages with '..paramcategory..' identifiers' local miscCat = 'Miscellaneous pages with '..paramcategory..' identifiers' local faultyCat = 'Wikipedia articles with faulty '..paramcategory..' identifiers' if param == 'MusicBrainz' then param = 'MBA' end --it's weird; 'MBA' otherwise if param == 'MusicBrainz release group' then param = 'MBRG' end --it's weird; 'MBRG' otherwise if param == 'MusicBrainz work' then param = 'MBW' end --it's weird; 'MBW' otherwise
avoid exceptions by adding "category" field to config tables
for _, conf in pairs( p.conf ) do
local param, link, pid = conf[1], conf[2], conf[3]
local category = conf.category or param
local args = { id = 'f', pid }
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
--cats
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
{ 'LNB', '[[National Library of Latvia|LNB]]', 1368, p.lnbLink },
{ 'Léonore', '[[Base Léonore|Léonore]]', 640, p.leonoreLink },
{ 'MBA', '[[MusicBrainz|MusicBrainz artist]]', 434, p.mbaLink , category = 'MusicBrainz' }, { 'MBRG', '[[MusicBrainz|MusicBrainz release group]]', 436, p.mbrgLink , category = 'MusicBrainz release group' }, { 'MBW', '[[MusicBrainz|MusicBrainz work]]', 435, p.mbwLink , category = 'MusicBrainz work' },
{ 'MGP', '[[Mathematics Genealogy Project|MGP]]', 549, p.mgpLink },
{ 'NARA', '[[National Archives and Records Administration|NARA]]', 1225, p.naraLink },