<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>http://manyo.wpx.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AAuthority_control</id>
	<title>モジュール:Authority control - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="http://manyo.wpx.jp/w/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AAuthority_control"/>
	<link rel="alternate" type="text/html" href="http://manyo.wpx.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control&amp;action=history"/>
	<updated>2026-10-06T07:41:45Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://manyo.wpx.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control&amp;diff=270&amp;oldid=prev</id>
		<title>Hisato Shima: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="http://manyo.wpx.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control&amp;diff=270&amp;oldid=prev"/>
		<updated>2023-07-31T09:48:24Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2023年7月31日 (月) 18:48時点における版&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key manyo_mwiki-m:diff::1.12:old-269:rev-270 --&gt;
&lt;/table&gt;</summary>
		<author><name>Hisato Shima</name></author>
	</entry>
	<entry>
		<id>http://manyo.wpx.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control&amp;diff=269&amp;oldid=prev</id>
		<title>wikipedia&gt;Dragoniez: モジュール:Authority_control/sandboxの2023-01-06T12:15:01Z版より複製 (スクリプトによる) : WP:AN/PEでの追加依頼</title>
		<link rel="alternate" type="text/html" href="http://manyo.wpx.jp/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control&amp;diff=269&amp;oldid=prev"/>
		<updated>2023-01-07T05:20:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/w/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Authority_control/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;モジュール:Authority control/sandbox (存在しないページ)&quot;&gt;モジュール:Authority_control/sandbox&lt;/a&gt;の&lt;a href=&quot;/wiki/%E7%89%B9%E5%88%A5:%E5%9B%BA%E5%AE%9A%E3%83%AA%E3%83%B3%E3%82%AF/93264450&quot; title=&quot;特別:固定リンク/93264450&quot;&gt;2023-01-06T12:15:01Z版&lt;/a&gt;より複製 (&lt;a href=&quot;/w/index.php?title=H:FAP&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;H:FAP (存在しないページ)&quot;&gt;スクリプト&lt;/a&gt;による) : &lt;a href=&quot;/wiki/%E7%89%B9%E5%88%A5:%E5%9B%BA%E5%AE%9A%E3%83%AA%E3%83%B3%E3%82%AF/93264596#モジュール:Authority_control（ノート_/_履歴_/_ログ_/_リンク元）&quot; title=&quot;特別:固定リンク/93264596&quot;&gt;WP:AN/PE&lt;/a&gt;での追加依頼&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('strict')&lt;br /&gt;
