13,398
edits
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
local catName = '' | local catName = '' | ||
if namespace == 0 then | if namespace == 0 then | ||
catName = ' | catName = 'Bharatpedia articles with '..id..' identifiers' | ||
elseif namespace == 2 and not title.isSubpage then | elseif namespace == 2 and not title.isSubpage then | ||
catName = 'User pages with '..id..' identifiers' | catName = 'User pages with '..id..' identifiers' | ||
Line 741: | Line 741: | ||
end | end | ||
local catName = ' | local catName = 'Bharatpedia articles with faulty '..(specialCat or id)..' identifiers' | ||
return '* <span class="error">The '..id..' id '..rawValue..' is not valid.</span>[[Category:'..catName..']]'..p.redCatLink(catName)..'\n' | return '* <span class="error">The '..id..' id '..rawValue..' is not valid.</span>[[Category:'..catName..']]'..p.redCatLink(catName)..'\n' | ||
end | end | ||
Line 753: | Line 753: | ||
'! colspan=4 | Tracking categories and page counts\n'.. | '! colspan=4 | Tracking categories and page counts\n'.. | ||
'|-\n'.. | '|-\n'.. | ||
'! [[:Category: | '! [[:Category:Bharatpedia articles with authority control information|'.. 'Articles]]\n'.. | ||
'! [[:Category:User pages with authority control information|'.. 'User pages]]\n'.. | '! [[:Category:User pages with authority control information|'.. 'User pages]]\n'.. | ||
'! [[:Category:Miscellaneous pages with authority control information|'.. 'Misc. pages]]\n'.. | '! [[:Category:Miscellaneous pages with authority control information|'.. 'Misc. pages]]\n'.. | ||
'! [[:Category: | '! [[:Category:Bharatpedia articles with faulty authority control information|'..'Faulty IDs]]\n'.. | ||
'|-\n' | '|-\n' | ||
Line 766: | Line 766: | ||
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args } | local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args } | ||
--cats | --cats | ||
local articleCat = ' | local articleCat = 'Bharatpedia articles with '..category..' identifiers' | ||
local userCat = 'User pages with '..category..' identifiers' | local userCat = 'User pages with '..category..' identifiers' | ||
local miscCat = 'Miscellaneous pages with '..category..' identifiers' | local miscCat = 'Miscellaneous pages with '..category..' identifiers' | ||
local faultyCat = ' | local faultyCat = 'Bharatpedia articles with faulty '..category..' identifiers' | ||
--counts | --counts | ||
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') ) | local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') ) | ||
Line 885: | Line 885: | ||
} | } | ||
-- Deprecated aliases to p.conf; tracked in [[Category: | -- Deprecated aliases to p.conf; tracked in [[Category:Bharatpedia articles with deprecated authority control identifiers]] | ||
-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' } | -- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' } | ||
p.deprecated = { | p.deprecated = { | ||
Line 921: | Line 921: | ||
parentArgs[param] = parentArgs[dep] | parentArgs[param] = parentArgs[dep] | ||
if namespace == 0 then | if namespace == 0 then | ||
deprecatedIdCat = '[[Category: | deprecatedIdCat = '[[Category:Bharatpedia articles with deprecated authority control identifiers|'..dep..']]' | ||
end | end | ||
end | end | ||
Line 954: | Line 954: | ||
if wikidataIds[1] then | if wikidataIds[1] then | ||
if val == '' and (namespace == 0 or testcases) then | if val == '' and (namespace == 0 or testcases) then | ||
suppressedIdCat = '[[Category: | suppressedIdCat = '[[Category:Bharatpedia articles with suppressed authority control identifiers|'..params[1]..']]' | ||
else | else | ||
parentArgs[params[1]] = wikidataIds[1] | parentArgs[params[1]] = wikidataIds[1] | ||
Line 973: | Line 973: | ||
if worldcatId and worldcatId ~= '' then --if present & unsuppressed | if worldcatId and worldcatId ~= '' then --if present & unsuppressed | ||
table.insert( elements, p.createRow( 'WORLDCATID', '', worldcatId, '[[WorldCat Identities]]: [https://www.worldcat.org/identities/'..worldcatId..' '..worldcatId..']', false ) ) --Validation? | table.insert( elements, p.createRow( 'WORLDCATID', '', worldcatId, '[[WorldCat Identities]]: [https://www.worldcat.org/identities/'..worldcatId..' '..worldcatId..']', false ) ) --Validation? | ||
worldcatCat = '[[Category: | worldcatCat = '[[Category:Bharatpedia articles with WorldCat identifiers]]' | ||
elseif worldcatId == nil then --if absent & unsuppressed | elseif worldcatId == nil then --if absent & unsuppressed | ||
local viafId = parentArgs['VIAF'] | local viafId = parentArgs['VIAF'] | ||
Line 980: | Line 980: | ||
table.insert( elements, p.createRow( 'VIAF', '', viafId, '[[WorldCat Identities]] (via VIAF): [https://www.worldcat.org/identities/containsVIAFID/'..viafId..' '..viafId..']', false ) ) | table.insert( elements, p.createRow( 'VIAF', '', viafId, '[[WorldCat Identities]] (via VIAF): [https://www.worldcat.org/identities/containsVIAFID/'..viafId..' '..viafId..']', false ) ) | ||
if namespace == 0 then | if namespace == 0 then | ||
worldcatCat = '[[Category: | worldcatCat = '[[Category:Bharatpedia articles with WorldCat-VIAF identifiers]]' | ||
end | end | ||
elseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validated | elseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validated | ||
Line 988: | Line 988: | ||
table.insert( elements, p.createRow( 'LCCN', '', lccnId, '[[WorldCat Identities]] (via LCCN): [https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' '..lccnIdFmtd..']', false ) ) | table.insert( elements, p.createRow( 'LCCN', '', lccnId, '[[WorldCat Identities]] (via LCCN): [https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' '..lccnIdFmtd..']', false ) ) | ||
if namespace == 0 then | if namespace == 0 then | ||
worldcatCat = '[[Category: | worldcatCat = '[[Category:Bharatpedia articles with WorldCat-LCCN identifiers]]' | ||
end | end | ||
end | end | ||
end | end | ||
elseif worldcatId == '' then --if suppressed | elseif worldcatId == '' then --if suppressed | ||
suppressedIdCat = '[[Category: | suppressedIdCat = '[[Category:Bharatpedia articles with suppressed authority control identifiers|WORLDCATID]]' | ||
end | end | ||
Line 1,021: | Line 1,021: | ||
outString = outString .. auxCats | outString = outString .. auxCats | ||
if namespace ~= 0 then | if namespace ~= 0 then | ||
outString = mw.ustring.gsub(outString, '(%[%[)(Category: | outString = mw.ustring.gsub(outString, '(%[%[)(Category:Bharatpedia articles)', '%1:%2') --by definition | ||
end | end | ||
end | end |
edits