Modul:Authority control/bakpasir: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
||
Baris 13:
local catName = ''
if namespace == 0 then
catName = '
elseif namespace == 2 and not title.isSubpage then
catName = '
else
catName = '
end
return '[[
end
Baris 27:
mw.title.new(catName, 14).exists == false
then
return '[[
end
return ''
Baris 33:
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local catName = '
if links then -- all links[] use withUid = false; no check needed
local row = ''
if prefix then
row = row
end
for i, l in ipairs( links ) do
Baris 45:
row = row..'<span class="uid">'..l..'</span>'
else
row = row..'<span class="error">The '..id..' id '..rawValues[i]..' is not valid.</span>[[
end
end
Baris 56:
end
return '* <span class="error">The '..id..' id '..rawValues..' is not valid.</span>[[
end
Baris 63:
--[[==========================================================================]]
-- If a link has a suitable entry in the global inter-wiki prefix table at [[:m:Interwiki_map]],
-- please consider routing through this prefix rather than as external link URL. -- This will ease future maintenance as necessary updates to the link can be centrally carried out there rather than by updating this module. -- The "external link" icon would disappear for such entries. function p.aagLink( id, label)
Baris 95 ⟶ 98:
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or '
end
Baris 122 ⟶ 125:
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or '
end
Baris 130 ⟶ 133:
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (
end
Baris 138 ⟶ 141:
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or '
end
Baris 149 ⟶ 152:
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or '
end
Baris 161 ⟶ 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' '
end
Baris 181 ⟶ 184:
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or '
end
Baris 189 ⟶ 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or '
end
Baris 197 ⟶ 200:
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (
end
Baris 206 ⟶ 209:
end
return '[https://www.cwgc.org/find-war-dead/casualty/'..id..'/ '..(label or 'Commonwealth War Graves Commission')..']'..p.getCatForId( 'CWGC' )
end
function p.emuLink( id, label )
--P4613's format regex: \d{1,6} (e.g. 15409 (or 015409))
if not id:match( '^%d%d?%d?%d?%d?%d?$' ) then
return false
end
return '[http://esu.com.ua/search_articles.php?id='..id..' '..(label or 'Ukraine')..']'..p.getCatForId( 'EMU' )
end
Baris 232 ⟶ 243:
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or '
end
Baris 268 ⟶ 279:
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Integrated Authority File (
end
Baris 294 ⟶ 305:
return false
end
return '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid='..id..' '..(label or '
end
function p.iciaLink( id, label )
Baris 326 ⟶ 337:
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (
end
Baris 334 ⟶ 345:
return false
end
return '[http://kulturnav.org/'..id..' '..(label or 'KulturNav (
end
Baris 344 ⟶ 355:
local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'
id = parts[1] .. parts[2] .. p.append( parts[3], '0', 6 )
return '[https://id.loc.gov/authorities/'..lccnType..'/'..id..' '..(label or '
end
Baris 352 ⟶ 363:
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (
end
Baris 364 ⟶ 375:
function p.leonoreLink( id, label )
--P640's format regex: LH//\d{1,4}/\d{1,3}|19800035/\d{1,4}/\d{1,5}(Bis|Ter)?|C/0/\d{1,2} (e.g. LH//2064/18)
if not id:match( '^LH//%d%d?%d?%d?/%d%d?%d?$' ) and --IDs from
not id:match( '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?$' ) and --IDs from 19800035/1/1 to 19800035/385/51670 (legionnaires who died 1954-1977 & some who died < 1954)
not id:match( '^
not id:match( '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?Ter$' ) and --IDs from ?
not id:match( '^C/0/%d%d?$' ) then --IDs from C/0/1 to C/0/84 (84 famous legionaries)
return false
end
return '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&FIELD_1=COTE&VALUE_1='..id..' '..(label or 'Léonore (
end
Baris 391 ⟶ 404:
return '['..url..' '..label..']'..cat
else
return '[[MBA (identifier)|MusicBrainz]] ['
end
end
Baris 405 ⟶ 418:
return '['..url..' '..label..']'..cat
else
return '[[MBAREA (identifier)|MusicBrainz]] ['
end
end
Baris 419 ⟶ 432:
return '['..url..' '..label..']'..cat
else
return '[[MBI (identifier)|MusicBrainz]] ['
end
end
Baris 433 ⟶ 446:
return '['..url..' '..label..']'..cat
else
return '[[MBL (identifier)|MusicBrainz]] ['
end
end
Baris 447 ⟶ 460:
return '['..url..' '..label..']'..cat
else
return '[[MBP (identifier)|MusicBrainz]] ['
end
end
Baris 461 ⟶ 474:
return '['..url..' '..label..']'..cat
else
return '[[MBRG (identifier)|MusicBrainz]] ['
end
end
Baris 475 ⟶ 488:
return '['..url..' '..label..']'..cat
else
return '[[MBS (identifier)|MusicBrainz]] ['
end
end
Baris 490 ⟶ 503:
return '['..url..' '..label..']'..cat
else
return '[[MBW (identifier)|MusicBrainz]] ['
end
end
Baris 523 ⟶ 536:
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or '
end
Baris 539 ⟶ 552:
return false
end
return '[https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica='..id..'&CON_LNG=ENG '..(label or '
end
Baris 555 ⟶ 568:
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or '
end
Baris 581 ⟶ 594:
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or '
end
Baris 597 ⟶ 610:
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or '
end
Baris 605 ⟶ 618:
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or '
end
Baris 630 ⟶ 643:
return false
end
return '[http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI='..id..' '..(label or '
end
Baris 657 ⟶ 670:
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (
end
Baris 665 ⟶ 678:
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (
end
Baris 673 ⟶ 686:
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (
end
Baris 681 ⟶ 694:
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (
end
Baris 689 ⟶ 702:
return false
end
return '[http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request='..id..'&CON_LNG=ENG '..(label or '
end
Baris 697 ⟶ 710:
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or '
end
Baris 705 ⟶ 718:
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (
end
Baris 721 ⟶ 734:
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (
end
Baris 737 ⟶ 750:
return false
end
return longurl..id..' '..(label or 'Terminologia Anatomica')..']'..p.getCatForId( 'TA98' ) end
Baris 747 ⟶ 761:
return '[https://islamansiklopedisi.org.tr/'..id..' '..(label or 'Encyclopedia of Islam')..']'..p.getCatForId( 'TDVİA' )
end
function p.tepapaLink( id, label )
Baris 753 ⟶ 768:
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (
end
Baris 760 ⟶ 775:
--P1362's format regex: \p{Lu}[\p{L}\d_',\.\-\(\)\*/–]{3,59} (e.g. Abcd)
local class = "[%a%d_',%.%-%(%)%*/–]"
local regex =
if not mw.ustring.match( id, regex ) then
return false
end
return '[http://tls.theaterwissenschaft.ch/wiki/'..id..' '..(label or 'Theaterlexikon (
end
Baris 805 ⟶ 820:
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or '
end
Baris 814 ⟶ 829:
return false
end
-- If the "VIAF" entry at [[:m:Interwiki map]] would resolve to "https://viaf.org/viaf/$1" (rather than "http://viaf.org/viaf/$1", as it currently still does),
-- then the code below could change from '[https://viaf.org/viaf/'..id..' '..id..']' to '[[:VIAF:'..id..'|'..id..']]'. return '[https://viaf.org/viaf/'..id..' '..(label or 'VIAF')..']'..p.getCatForId( 'VIAF' )
end
Baris 822 ⟶ 838:
function p.append(str, c, length)
while str:len() < length do
str = c
end
return str
Baris 837 ⟶ 853:
local result = (12 - remainder) % 11
if result == 10 then
return
end
return tostring( result )
Baris 889 ⟶ 905:
local wikiTable = '{| class="wikitable sortable"\n'..
'! rowspan=2 | Parameter\n'..
'! rowspan=2 |
'! rowspan=2 |
'! rowspan=2; data-sort-type=number |
'! colspan=4 |
'|-\n'..
'! [[:
'! [[:
'! [[:
'! [[:
'|-\n'
local lang = mw.getContentLanguage()
local a, u, m, f, P = 0, 0, 0, 0, 0 --cumulative sums
for _, conf in pairs( p.conf ) do
local param, pid, section = conf[1], conf[2], conf[4]
local appearsAs
if param ==
-- WorldCat is special
appearsAs =
elseif conf.prefix then
appearsAs = conf.prefix
Baris 911 ⟶ 928:
appearsAs = conf[3](conf[5])
end
local link = conf.link or param
local category = conf.category or param
local args = { id = 'f', pid }
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
--cats
local articleCat = '
local userCat = '
local miscCat = '
local faultyCat = '
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
Baris 925 ⟶ 942:
local miscCount = lang:formatNum( mw.site.stats.pagesInCategory(miscCat, 'pages') )
local faultyCount = lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, 'pages') )
--calcs
P = P + 1 --property count
a = a + lang:parseFormattedNumber(articleCount)
u = u + lang:parseFormattedNumber(userCount)
m = m + lang:parseFormattedNumber(miscCount)
f = f + lang:parseFormattedNumber(faultyCount)
--concat
wikiTable = wikiTable..'\n'..
Baris 933 ⟶ 955:
'||'..appearsAs..
'||data-sort-value='..pid..'|'..wpl..
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
end
Baris 942 ⟶ 964:
local wcd = { 'WorldCat-LCCN', 'WorldCat-VIAF' }
for _, w in pairs(wcd) do
local articleCat = '
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
local appearsAs
if w ==
appearsAs =
else
appearsAs =
end
a = a + lang:parseFormattedNumber(articleCount)
wikiTable = wikiTable..'\n'..
'|-\n'..
'||'..'—'..
'||
'||'..appearsAs..
'||data-sort-value='..w..'|'..'—'..
'||style="text-align: right;"|[[:
'||style="text-align: right;"|—'..
'||style="text-align: right;"|—'..
Baris 962 ⟶ 985:
end
--append sums
wikiTable = wikiTable..'\n'..
'|-\n'..
'! style="text-align: right;" colspan=3|Totals'..
'||style="text-align: right;"|'..lang:formatNum(P)..
'||style="text-align: right;"|'..lang:formatNum(a)..
'||style="text-align: right;"|'..lang:formatNum(u)..
'||style="text-align: right;"|'..lang:formatNum(m)..
'||style="text-align: right;"|'..lang:formatNum(f)
return require('Module:Suppress categories').main(wikiTable)..'\n|}'
end
Baris 969 ⟶ 1.002:
--[[==========================================================================]]
--
-- This reduces clutter in "What links here" on both the redirect and the target,
-- and improves reverse lookup of articles where a manifestation of each identifier is used.
-- p.conf table basic format: { 'parameter name', propertyId # in Wikidata, formatting/validation function, section, example ID for documentation }
-- p.conf table optional named parameters:
--
-- category: to override the ID in category names (defaults to "... with <parameter> identifiers")
-- prefix: to include a prefix (usually a wikilink explaining what the identifier is) before the external link itself
p.conf = {
{ 'AAG', 3372, p.aagLink,
{ 'ACM-DL', 864, p.acmLink,
{ 'ADB', 1907, p.adbLink,
{ 'AGSA', 6804, p.agsaLink,
{ 'autores.uy', 2558, p.autoresuyLink,
{ 'AWR', 4186, p.awrLink,
{ 'BIBSYS', 1015, p.bibsysLink,
{ 'Bildindex', 2092, p.bildLink,
{ 'BNC', 1890, p.bncLink,
{ 'BNE', 950, p.bneLink,
{ 'BNF', 268, p.bnfLink,
{ 'Botanist', 428, p.botanistLink ,
{ 'BPN', 651, p.bpnLink ,
{ 'CANTIC', 1273, p.canticLink,
{ 'CINII', 271, p.ciniiLink,
{ 'CWGC', 1908, p.cwgcLink,
{ 'DAAO', 1707, p.daaoLink,
{ 'DBLP', 2456, p.dblpLink,
{ 'DIB', 6829, p.dibLink,
{ 'DSI', 2349, p.dsiLink,
{ '
{ '
{ '
{ '
{ '
{ 'IAAF', 1146, p.iaafLink, 'Other', '123' },
{ 'ICCU', 396, p.iccuLink, 'National libraries', 'IT\\ICCU\\CFIV\\000163' }, --formerly SBN
{ 'ICIA', 1736, p.iciaLink, 'Art research institutes', '1' },
{ 'IEU', 9070, p.ieuLink, 'Other', 'N\\A\\NationalAcademyofArtandArchitecture' },
{ 'ISNI', 213, p.isniLink, 'General', '0000-0000-6653-4145', prefix = '[[ISNI (identifier)|ISNI]]' },
{ 'Joconde', 347, p.jocondeLink, 'Art research institutes', '12345678901' },
{ 'KULTURNAV', 1248, p.kulturnavLink, 'Art research institutes', '12345678-1234-1234-1234-1234567890AB', link = 'KulturNav (identifier)' },
{ '
{ '
{ 'LNB', 1368, p.lnbLink, 'National libraries', '123456789' },
{ 'Léonore', 640, p.leonoreLink, 'Other', 'LH//1/1', prefix = '[[Léonore (identifier)|Léonore (France)]]' },
{ 'MA', 6366, p.maLink, 'Other', '123456789' },
{ 'MBA', 434, p.mbaLink, { 'MBAREA', 982, p.mbareaLink,
{ 'MBI', 1330, p.mbiLink,
{ 'MBL', 966, p.mblLink,
{ 'MBP', 1004, p.mbpLink,
{ 'MBRG', 436, p.mbrgLink,
{ 'MBS', 1407, p.mbsLink,
{ 'MBW', 435, p.mbwLink,
{ 'MGP', 549, p.mgpLink,
{ 'NARA', 1225, p.naraLink,
{ 'NCL', 1048, p.nclLink,
{ 'NDL', 349, p.ndlLink,
{ 'NGV', 2041, p.ngvLink,
{ 'NKC', 691, p.nkcLink,
{ 'NLA', 409, p.nlaLink,
{ 'NLG', 3348, p.nlgLink,
{ 'NLI', 949, p.nliLink,
{ 'NLK', 5034, p.nlkLink,
{ 'NLP', 1695, p.nlpLink,
{ 'NLR', 1003, p.nlrLink,
{ 'NSK', 1375, p.nskLink,
{ 'NTA', 1006, p.ntaLink,
{ 'ORCID', 496, p.orcidLink,
{ 'PIC', 2750, p.picLink,
{ 'PLWABN', 7293, p.plwabnLink,
{ 'Publons', 3829, p.publonsLink,
{ 'RID', 1053, p.ridLink,
{ 'RISM', 5504, p.rismLink,
{ 'RERO', 3065, p.reroLink,
{ 'RKDartists', 650, p.rkdartistsLink,
{ 'RKDID', 350, p.rkdidLink,
{ 'RSL', 947, p.rslLink,
{ 'SELIBR', 906, p.selibrLink,
{ 'SIKART', 781, p.sikartLink,
{ 'SNAC-ID', 3430, p.snacLink,
{ 'SUDOC', 269, p.sudocLink,
{ 'S2AuthorId', 4012, p.s2authoridLink,
{ 'TA98', 1323, p.ta98Link,
{ 'TDVİA', 7314, p.tdviaLink,
{ 'TePapa', 3544, p.tepapaLink,
{ 'TLS', 1362, p.tlsLink,
{ 'Trove', 1315, p.troveLink,
{ 'UKPARL', 6213, p.ukparlLink,
{ 'ULAN', 245, p.ulanLink,
{ 'USCongress', 1157, p.uscongressLink,
{ 'VcBA', 8034, p.vcbaLink,
{ 'VIAF', 214, p.viafLink,
{ 'WORLDCATID', 7859, nil,
}
Baris 1.079 ⟶ 1.115:
}
-- Deprecated aliases to p.conf; tracked in [[Category:
-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' }
p.deprecated = {
{ 'GKD', 'GND' },
{ 'PND', 'GND' },
{ 'RLS', 'RSL' },
{ 'SWD', 'GND' },
{ 'NARA-organization', 'NARA' },
Baris 1.095 ⟶ 1.131:
function p.authorityControl( frame )
local resolveEntity = require(
local parentArgs = frame:getParent().args --WD IDs added here later
local iParentArgs = 0 --count original/manual parent args only later
local worldcatCat = ''
local elementsCat = ''
local multipleIdCat = ''
local suppressedIdCat = ''
local suppressedIdCatArts = ''
local deprecatedIdCat = ''
local differentOnWDCat = ''
local sameOnWDCat = ''
local stateCat = ''
--
for _, a in pairs( p.aliases ) do
local alias, param = a[1], a[2]
Baris 1.113 ⟶ 1.152:
end
--
for _, d in pairs( p.deprecated ) do
local dep, param = d[1], d[2]
Baris 1.119 ⟶ 1.158:
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[
end
end
end
--
local itemId = nil
if namespace ~= 0 then
Baris 1.138 ⟶ 1.177:
--Wikidata fallback if available
if itemId then
local suppressedIdCount = 0
local iMatches = 0
for _, params in ipairs( p.conf ) do
Baris 1.146 ⟶ 1.186:
if wikidataIds[1] then
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[Category:Articles with suppressed authority control identifiers|'..params[1]..']]'
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
Baris 1.163 ⟶ 1.204:
end
if bMatch == false then
differentOnWDCat = '[[
end end end end end
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[
end
if parentArgs['arts'] == 'arts' and suppressedIdCount > 0 then
if namespace == 0 or testcases then
local s = 's'
if suppressedIdCount == 1 then s = '' end
local sCat = 'ACArt with '..suppressedIdCount..' suppressed element'..s
suppressedIdCatArts = '[[Category:'..sCat..']]'..p.redCatLink(sCat)
end
end
end
--configure rows
local rct = 0
local sectionOrder = {
'Art research institutes','Biographical dictionaries','Scientific databases',
local sections = {
[
[
[
[
[
[
[
}
--
--
if parentArgs.PLWABN or parentArgs.plwabn then
parentArgs.NLP = ''
Baris 1.195 ⟶ 1.245:
table.insert( tval, val )
if params.prefix then
table.insert( tlinks, params[3]( val,
else
table.insert( tlinks, params[3]( val ) )
end
end
--collect
if itemId and tval[1] then
local nextIdVal = 2
Baris 1.221 ⟶ 1.271:
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( '
end
end
end
Baris 1.230 ⟶ 1.280:
local worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']
if worldcatId and worldcatId ~= '' then --if WORLDCATID present & unsuppressed
table.insert( sections[
worldcatCat = p.getCatForId( 'WORLDCATID' )
rct = rct + 1
Baris 1.237 ⟶ 1.287:
local lccnId = parentArgs['lccn'] or parentArgs['LCCN']
if viafId and viafId ~= '' and p.viafLink( viafId ) then --VIAF must be present, unsuppressed, & validated
table.insert( sections[
if namespace == 0 then
worldcatCat = '[[
end
rct = rct + 1
Baris 1.246 ⟶ 1.296:
if lccnParts and lccnParts[1] ~= 'sh' then
local lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]
table.insert( sections[
if namespace == 0 then
worldcatCat = '[[
end
end
Baris 1.254 ⟶ 1.304:
end
elseif worldcatId == '' then --if WORLDCATID suppressed
suppressedIdCat = '[[
end
--configure Navbox
local outString = ''
if rct > 0 then
local Navbox = require('Module:Navbox')
local sectionID = 1
local args = { pid = 'identifiers' } -- #target the list of identifiers
Baris 1.271 ⟶ 1.316:
local pencil = frame:expandTemplate{ title = 'EditAtWikidata', args = args}
local navboxArgs = {
name = '
navboxclass = 'authority-control',
bodyclass = 'hlist',
Baris 1.279 ⟶ 1.324:
for _, sectName in ipairs(sectionOrder) do
if #sections[sectName] ~= 0 then
navboxArgs[
navboxArgs[
sectionID = sectionID + 1
end
end
if navboxArgs.group2 then
else
local sect = navboxArgs.group1
if sect ==
-- Just say "Authority control" with no label if only
-- since "
navboxArgs.group1 =
else
navboxArgs.group1 =
end
end
Baris 1.299 ⟶ 1.344:
end
--auxCats
if rct == 0 or rct >= 25 then
if namespace == 0 or testcases then
local eCat = 'AC with '..rct..' elements'
elementsCat = '[[Category:'..eCat..']]'..p.redCatLink(eCat)
end
end
if parentArgs.state then
if namespace == 0 or testcases then
local sCat
if parentArgs.state == 'collapsed' then sCat = 'AC using state parameter: collapsed'
elseif parentArgs.state == 'expanded' then sCat = 'AC using state parameter: expanded'
elseif parentArgs.state == 'autocollapse' then sCat = 'AC using state parameter: autocollapse'
else sCat = 'AC using state parameter: other'
end
stateCat = '[[Category:'..sCat..']]'..p.redCatLink(sCat)
end
end
local auxCats = worldcatCat..elementsCat..multipleIdCat..suppressedIdCat..suppressedIdCatArts..
deprecatedIdCat..differentOnWDCat..sameOnWDCat..stateCat
if testcases then
auxCats = mw.ustring.gsub(auxCats, '(%[%[)(Category)', '%1:%2') --for easier checking
end
--out
outString = outString..auxCats
if namespace ~= 0 then
outString = mw.ustring.gsub(outString, '(%[%[)(Category:
end
|