local p = {}&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
local namespace = title.namespace&lt;br /&gt;
local testcases = (string.sub(title.subpageText,1,9) == 'testcases')&lt;br /&gt;
&lt;br /&gt;
local function addCat(cat)&lt;br /&gt;
	if cat and cat ~= '' then&lt;br /&gt;
		local redlinkcat = ''&lt;br /&gt;
		if testcases == false and mw.title.new(cat, 14).exists == false then&lt;br /&gt;
			redlinkcat = '[[Category:赤リンクの典拠情報カテゴリがあるページ]]'&lt;br /&gt;
		end&lt;br /&gt;
		return '[[Category:'..cat..']]'..redlinkcat&lt;br /&gt;
	else&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getCatForId(id)&lt;br /&gt;
	local cat = ''&lt;br /&gt;
	if namespace == 0 then&lt;br /&gt;
		cat = id..'識別子が指定されている記事'&lt;br /&gt;
	end&lt;br /&gt;
	return addCat(cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIdsFromWikidata(qid,property)&lt;br /&gt;
	local ids = {}&lt;br /&gt;
	if not mw.wikibase or not qid then&lt;br /&gt;
		return ids&lt;br /&gt;
	end&lt;br /&gt;
	local statements = mw.wikibase.getBestStatements(qid,property)&lt;br /&gt;
	if statements then&lt;br /&gt;
		for _, statement in ipairs( statements ) do&lt;br /&gt;
			if statement.mainsnak.datavalue then&lt;br /&gt;
				table.insert( ids, statement.mainsnak.datavalue.value )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ids&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makelink(conf,val,nextid) --validate values and create a link&lt;br /&gt;
	local link&lt;br /&gt;
	if conf.link2 then -- use function to validate and generate link&lt;br /&gt;
		link = conf.link2(val)&lt;br /&gt;
	else&lt;br /&gt;
		local valid_value&lt;br /&gt;
		if conf.pattern then -- use pattern to determine validity if defined&lt;br /&gt;
			valid_value = val:match(conf.pattern)&lt;br /&gt;
		elseif conf.patterns then&lt;br /&gt;
			for i = 1,#conf.patterns do&lt;br /&gt;
				valid_value = val:match(conf.patterns[i])&lt;br /&gt;
				if valid_value then break end&lt;br /&gt;
			end&lt;br /&gt;
		elseif conf.valid then -- otherwise use function to determine validity&lt;br /&gt;
			valid_value = conf.valid(val)&lt;br /&gt;
		else -- no validation possible&lt;br /&gt;
			valid_value = val&lt;br /&gt;
		end&lt;br /&gt;
		if valid_value then&lt;br /&gt;
			local label = conf.label&lt;br /&gt;
			if not label or nextid&amp;gt;1 then&lt;br /&gt;
				label = tostring(nextid)&lt;br /&gt;
			end&lt;br /&gt;
			if conf.link then&lt;br /&gt;
				valid_value = valid_value:gsub('%%', '%%%%')&lt;br /&gt;
				link = '[' .. mw.ustring.gsub(conf.link,'%$1',valid_value) .. ' ' .. label .. ']'&lt;br /&gt;
			else&lt;br /&gt;
				link = valid_value&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			link = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if link then&lt;br /&gt;
		link = '&amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;'..link..'&amp;lt;/span&amp;gt;'&lt;br /&gt;
	else&lt;br /&gt;
		local faultyCat = '誤った'..(conf.errorcat or conf.category or conf[1])..'識別子が指定されている記事'&lt;br /&gt;
		link = '&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;'..conf[1]..'識別子の値'..val..'は正しくありません。&amp;lt;/span&amp;gt;'..addCat(faultyCat)&lt;br /&gt;
	end&lt;br /&gt;
	return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                                   Main                                   ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
function p.authorityControl(frame)&lt;br /&gt;
	local config = require(&amp;quot;Module:Authority control/config&amp;quot;)&lt;br /&gt;
	local conf = config.config&lt;br /&gt;
	local sectionNames = config.sectionNames&lt;br /&gt;
	local aliases = config.aliases&lt;br /&gt;
	local deprecated = config.deprecated&lt;br /&gt;
	local resolveEntity = require( 'Module:ResolveEntityId' )&lt;br /&gt;
	local parentArgs = frame:getParent().args --WD IDs added here later&lt;br /&gt;
	local iParentArgs = 0 --count original/manual parent args only later&lt;br /&gt;
	local iMatches,suppressedIdCount = 0,0&lt;br /&gt;
	local auxCats = ''&lt;br /&gt;
	local rct = 0 -- total number of links returned&lt;br /&gt;
	local numqids = 4 -- support for 4 additional qids&lt;br /&gt;
	local totsect = #sectionNames + numqids&lt;br /&gt;
	local sections = {}&lt;br /&gt;
	for _ = 1,totsect do table.insert(sections,{}) end&lt;br /&gt;
	&lt;br /&gt;
	-- check for suppressed identifiers&lt;br /&gt;
	local suppress = {}&lt;br /&gt;
	if parentArgs.suppress then&lt;br /&gt;
		local suppresslist = mw.text.split(parentArgs.suppress,&amp;quot;%s*,%s*&amp;quot;) -- split parameter by comma&lt;br /&gt;
		for _,v in ipairs(suppresslist) do&lt;br /&gt;
			if v:match(&amp;quot;^%d+$&amp;quot;) then&lt;br /&gt;
				v = &amp;quot;P&amp;quot;..tostring(v)&lt;br /&gt;
			else&lt;br /&gt;
				v = string.upper(v)&lt;br /&gt;
			end&lt;br /&gt;
			suppress[v] = true -- index table by identifier name&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--redirect aliases to proper parameter names&lt;br /&gt;
	for _, a in pairs(aliases) do&lt;br /&gt;
		local alias, param = a[1], a[2]&lt;br /&gt;
		if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[alias] then&lt;br /&gt;
			parentArgs[param] = parentArgs[alias]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--redirect deprecated parameters to proper parameter names, and assign tracking cat&lt;br /&gt;
	for _, d in pairs( deprecated ) do&lt;br /&gt;
		local dep, param = d[1], d[2]&lt;br /&gt;
		if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[dep] then&lt;br /&gt;
			parentArgs[param] = parentArgs[dep]&lt;br /&gt;
			if namespace == 0 then&lt;br /&gt;
				auxCats = auxCats .. '[[Category:非推奨の典拠管理識別子が指定されている記事|'..dep..']]'&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function makeSections(qid,additional)&lt;br /&gt;
		local tval = {}&lt;br /&gt;
		local function parameter_is_used(property)&lt;br /&gt;
			local used = false&lt;br /&gt;
			if property then&lt;br /&gt;
				if tval[property] then&lt;br /&gt;
					if tval[property][1] then&lt;br /&gt;
						used = true&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return used&lt;br /&gt;
		end&lt;br /&gt;
		for _, params in ipairs(conf) do&lt;br /&gt;
			tval[params.property] = getIdsFromWikidata(qid, 'P' .. params.property) -- setup table for values with property number as key&lt;br /&gt;
			if additional then&lt;br /&gt;
				if suppress[&amp;quot;P&amp;quot;..tostring(params.property)] or suppress[string.upper(params[1])] then&lt;br /&gt;
					tval[params.property] = false -- indicates the identifier is suppressed&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]&lt;br /&gt;
				if suppress[&amp;quot;P&amp;quot;..tostring(params.property)] or suppress[string.upper(params[1])] or val == '' then&lt;br /&gt;
					if tval[params.property][1] and (namespace == 0 or testcases) then&lt;br /&gt;
						suppressedIdCount = suppressedIdCount + 1&lt;br /&gt;
						if parentArgs['arts'] ~= 'arts' then&lt;br /&gt;
							auxCats = auxCats .. '[[Category:抑制された典拠管理識別子がある記事|'..params[1]..']]'&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					tval[params.property] = false -- indicates the identifier is suppressed&lt;br /&gt;
				elseif val then -- add local parameter to wikidata &lt;br /&gt;
					iParentArgs = iParentArgs + 1&lt;br /&gt;
					local bnew = true&lt;br /&gt;
					for _, w in pairs(tval[params.property]) do&lt;br /&gt;
						if val == w then&lt;br /&gt;
							bnew = false&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					if bnew then -- add new value to table&lt;br /&gt;
						if tval[params.property][1] then&lt;br /&gt;
							auxCats = auxCats .. '[[Category:ウィキデータと異なる典拠管理識別子をパラメータで指定しているページ|'..params[1]..']]'&lt;br /&gt;
						end&lt;br /&gt;
						table.insert(tval[params.property],val)&lt;br /&gt;
					else&lt;br /&gt;
						iMatches = iMatches+1&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			local suppress = false&lt;br /&gt;
			if params.suppressedbyproperty then&lt;br /&gt;
				for _,sc in ipairs(params.suppressedbyproperty) do&lt;br /&gt;
					if parameter_is_used(sc) then&lt;br /&gt;
						suppress = true&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if not tval[params.property] == false and not suppress then&lt;br /&gt;
				local tlinks = {} -- setup table for links&lt;br /&gt;
				local nextIdVal = 1&lt;br /&gt;
				for _,val in ipairs(tval[params.property]) do&lt;br /&gt;
					local link = makelink(params,val,nextIdVal)&lt;br /&gt;
					local cat = params.category or params[1]&lt;br /&gt;
					if link then -- add category unless link==false&lt;br /&gt;
						link = link .. getCatForId(cat)&lt;br /&gt;
					end&lt;br /&gt;
					table.insert(tlinks,link)&lt;br /&gt;
					nextIdVal = nextIdVal + 1&lt;br /&gt;
				end&lt;br /&gt;
				if tval[params.property][1] then -- assemble&lt;br /&gt;
					local row = ''&lt;br /&gt;
					if params.prefix then&lt;br /&gt;
						row = row..'*'..params.prefix&lt;br /&gt;
					end&lt;br /&gt;
					for i, l in ipairs(tlinks) do&lt;br /&gt;
						if i==1 and not params.prefix then&lt;br /&gt;
							row = row..'*'&lt;br /&gt;
						else&lt;br /&gt;
							row = row..'\n**'&lt;br /&gt;
						end&lt;br /&gt;
						row = row .. l&lt;br /&gt;
					end&lt;br /&gt;
					row = row..'\n'&lt;br /&gt;
					local sec = additional or params.section -- uses section 9 for qid2, section 10 for qid3, etc.&lt;br /&gt;
					table.insert(sections[sec],row)&lt;br /&gt;
					rct = rct + 1&lt;br /&gt;
					if tval[params.property][2] then&lt;br /&gt;
						-- auxCats = auxCats .. getCatForId('multiple')&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local function pencil(qid)&lt;br /&gt;
		if not qid then&lt;br /&gt;
			return ''&lt;br /&gt;
		end&lt;br /&gt;
		local args = { pid = 'identifiers' } -- #target the list of identifiers&lt;br /&gt;
		args.qid = qid&lt;br /&gt;
		return require('Module:EditAtWikidata')._showMessage(args)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--use QID= parameter for testing/example purposes only&lt;br /&gt;
	local function resolveQID(qid)&lt;br /&gt;
		if qid then&lt;br /&gt;
			qid = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '')&lt;br /&gt;
			qid = resolveEntity._id(qid) --nil if unresolvable&lt;br /&gt;
		end&lt;br /&gt;
		return qid&lt;br /&gt;
	end&lt;br /&gt;
	local qids = {}&lt;br /&gt;
	if namespace ~= 0 then&lt;br /&gt;
		local qid = parentArgs['qid'] or parentArgs['QID']&lt;br /&gt;
		qids[1] = resolveQID(qid)&lt;br /&gt;
	elseif mw.wikibase then&lt;br /&gt;
		qids[1] = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	end&lt;br /&gt;
	makeSections(qids[1],false)&lt;br /&gt;
	for c = 2,5 do&lt;br /&gt;
		qids[c] = resolveQID(parentArgs['qid' .. c])&lt;br /&gt;
		if qids[c] then makeSections(qids[c],totsect-numqids+c-1) end&lt;br /&gt;
	end&lt;br /&gt;
	if iMatches &amp;gt; 0 and iMatches == iParentArgs then&lt;br /&gt;
		auxCats = auxCats .. '[[Category:ウィキデータと同じ典拠管理識別子をパラメータで指定しているページ]]'&lt;br /&gt;
	end&lt;br /&gt;
	if parentArgs['arts'] == 'arts' and suppressedIdCount &amp;gt; 0 then&lt;br /&gt;
		if namespace == 0 or testcases then&lt;br /&gt;
			auxCats = auxCats .. addCat('ACArtで'..suppressedIdCount..'種類の典拠管理識別子が抑制された記事')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--configure Navbox&lt;br /&gt;
	local outString = ''&lt;br /&gt;
	if rct &amp;gt; 0 then -- there is at least one link to display&lt;br /&gt;
		local Navbox = require('Module:Navbox')&lt;br /&gt;
		local sect,lastsect = 0,0&lt;br /&gt;
		local navboxArgs = {&lt;br /&gt;
			name  = 'Authority control',&lt;br /&gt;
			navboxclass = 'authority-control',&lt;br /&gt;
			bodyclass = 'hlist',&lt;br /&gt;
			state = parentArgs.state or 'autocollapse',&lt;br /&gt;
			navbar = 'off'&lt;br /&gt;
		}&lt;br /&gt;
		for c=1,totsect do&lt;br /&gt;
			if #sections[c] ~= 0 then -- section is non-empty&lt;br /&gt;
				sect = sect + 1&lt;br /&gt;
				lastsect = c&lt;br /&gt;
				local sectname&lt;br /&gt;
				if c &amp;lt;= totsect - numqids then -- regular section&lt;br /&gt;
					sectname = sectionNames[c]&lt;br /&gt;
				else -- section from additional qid&lt;br /&gt;
					sectname = mw.wikibase.getLabel(qids[c-totsect+numqids+1]) .. pencil(qids[c-totsect+numqids +1])&lt;br /&gt;
				end&lt;br /&gt;
				navboxArgs['group' .. c] = sectname&lt;br /&gt;
				navboxArgs['list' .. c] = table.concat(sections[c])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local aclink = '[[Help:典拠管理|典拠管理]]'&lt;br /&gt;
		if sect == 1 then -- special display when only one section&lt;br /&gt;
			if lastsect == 1 or lastsect == 8 then -- no special label when only general or other IDs are present&lt;br /&gt;
				navboxArgs['group' .. lastsect] = aclink .. pencil(qids[1])&lt;br /&gt;
			elseif lastsect &amp;lt;= totsect - numqids  then -- other regular section&lt;br /&gt;
				navboxArgs['group' .. lastsect] = aclink .. ': ' .. sectionNames[lastsect] .. pencil(qids[1])&lt;br /&gt;
			else -- section from additional qid&lt;br /&gt;
				navboxArgs['group' .. lastsect] = aclink .. ': ' .. navboxArgs['group' .. lastsect]&lt;br /&gt;
			end&lt;br /&gt;
		else -- add title to navbox&lt;br /&gt;
			navboxArgs.title = aclink .. pencil(qids[1])&lt;br /&gt;
		end&lt;br /&gt;
		outString = Navbox._navbox(navboxArgs)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--auxCats&lt;br /&gt;
	if rct == 0 then&lt;br /&gt;
		if namespace == 0 or testcases then&lt;br /&gt;
			auxCats = auxCats .. addCat('典拠管理識別子が1つもない記事')&lt;br /&gt;
		end&lt;br /&gt;
	elseif rct &amp;gt;= 25 then&lt;br /&gt;
		if namespace == 0 or testcases then&lt;br /&gt;
			local eCat = rct..'種類の典拠管理識別子がある記事'&lt;br /&gt;
			-- auxCats = auxCats .. addCat(eCat)	--25種類以上の識別子が指定された場合、追跡カテゴリをつけるという機能は日本語版では導入されていない&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if parentArgs.state then&lt;br /&gt;
		if namespace == 0 or testcases then&lt;br /&gt;
			local sCat&lt;br /&gt;
			if parentArgs.state == 'collapsed' then sCat = 'Normdatenでstateにcollapsedを指定している記事'&lt;br /&gt;
			elseif parentArgs.state == 'expanded' then sCat = 'Normdatenでstateにexpandedを指定している記事'&lt;br /&gt;
			elseif parentArgs.state == 'autocollapse' then sCat = 'Normdatenでstateにautocollapseを指定している記事'&lt;br /&gt;
			else sCat = 'Normdatenでstateに不明な値を指定している記事'&lt;br /&gt;
			end&lt;br /&gt;
			-- auxCats = auxCats .. addCat(sCat)	-- 日本語版でのカテゴリ導入は様子を見てから&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if testcases then&lt;br /&gt;
		auxCats = mw.ustring.gsub(auxCats, '(%[%[)(Category)', '%1:%2') --for easier checking&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--out&lt;br /&gt;
	outString = outString..auxCats&lt;br /&gt;
	if namespace ~= 0 then&lt;br /&gt;
		outString = mw.ustring.gsub(outString, '(%[%[)(Category:[^%]]*記事)', '%1:%2') --by definition&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return outString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Creates a human-readable standalone wikitable version of conf, and tracking categories with page counts, for use in the documentation&lt;br /&gt;
