Module:Authority control
தோற்றம்
| Related pages |
|---|
This module uses one or more விக்கித்தரவு properties; see § Parameters for details.
| This module depends on the following other modules: |
This module contains the code of the {{Authority control}} template. See its documentation.
Parameters, Wikidata properties, and tracking categories
[தொகு]| Parameter | Label | Wikidata property | Tracking categories and page counts | |||
|---|---|---|---|---|---|---|
| Articles | User pages | Misc. pages | Faulty IDs | |||
| AAG | AAG | P3372: Auckland Art Gallery artist ID | 0 | 0 | 0 | 0 |
| ACM-DL | ACM DL | P864: ACM Digital Library author ID | 0 | 0 | 0 | 0 |
| ADB | ADB | P1907: Australian Dictionary of Biography ID | 0 | 0 | 0 | 0 |
| AGSA | AGSA | P6804: Art Gallery of South Australia creator ID | 0 | 0 | 0 | 0 |
| autores.uy | autores.uy | P2558: autores.uy ID | 0 | 0 | 0 | 0 |
| AWR | AWR | P4186: Australian Women's Register ID | 0 | 0 | 0 | 0 |
| BALaT | BALaT | P3293: BALaT object ID | 0 | 0 | 0 | 0 |
| BIBSYS | BIBSYS | P1015: NORAF ID | 0 | 0 | 0 | 0 |
| Bildindex | Bildindex | P2092: Bildindex der Kunst und Architektur ID | 0 | 0 | 0 | 0 |
| BNC | BNC | P1890: CCAB ID | 0 | 0 | 0 | 0 |
| BNE | BNE | P950: National Library of Spain SpMaBN ID (BNE v1.0) | 0 | 0 | 0 | 0 |
| BNF | BNF | P268: BnF ID | 0 | 0 | 0 | 0 |
| Botanist | Botanist | P428: தாவரவியல் ஆசிரியர் சுருக்கம் | 0 | 0 | 0 | 0 |
| BPN | BPN | P651: Biografisch Portaal van Nederland ID | 0 | 0 | 0 | 0 |
| CANTIC | CANTIC | P1273 | 0 | 0 | 0 | 0 |
| CINII | CiNii | P271: NACSIS-CAT author ID | 0 | 0 | 0 | 0 |
| DAAO | DAAO | P1707: Design & Art Australia Online ID | 0 | 0 | 0 | 0 |
| DBLP | DBLP | P2456: DBLP author ID | 0 | 0 | 0 | 0 |
| DSI | DSI | P2349: Stuttgart Database of Scientific Illustrators ID | 0 | 0 | 0 | 0 |
| FNZA | FNZA | P6792: Find NZ Artists ID | 0 | 0 | 0 | 0 |
| GND | GND | P227: GND | 0 | 0 | 0 | 0 |
| HDS | HDS | P902: HDS ID | 0 | 0 | 0 | 0 |
| IAAF | World Athletics | P1146: World Athletics athlete ID | 0 | 0 | 0 | 0 |
| ICCU | ICCU | P396: SBN author ID | 0 | 0 | 0 | 0 |
| ICIA | ICIA | P1736: Information Center for Israeli Art artist ID | 0 | 0 | 0 | 0 |
| ISNI | ISNI | P213: ISNI | 0 | 0 | 0 | 0 |
| Joconde | Joconde | P347: Joconde work ID | 0 | 0 | 0 | 0 |
| KULTURNAV | KulturNav | P1248: KulturNav-ID | 0 | 0 | 0 | 0 |
| LCCN | LCCN | P244: Library of Congress Authorities ID | 0 | 0 | 0 | 0 |
| LIR | LIR | P886: Lexicon istoric retic ID | 0 | 0 | 0 | 0 |
| LNB | LNB | P1368: National Library of Latvia ID | 0 | 0 | 0 | 0 |
| Léonore | Léonore | P640: Léonore ID | 0 | 0 | 0 | 0 |
| MBA | MusicBrainz | P434: MusicBrainz artist ID | 0 | 0 | 0 | 0 |
| MBAREA | MusicBrainz | P982: MusicBrainz area ID | 0 | 0 | 0 | 0 |
| MBI | MusicBrainz | P1330: MusicBrainz instrument ID | 0 | 0 | 0 | 0 |
| MBL | MusicBrainz | P966: MusicBrainz label ID | 0 | 0 | 0 | 0 |
| MBP | MusicBrainz | P1004: MusicBrainz place ID | 0 | 0 | 0 | 0 |
| MBRG | MusicBrainz release group | P436: MusicBrainz release group ID | 0 | 0 | 0 | 0 |
| MBS | MusicBrainz | P1407: MusicBrainz series ID | 0 | 0 | 0 | 0 |
| MBW | MusicBrainz work | P435: MusicBrainz work ID | 0 | 0 | 0 | 0 |
| MGP | MGP | P549: Mathematics Genealogy Project ID | 0 | 0 | 0 | 0 |
| NARA | NARA | P1225: U.S. National Archives Identifier | 0 | 0 | 0 | 0 |
| NCL | NCL | P1048: NCL ID | 0 | 0 | 0 | 0 |
| NDL | NDL | P349: NDL அடையாளயெண் | 0 | 0 | 0 | 0 |
| NGV | NGV | P2041: National Gallery of Victoria artist ID | 0 | 0 | 0 | 0 |
| NKC | NKC | P691: NL CR AUT ID | 0 | 0 | 0 | 0 |
| NLA | NLA | P409: Libraries Australia ID | 0 | 0 | 0 | 0 |
| NLG | NLG | P3348: National Library of Greece ID | 0 | 0 | 0 | 0 |
| NLI | NLI | P949: இசுரேல் தேசிய நூலக எண் | 0 | 0 | 0 | 0 |
| NLK | NLK | P5034: National Library of Korea ID | 0 | 0 | 0 | 0 |
| NLP | NLP | P1695: NLP ID | 0 | 0 | 0 | 0 |
| NLR | NLR | P1003: National Library of Romania ID | 0 | 0 | 0 | 0 |
| NSK | NSK | P1375: NSK (VIAF) ID | 0 | 0 | 0 | 0 |
| NTA | NTA | P1006: Nationale Thesaurus voor Auteursnamen ID | 0 | 0 | 0 | 0 |
| ORCID | ORCID | P496: ORCID iD | 0 | 0 | 0 | 0 |
| PIC | PIC | P2750: Photographers' Identities Catalog ID | 0 | 0 | 0 | 0 |
| RID | ResearcherID | P1053: Web of Science ResearcherID | 0 | 0 | 0 | 0 |
| RERO | RERO | P3065: RERO ID | 0 | 0 | 0 | 0 |
| RKDartists | RKD | P650: RKDartists ID | 0 | 0 | 0 | 0 |
| RKDID | RKDimages ID | P350: RKDimages ID | 0 | 0 | 0 | 0 |
| RSL | RSL | P947: RSL ID (person) | 0 | 0 | 0 | 0 |
| SELIBR | SELIBR | P906: SELIBR ID | 0 | 0 | 0 | 0 |
| SIKART | SIKART | P781: SIKART person ID | 0 | 0 | 0 | 0 |
| SNAC-ID | SNAC | P3430: SNAC ARK ID | 0 | 0 | 0 | 0 |
| SUDOC | SUDOC | P269: IdRef ID | 0 | 0 | 0 | 0 |
| S2AuthorId | S2AuthorId | P4012: Semantic Scholar author ID | 0 | 0 | 0 | 0 |
| TA98 | TA98 | P1323: Terminologia Anatomica 98 ID | 0 | 0 | 0 | 0 |
| TDVİA | TDVİA | P7314: TDV Encyclopedia of Islam ID | 0 | 0 | 0 | 0 |
| TE | TE | P1693: Terminologia Embryologica | 0 | 0 | 0 | 0 |
| TePapa | TePapa | P3544: Te Papa agent ID | 0 | 0 | 0 | 0 |
| TH | TH | P1694: Terminologia Histologica | 0 | 0 | 0 | 0 |
| TLS | TLS | P1362: Theaterlexikon der Schweiz ID | 0 | 0 | 0 | 0 |
| Trove | Trove | P1315: National Library of Australia Person ID | 0 | 0 | 0 | 0 |
| UKPARL | UKPARL | P6213: UK Parliament ID | 0 | 0 | 0 | 0 |
| ULAN | ULAN | P245: Union List of Artist Names ID | 0 | 0 | 0 | 0 |
| USCongress | US Congress | P1157: US Congress Bio ID | 0 | 0 | 0 | 0 |
| VcBA | VcBA | P8034: Vatican Library VcBA ID | 0 | 0 | 0 | 0 |
| VIAF | VIAF | P214: VIAF அடையாளம் காட்டி | 0 | 0 | 0 | 0 |
| WORLDCATID | WorldCat Identities | P7859 | 0 | 0 | 0 | 0 |
Additional tracking categories
[தொகு]This module also implements the following hidden tracking categories:
- Category:Pages with red-linked authority control categories (0) – error category to identify missing categories
- Category:Wikipedia articles with deprecated authority control identifiers (0) – fix/migrate/remove deprecated IDs
- Category:Wikipedia articles with suppressed authority control identifiers (0) – tracking only (no error)
- Category:Pages using authority control with parameters (2) – migrate IDs to Wikidata if possible (no error)
- Category:VIAF not on Wikidata (0)
- Category:VIAF different on Wikidata (0)
- Category:Wikipedia articles with WorldCat identifiers (0)
- Category:Wikipedia articles with WorldCat-LCCN identifiers (0)
- Category:Wikipedia articles with WorldCat-VIAF identifiers (0)
Number of identifiers
[தொகு]- Category:AC with 25 elements (0)
- Category:AC with 26 elements (0)
- Category:AC with 27 elements (0)
- Category:AC with 28 elements (0)
- Category:AC with 29 elements (0)
- Category:AC with 30 elements (0)
- Category:AC with 31 elements (0)
- Category:AC with 32 elements (0)
- Category:AC with 33 elements (0)
- Category:AC with 34 elements (0)
- Category:AC with 35 elements (0)
- Category:AC with 36 elements (0)
- Category:AC with 37 elements (0)
- Category:AC with 38 elements (0)
- Category:AC with 39 elements (0)
require('strict')
local p = {}
local configfile = 'Module:Authority control/config' -- default configuation module
local arg = mw.getCurrentFrame().args.config
if arg and arg~='' then
configfile = 'Module:Authority control/config/' .. arg
end
local config
if mw.title.new(configfile).exists then
config = mw.loadData(configfile)
else
return error('Invalid configuration file',0)
end
local title = mw.title.getCurrentTitle()
local namespace = title.namespace
local testcases = title.subpageText == config.i18n.testcases
local function needsAttention(sortkey)
return '[[' .. config.i18n.category .. ':' .. config.i18n.attentioncat .. '|' .. sortkey .. title.text .. ']]'
end
local function addCat(cat,sortkey)
if cat and cat ~= '' and (namespace == 0 or namespace == 14 or testcases) then
local redlinkcat = ''
if testcases == false and mw.title.new(cat, 14).exists == false then
redlinkcat = needsAttention('N')
end
if sortkey then
cat = '[[' .. config.i18n.category .. ':'..cat..'|' .. sortkey .. title.text .. ']]'
else
cat = '[[' .. config.i18n.category .. ':'..cat..']]'
end
cat = cat .. redlinkcat
return cat
else
return ''
end
end
local function getCatForId(id,faulty)
local cat = config.i18n.Articles_with .. ' '
if faulty then cat = cat .. config.i18n.faulty .. ' ' end
cat = cat .. id .. ' ' .. config.i18n.identifiers
return addCat(cat)
end
local function getIdsFromWikidata(qid,property)
local function getquals(statement,qualid)
if statement.qualifiers and statement.qualifiers['P'..qualid] then
return mw.wikibase.renderSnak(statement.qualifiers['P'..qualid][1])
else
return false
end
end
local ids = {}
if qid then
for _, statement in ipairs(mw.wikibase.getBestStatements(qid,property)) do
if statement.mainsnak.datavalue then
local val = statement.mainsnak.datavalue.value
if val then
local namedas = getquals(statement,1810) or getquals(statement,742) or ''
table.insert(ids,{id=val,name=namedas})
end
end
end
end
return ids
end
local _makelink = function(conf,val,nextid,qid) --validate values and create a link
local function tooltip(text,label)
if label and label~='' then
return mw.getCurrentFrame():expandTemplate{title = "Tooltip", args = {text,label}}
else
return text
end
end
local link
if nextid==1 then
if conf.prefix then
link = '*' .. conf.prefix .. '\n**'
else
link = '*'
end
else
link = '\n**'
end
local valid_value = false
if conf.customlink then -- use function to validate and generate link
local label = nextid>1 and nextid
local newlink= require(config.auxiliary)[conf.customlink](val.id,label)
if newlink then
link = link .. newlink
valid_value = true
end
else
if conf.pattern then -- use pattern to determine validity if defined
valid_value = string.match(val.id,'^'..conf.pattern..'$')
elseif conf.patterns then
for _,pattern in ipairs(conf.patterns) do
valid_value = val.id:match('^'..pattern..'$')
if valid_value then break end
end
elseif conf.valid then -- otherwise use function to determine validity
valid_value = require(config.auxiliary)[conf.valid](val.id)
else -- no validation possible
valid_value = val.id
end
if valid_value then
local newlink
local label = conf.label
if not label or nextid>1 then
label = tostring(nextid)
end
if conf.link then
valid_value = valid_value:gsub('%%', '%%%%')
newlink = '[' .. mw.ustring.gsub(conf.link,'%$1',valid_value) .. ' ' .. label .. ']'
else
newlink = valid_value
end
link = link .. '<span class="uid">'..tooltip(newlink,val.name)..'</span>'
end
end
if valid_value then
link = link .. getCatForId(conf.category or conf[1])
else
--local preview = require("Module:If preview")
local wdlink = qid and '[[:wikidata:' .. qid .. '#P' .. conf.property .. ']]' or ''
link = link .. '[[File:' .. config.i18n.warningicon .. '|20px|frameless|link=' .. wdlink .. '|' .. config.i18n.The .. ' ' .. conf[1] .. ' ' .. config.i18n.identifier .. ' ' .. val.id .. ' ' .. config.i18n.isnotvalid .. '.]]'
if conf.errorcat then
link = link .. addCat(conf.errorcat)
else
link = link .. getCatForId(conf.category or conf[1],true)
end
link = link .. addCat(config.i18n.allfaultycat,conf[1])-- .. preview._warning({'The '..conf[1]..' id '..val..' is not valid.'})
end
return link
end
--[[==========================================================================]]
--[[ Main ]]
--[[==========================================================================]]
function p.authorityControl(frame)
local function resolveQID(qid)
if qid then
qid = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '')
if mw.wikibase.isValidEntityId(qid) and mw.wikibase.entityExists(qid) then
local sitelink = mw.wikibase.getSitelink(qid)
if sitelink then
return mw.wikibase.getEntityIdForTitle(sitelink) or mw.wikibase.getEntity(qid).id
end
return mw.wikibase.getEntity(qid).id
end
end
end
local conf = config.config
local parentArgs = frame:getParent().args
local auxCats = ''
local rct = false -- boolean to track if there are any links to be returned
local qid,topic
local wikilink = function(qid,hideifequal)
local label,sitelink = mw.wikibase.getLabel(qid),mw.wikibase.getSitelink(qid)
if label then
if sitelink then
local target = mw.title.new(sitelink)
if target==title or (target.isRedirect and target.redirectTarget==title) then -- do not link
return label
else -- make wikilink to article
return '[[' .. sitelink .. '|' .. label .. ']]'
end
else
return label
end
else
auxCats = auxCats .. needsAttention('L')
return qid
end
end
if namespace == 0 then
qid = mw.wikibase.getEntityIdForCurrentPage()
end
if qid then -- article is connected to Wikidata item
if parentArgs.qid and (resolveQID(parentArgs.qid) ~= qid) then -- non-matching qid parameter
auxCats = auxCats .. needsAttention('D')
end
else -- page is not connected to any Wikidata item
qid = resolveQID(parentArgs.qid) -- check qid parameter if no wikidata item is connected
if qid then -- qid parameter is valid, set topic to display
topic = mw.wikibase.getLabel(qid)
if topic then
if mw.ustring.lower(title.subpageText) == mw.ustring.lower(topic) then -- suppress topic display if subpagename equals topic up to case change
topic = nil
end
if topic and mw.wikibase.getSitelink(qid) then -- make wikilink to article
topic = '[[' .. mw.wikibase.getSitelink(qid) .. '|' .. topic .. ']]'
end
else
auxCats = auxCats .. needsAttention('L')
end
elseif parentArgs.qid and parentArgs.qid~='' then -- invalid qid has been supplied, add to tracking cat
auxCats = auxCats .. needsAttention('Q')
end
end
local qids = {} -- setup any additional QIDs
if parentArgs.additional=='auto' and qid then -- check P527 for parts to add additional qids
local checkparts = function(property)
local parts = mw.wikibase.getBestStatements(qid,property)
if parts then
for _,part in ipairs(parts) do
if part.mainsnak.datavalue and part.mainsnak.datavalue.value.id then
local resolvedqid = resolveQID(part.mainsnak.datavalue.value.id)
if resolvedqid then
table.insert(qids,resolvedqid)
end end end end end
for _,part in ipairs(config.auto_additional) do
checkparts('P'..tostring(part))
end
elseif parentArgs.additional and parentArgs.additional ~= '' then
for _,v in ipairs(mw.text.split(parentArgs.additional,"%s*,%s*")) do
v = resolveQID(v)
if v then
if v == qid then -- duplicate of qid parameter
auxCats = auxCats .. needsAttention('R')
end
table.insert(qids,v)
else -- invalid QID specified
auxCats = auxCats .. needsAttention('A')
end
end
end
local sections = {}
local localparams = false
local numsections = 0
for _,_ in ipairs(config.sections) do numsections = numsections + 1 end
for _ = 1,#qids+numsections do table.insert(sections,{}) end
local qslink = '' -- setup link to add using QuickStatements
-- check which identifiers to show/suppress in template
local show = {} -- setup list
local showall = true
local function stripP(pid)
if pid:match("^[Pp]%d+$") then
pid = mw.ustring.gsub(pid,'[Pp]','') --strip P from property number
end
if pid:match("^%d+$") then
return tonumber(pid)
end
end
local function addshowlist(list)
if list and list ~= '' then
for _,v in ipairs(mw.text.split(string.lower(list),"%s*,%s*")) do
local vprop = stripP(v)
if vprop then -- e.g. show=P214 to show one particular property
show[vprop] = true
else -- e.g. show=arts to use whitelist
if config.whitelists[v] then
for _,w in ipairs(config.whitelists[v].properties) do
show[w] = true
end
end
end
end
showall = false
end
end
addshowlist(frame.args.show) -- check show= parameter on wrapper template
addshowlist(parentArgs.show or parentArgs.country) -- check show parameter on article template
if parentArgs.suppress then
local suppresslist = mw.text.split(parentArgs.suppress,"%s*,%s*") -- split parameter by comma
for _,v in ipairs(suppresslist) do
v = stripP(string.upper(v))
if v then
show[v] = false
auxCats = auxCats .. '[[' .. config.i18n.category .. ':' .. config.i18n.suppressedcat .. ']]'
else
auxCats = auxCats .. needsAttention('P')
end
end
end
local function makeSections(qid,addit)
local tval = {}
local function parameter_is_used(property)
local used = false
if property then
if tval[property] then
if tval[property][1] then
used = true
end
elseif tval[property] == false then -- property has been manually suppressed
used = true
end
end
return used
end
for _, params in ipairs(conf) do
tval[params.property] = getIdsFromWikidata(qid, 'P' .. params.property) -- setup table for values with property number as key
local showb = true
if (show[params.property] == nil) and (show[string.upper(params[1])] == nil ) then
showb = showall -- if not specified then depends on showall
elseif (show[params.property] == false) or (show[string.upper(params[1])] == false) then -- if either are false then id will be suppressed
showb = false
end
if not showb then
tval[params.property] = false -- indicates the identifier is suppressed
elseif not addit then
local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]
if val and val~='' then -- add local parameter to list if not already in
localparams = true
local bnew = true
for _, w in pairs(tval[params.property]) do
if val == w.id then
bnew = false
end
end
if bnew then -- add new value to table
if qid then
qslink = qslink .. '%7C%7C' .. qid .. '%7CP' .. params.property .. '%7C%22' .. mw.uri.encode(val,"PATH") .. '%22%7CS143%7CQ328'
end
table.insert(tval[params.property],{id=val,name=''})
end
end
end
local suppress = false
if params.suppressedbyproperty then
for _,sc in ipairs(params.suppressedbyproperty) do
if parameter_is_used(sc) then
suppress = true
end
end
end
if tval[params.property] ~= false and not suppress then
local tlinks = {} -- setup table for links
local nextIdVal = 1
local row = ''
for _,val in ipairs(tval[params.property]) do
local link = _makelink(params,val,nextIdVal,qid)
row = row .. link
table.insert(tlinks,link)
nextIdVal = nextIdVal + 1
end
if nextIdVal>=2 then
row = row .. '\n'
table.insert(sections[addit or params.section],row)
rct = true
end
end
end
end
local function pencil(qid)
if not qid then
return ''
end
local args = { pid = 'identifiers' } -- #target the list of identifiers
args.qid = qid
return require('Module:EditAtWikidata')._showMessage(args)
end
makeSections(qid,false)
for c = 1,#qids do
makeSections(qids[c],numsections+c)
end
--configure Navbox
local outString = ''
if rct or localparams then -- there is at least one link to display
local Navbox = require('Module:Navbox')
local sect,lastsect = 0,0
local navboxArgs = {
name = 'Authority control',
navboxclass = 'authority-control',
bodyclass = 'hlist',
state = parentArgs.state or config.i18n.autocollapse,
navbar = 'off'
}
for c=1,numsections+#qids do
if #sections[c] ~= 0 then -- section is non-empty
sect = sect + 1
lastsect = c
local sectname
if c <= numsections then -- regular section
sectname = config.sections[c].name
else -- section from additional qid
local qid = qids[c-numsections]
sectname = wikilink(qid) .. pencil(qid)
end
navboxArgs['group' .. c] = sectname
navboxArgs['list' .. c] = table.concat(sections[c])
end
end
if localparams then
lastsect = lastsect + 1
sect = sect + 1
navboxArgs['group' .. lastsect] = config.i18n.warning
local warning = frame:expandTemplate{title = config.i18n.errortemplate, args = {config.i18n.localparams}}
if qslink ~= '' then
warning = warning .. ' ' .. config.i18n.movetowd .. '<span class="qs autoconfirmed-show"> [[File:Commons to Wikidata QuickStatements.svg|20px|link=https://quickstatements.toolforge.org/#/v1=' .. qslink .. '|' .. config.i18n.addtowd .. ']]</span>'
elseif not qid then
if namespace == 0 then
warning = warning .. ' ' .. config.i18n.connecttowd
elseif namespace==14 or namespace==2 or namespace==118 then
warning = warning .. ' ' .. config.i18n.qidcode
end
end
navboxArgs['list' .. lastsect] = warning
end
if topic then -- display in expanded form with topic
navboxArgs.title = config.i18n.aclink .. ' – ' .. topic .. pencil(qid)
elseif sect == 1 then -- special display when only one section
if lastsect <= numsections then
if config.sections[lastsect].hidelabelwhenalone then -- no special label when only general or other IDs are present
navboxArgs['group' .. lastsect] = config.i18n.aclink .. pencil(qid)
else -- other regular section
navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect] .. pencil(qid)
end
else -- section from additional qid
navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect]
end
else -- add title to navbox
navboxArgs.title = config.i18n.aclink .. pencil(qid)
end
outString = Navbox._navbox(navboxArgs)
end
if parentArgs.state
and parentArgs.state~=''
and parentArgs.state~=config.i18n.collapsed
and parentArgs.state~=config.i18n.expanded
and parentArgs.state~=config.i18n.autocollapse then --invalid state parameter
auxCats = auxCats .. needsAttention('S')
end
if testcases then
auxCats = mw.ustring.gsub(auxCats, '(%[%[)(' .. config.i18n.category .. ')', '%1:%2') --for easier checking
end
--out
outString = outString..auxCats
if namespace ~= 0 then
outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.Articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4')
outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.All_articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4')
end
local check = require('Module:Check for unknown parameters')._check
local sortkey
if namespace == 0 then
sortkey = '*' .. title.text
else
sortkey = title.fullText
end
outString = outString .. check({
['unknown'] = '[[' .. config.i18n.category .. ':' .. config.i18n.pageswithparams .. '|' .. sortkey .. ']]',
['preview'] = config.i18n.previewwarning, 'show', 'country', 'suppress', 'additional', 'qid', 'state'
}, parentArgs)
return outString
end
p.makelink = function(conf,val,nextid,qid)
return _makelink(conf,val,nextid,qid)
end
return p