Modul:Authority control/bakpasir: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
|||
(21 revisi perantara oleh satu pengguna lainnya tidak ditampilkan) | |||
Baris 1:
require('
local p = {}
Baris 13:
local catName = ''
if namespace == 0 then
catName = 'Artikel Wikipedia
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 = 'Artikel Wikipedia
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 82 ⟶ 85:
function p.adbLink( id, label )
--P1907's format regex: [a-z][-a-z]+-([1-
if not id:match( '^[a-z][-a-z]+-[1-
not id:match( '^[a-z][-a-z]+-[1-9]%d?%d?%d?$' ) then
return false
Baris 95 ⟶ 98:
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or '
end
Baris 113 ⟶ 116:
end
return '[http://www.womenaustralia.info/biogs/'..id..'.htm '..(label or 'Australian Women\'s Register')..']'..p.getCatForId( 'AWR' )
end
Baris 130 ⟶ 125:
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or '
end
Baris 138 ⟶ 133:
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (
end
Baris 146 ⟶ 141:
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or '
end
Baris 157 ⟶ 152:
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or '
end
Baris 169 ⟶ 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' '
end
Baris 189 ⟶ 184:
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or '
end
Baris 197 ⟶ 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or '
end
Baris 205 ⟶ 200:
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (
end
Baris 214 ⟶ 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 'Ukraina')..']'..p.getCatForId( 'EMU' )
end
Baris 240 ⟶ 243:
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or '
end
Baris 276 ⟶ 279:
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Integrated Authority File (Jerman)')..']'..p.getCatForId( 'GND' )
end
Baris 302 ⟶ 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 334 ⟶ 337:
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (
end
Baris 352 ⟶ 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 360 ⟶ 363:
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (
end
Baris 372 ⟶ 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
function p.maLink( id, label )
--P6366's format regex: [1-9]\d{
if not id:match( '^[1-9]%d%d%d%d?%d?%d?%d?%d?%d?$' ) then
return false
end
Baris 399 ⟶ 404:
return '['..url..' '..label..']'..cat
else
return '[[MBA (identifier)|MusicBrainz]] ['
end
end
Baris 413 ⟶ 418:
return '['..url..' '..label..']'..cat
else
return '[[MBAREA (identifier)|MusicBrainz]] ['
end
end
Baris 427 ⟶ 432:
return '['..url..' '..label..']'..cat
else
return '[[MBI (identifier)|MusicBrainz]] ['
end
end
Baris 441 ⟶ 446:
return '['..url..' '..label..']'..cat
else
return '[[MBL (identifier)|MusicBrainz]] ['
end
end
Baris 455 ⟶ 460:
return '['..url..' '..label..']'..cat
else
return '[[MBP (identifier)|MusicBrainz]] ['
end
end
Baris 469 ⟶ 474:
return '['..url..' '..label..']'..cat
else
return '[[MBRG (identifier)|MusicBrainz]] ['
end
end
Baris 483 ⟶ 488:
return '['..url..' '..label..']'..cat
else
return '[[MBS (identifier)|MusicBrainz]] ['
end
end
Baris 498 ⟶ 503:
return '['..url..' '..label..']'..cat
else
return '[[MBW (identifier)|MusicBrainz]] ['
end
end
Baris 531 ⟶ 536:
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or '
end
Baris 547 ⟶ 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 563 ⟶ 568:
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or '
end
Baris 589 ⟶ 594:
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or '
end
Baris 605 ⟶ 610:
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or '
end
Baris 613 ⟶ 618:
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or '
end
Baris 638 ⟶ 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 665 ⟶ 670:
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (
end
Baris 673 ⟶ 678:
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (
end
Baris 681 ⟶ 686:
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (
end
Baris 689 ⟶ 694:
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (
end
Baris 697 ⟶ 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 705 ⟶ 710:
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or '
end
Baris 713 ⟶ 718:
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (
end
Baris 729 ⟶ 734:
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (
end
Baris 745 ⟶ 750:
return false
end
return longurl..id..' '..(label or 'Terminologia Anatomica')..']'..p.getCatForId( 'TA98' ) end
Baris 756 ⟶ 762:
end
function p.tepapaLink( id, label )
Baris 775 ⟶ 768:
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (
end
Baris 792 ⟶ 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 837 ⟶ 820:
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or '
end
Baris 846 ⟶ 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 854 ⟶ 838:
function p.append(str, c, length)
while str:len() < length do
str = c
end
return str
Baris 869 ⟶ 853:
local result = (12 - remainder) % 11
if result == 10 then
return
end
return tostring( result )
Baris 921 ⟶ 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 943 ⟶ 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 = 'Artikel Wikipedia
local userCat = '
local miscCat = '
local faultyCat = 'Artikel Wikipedia
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
Baris 957 ⟶ 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 965 ⟶ 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 974 ⟶ 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 994 ⟶ 985:
end
--append sums
wikiTable = wikiTable..'\n'..
'|-\n'..
'! style="text-align: right;" colspan=3|Total'..
'||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 1.001 ⟶ 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',
{ '
{ '
{ '
{ '
{ '
{ '
{ '
{ '
{ 'CINII', 271, p.ciniiLink, 'Basis data ilmiah', 'DA12345678', link = 'CiNii (identifier)' },
{ 'CWGC', 1908, p.cwgcLink, 'Lain-lain', '1234567' },
{ '
{ '
{ '
{ '
{ '
{ 'FAST', 2163, p.fastLink,
{ 'FNZA', 6792, p.fnzaLink,
{ 'GND', 227, p.gndLink,
{ 'HDS', 902, p.hdsLink,
{ 'IAAF', 1146, p.iaafLink,
{ 'ICCU', 396, p.iccuLink,
{ 'ICIA', 1736, p.iciaLink,
{ 'IEU', 9070, p.ieuLink,
{ 'ISNI', 213, p.isniLink,
{ 'Joconde', 347, p.jocondeLink,
{ 'KULTURNAV', 1248, p.kulturnavLink,
{ 'LCCN', 244, p.lccnLink,
{ 'LIR', 886, p.lirLink,
{ 'LNB', 1368, p.lnbLink,
{ 'Léonore', 640, p.leonoreLink,
{ 'MA', 6366, p.maLink,
{ '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,
{ '
{ '
{ 'Trove', 1315, p.troveLink, 'Lain-lain', '12345678', prefix = '[[Trove (identifier)|Trove (Australia)]]' }, --formerly NLA-person
{ '
{ 'ULAN', 245, p.ulanLink, 'Lembaga penelitian seni', '500123456' },
{ 'USCongress', 1157, p.uscongressLink, 'Lain-lain', 'A000123', link = 'US Congress (identifier)' },
{ '
{ '
{ 'WORLDCATID', 7859, nil, 'Umum', nil, link = 'WorldCat Identities (identifier)' },
}
Baris 1.114 ⟶ 1.115:
}
-- Deprecated aliases to p.conf; tracked in [[
-- 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.130 ⟶ 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.148 ⟶ 1.152:
end
--
for _, d in pairs( p.deprecated ) do
local dep, param = d[1], d[2]
Baris 1.154 ⟶ 1.158:
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[
end
end
end
--
local itemId = nil
if namespace ~= 0 then
Baris 1.173 ⟶ 1.177:
--Wikidata fallback if available
if itemId then
local suppressedIdCount = 0
local iMatches = 0
for _, params in ipairs( p.conf ) do
Baris 1.181 ⟶ 1.186:
if wikidataIds[1] then
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[Kategori:Artikel Wikipedia dengan penanda pengawasan otoritas yang disembunyikan|'..params[1]..']]'
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
Baris 1.198 ⟶ 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 = '[[Kategori:'..sCat..']]'..p.redCatLink(sCat)
end
end
end
--configure rows
local rct = 0
local sectionOrder = {
'Lembaga penelitian seni','Kamus biografi','Basis data ilmiah',
local sections = {
[
[
[
[
[
[
[
}
--
--
if parentArgs.PLWABN or parentArgs.plwabn then
parentArgs.NLP = ''
Baris 1.230 ⟶ 1.245:
table.insert( tval, val )
if params.prefix then
table.insert( tlinks, params[3]( val,
else
table.insert( tlinks, params[3]( val ) )
Baris 1.256 ⟶ 1.271:
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( '
end
end
end
Baris 1.265 ⟶ 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
elseif worldcatId == nil then --if WORLDCATID absent but unsuppressed
local viafId = parentArgs['viaf'] or parentArgs['VIAF']
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
elseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validated
local lccnParts = p.splitLccn( lccnId )
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
rct = rct + 1
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.311 ⟶ 1.324:
for _, sectName in ipairs(sectionOrder) do
if #sections[sectName] ~= 0 then
navboxArgs[
navboxArgs[
sectionID = sectionID + 1
end
end
if navboxArgs.group2 then
navboxArgs.title = '[[Bantuan:Pengawasan otoritas|Pengawasan otoritas]]'..pencil
else
local sect = navboxArgs.group1
if sect ==
-- Just say "Authority control" with no label if only general or only other IDs are present
-- since "general" is redundant and "other" is silly when there's nothing to contrast it with
navboxArgs.group1 =
else
navboxArgs.group1 =
end
end
Baris 1.339 ⟶ 1.344:
end
--auxCats
if rct == 0 or rct >= 25 then
if namespace == 0 or testcases then
local eCat = 'AC dengan '..rct..' elemen'
elementsCat = '[[Kategori:'..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 yang menggunakan parameter state: collapsed'
elseif parentArgs.state == 'expanded' then sCat = 'AC yang menggunakan parameter state: expanded'
elseif parentArgs.state == 'autocollapse' then sCat = 'AC yang menggunakan parameter state: autocollapse'
else sCat = 'AC yang menggunakan parameter state: other'
end
stateCat = '[[Kategori:'..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
|