function p.docConfTable(frame)&lt;br /&gt;
	local wikiTable = '&amp;lt;table class=&amp;quot;wikitable sortable&amp;quot;&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;tr&amp;gt;&amp;lt;th rowspan=2&amp;gt;引数名&amp;lt;/th&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;th rowspan=2&amp;gt;グループ&amp;lt;/th&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;th rowspan=2&amp;gt;表示名&amp;lt;/th&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;th rowspan=2 data-sort-type=number&amp;gt;ウィキデータのプロパティ&amp;lt;/th&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;th colspan=2&amp;gt;追跡カテゴリおよび該当ページ数&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;[[:Category:典拠管理情報がある記事|記事]]&amp;lt;/th&amp;gt;'..&lt;br /&gt;
	  '&amp;lt;th&amp;gt;[[:Category:誤った典拠管理情報が指定されている記事|誤った識別子]]&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
	local lang = mw.getContentLanguage()&lt;br /&gt;
	local a, f, P = 0, 0, 0 --cumulative sums&lt;br /&gt;
	local config = require(&amp;quot;Module:Authority control/config&amp;quot;)&lt;br /&gt;
	local conf = config.config&lt;br /&gt;
	local sectionNames = config.sectionNames&lt;br /&gt;
	local function checkcat(category,label)&lt;br /&gt;
		local ret='[[:Category:'..category..'|'..label..']]'&lt;br /&gt;
		if mw.title.new(category, 14).exists == false then&lt;br /&gt;
			ret = ret..' &amp;lt;span class=&amp;quot;plainlinks&amp;quot; style=&amp;quot;font-size:85%;&amp;quot;&amp;gt;&amp;amp;#91;['..tostring(mw.uri.fullUrl('Category:'..category,'action=edit&amp;amp;preload=Template:Authority_control/preload'))..' 作成]&amp;amp;#93;&amp;lt;/span&amp;gt;'&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
	for _, conf in pairs(conf) do&lt;br /&gt;
		local param, pid, section = conf[1], conf.property, sectionNames[conf.section]&lt;br /&gt;
		local appearsAs = makelink(conf,conf.example,1)&lt;br /&gt;
		local link = conf.idlink or param..' (識別子)'&lt;br /&gt;
		local category = conf.category or param&lt;br /&gt;
		local args = { id = 'f', pid }&lt;br /&gt;
		local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }&lt;br /&gt;
		local articleCat = category..'識別子が指定されている記事'&lt;br /&gt;
		local faultyCat =  '誤った'.. (conf.errorcat or category) ..'識別子が指定されている記事'&lt;br /&gt;
		local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )&lt;br /&gt;
		local faultyCount =  lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, 'pages') )&lt;br /&gt;
		P = P + 1 --property count&lt;br /&gt;
		a = a + lang:parseFormattedNumber(articleCount)&lt;br /&gt;
		f = f + lang:parseFormattedNumber(faultyCount)&lt;br /&gt;
		wikiTable = wikiTable..'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[['..link..'|'..param..']]&amp;lt;/td&amp;gt;'..&lt;br /&gt;
			'&amp;lt;td&amp;gt;'..section..'&amp;lt;/td&amp;gt;'..&lt;br /&gt;
			'&amp;lt;td&amp;gt;'..appearsAs..'&amp;lt;/td&amp;gt;'..&lt;br /&gt;
			'&amp;lt;td data-sort-value='..pid..'&amp;gt;'..wpl..'&amp;lt;/td&amp;gt;'..&lt;br /&gt;
			'&amp;lt;td style=&amp;quot;text-align: right;&amp;quot;&amp;gt;'..checkcat(articleCat,articleCount)..'&amp;lt;/td&amp;gt;'..&lt;br /&gt;
			'&amp;lt;td style=&amp;quot;text-align: right;&amp;quot;&amp;gt;'..checkcat(faultyCat,faultyCount)..'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
	wikiTable = wikiTable..'&amp;lt;tr&amp;gt;&amp;lt;th style=&amp;quot;text-align: right;&amp;quot; colspan=3&amp;gt;合計&amp;lt;/th&amp;gt;'..&lt;br /&gt;
		'&amp;lt;th style=&amp;quot;text-align: right;&amp;quot;&amp;gt;'..lang:formatNum(P)..'&amp;lt;/th&amp;gt;'..&lt;br /&gt;
		'&amp;lt;th style=&amp;quot;text-align: right;&amp;quot;&amp;gt;'..lang:formatNum(a)..'&amp;lt;/th&amp;gt;'..&lt;br /&gt;
		'&amp;lt;th style=&amp;quot;text-align: right;&amp;quot;&amp;gt;'..lang:formatNum(f)..'&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;'&lt;br /&gt;
	return require('Module:Suppress categories').main(wikiTable)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Dragoniez</name></author>
	</entry>
</feed>