
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ain">
	<id>https://wiki.aynu.org:443/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ALang%2Fdocumentor_tool</id>
	<title>モジュール:Lang/documentor tool - werson huskoanpe</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.aynu.org:443/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ALang%2Fdocumentor_tool"/>
	<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Lang/documentor_tool&amp;action=history"/>
	<updated>2026-05-08T23:20:59Z</updated>
	<subtitle>Tan wikiの tan sosに関する変更huskoanpe</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Lang/documentor_tool&amp;diff=5708&amp;oldid=prev</id>
		<title>Mkpoli: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Lang/documentor_tool&amp;diff=5708&amp;oldid=prev"/>
		<updated>2024-03-05T06:03:10Z</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;ain&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古いwerson&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024 ppm 3 2024-03-05T15:03:10+00:00up 5 312024 (Ape.) 15:03時点におけるwerson&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ain&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key aynuwiki_db:diff:1.41:old-5707:rev-5708 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mkpoli</name></author>
	</entry>
	<entry>
		<id>https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Lang/documentor_tool&amp;diff=5707&amp;oldid=prev</id>
		<title>2019 pam 8 2019-08-11T02:19:01+00:00up 11 312019 (Sir.) 02:19にwpzh&gt;Vozhuoによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.aynu.org:443/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Lang/documentor_tool&amp;diff=5707&amp;oldid=prev"/>
		<updated>2019-08-11T02:19:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Asir sos&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('Module:No globals');&lt;br /&gt;
local p = {};&lt;br /&gt;
&lt;br /&gt;
--[[-------------------------&amp;lt; L A N G - X X _ S E T T I N G S &amp;gt;-----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Lang/documentor tool|lang_xx_settings|template={{ROOTPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
reads the content of the template and extracts the parameters from {{#invoke:Lang|...}} for display on the template's&lt;br /&gt;
documentation page&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function p.lang_xx_settings (frame)&lt;br /&gt;
	local page = mw.title.makeTitle ('Template', frame.args['template'] or frame.args[1]);	-- get a page object for this page in 'Template:' namespace&lt;br /&gt;
	if not page then&lt;br /&gt;
		return '';																-- TODO: error message?&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local content = page:getContent();											-- get unparsed content&lt;br /&gt;
	if not page then&lt;br /&gt;
		return '';																-- TODO: error message?&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local out = {};&lt;br /&gt;
	&lt;br /&gt;
	local params;&lt;br /&gt;
	local style;&lt;br /&gt;
&lt;br /&gt;
	if content:match ('{{%s*#invoke:%s*[Ll]ang%s*|[^|]+|[^}]+}}') or content:match ('{{%s*#invoke:%s*[Ll]ang/sandbox%s*|[^|]+|[^}]+}}') then			-- if this template uses [[Module:Lang]]&lt;br /&gt;
		params = content:match ('{{%s*#invoke:%s*[Ll]ang%s*|[^|]+(|[^}]+)}}') or content:match ('{{%s*#invoke:%s*[Ll]ang/sandbox%s*|[^|]+(|[^}]+)}}')	-- extract the #invoke:'s parameters&lt;br /&gt;
		if not params then &lt;br /&gt;
			return '';															-- there should be at least one or the template/module won't work TODO: error message?&lt;br /&gt;
		end&lt;br /&gt;
		table.insert (out, '{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right; float:right&amp;quot;\n|+设定')	-- start a wikitable&lt;br /&gt;
		for k, v in params:gmatch ('%s*|%s*([^%s=]+)%s*=%s*([^%s|]+)') do		-- get the parameter names (k) and values (v)&lt;br /&gt;
			if 'label' == k then												-- special case for labels because spaces and pipes&lt;br /&gt;
				v = params:match ('label%s*=%s*(%[%[[^%]]+%]%])') or params:match ('label%s*=%s*([^|\n]+)') or '缺少label';&lt;br /&gt;
			end&lt;br /&gt;
			table.insert (out, table.concat ({k, '\n|', v}));					-- make rudimentary wikitable entries&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		style = content:match ('lang_xx_([^|]+)');&lt;br /&gt;
		return table.concat ({table.concat (out,'\n|-\n! scope=&amp;quot;row&amp;quot; | '), '\n|-\n|colspan=&amp;quot;2&amp;quot;|风格：', style, '\n|-\n|}'});	-- add inter-row markup and close the wikitable and done&lt;br /&gt;
	else&lt;br /&gt;
		return '';																-- does not use [[Module:Lang]] so abandon quietly&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[-------------------------&amp;lt; U S E S _ M O D U L E &amp;gt;---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Lang/documentor tool|uses_module|template={{ROOTPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
reads the content of the template to determine if this {{lang-xx}} template uses Module:Lang.  Returns the index&lt;br /&gt;
of the substring '{{#invoke|lang|' in the template page content if true; empty string if false&lt;br /&gt;
&lt;br /&gt;
Used in template documentation {{#if:}} parser functions.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function p.uses_module (frame)&lt;br /&gt;
	local page = mw.title.makeTitle ('Template', frame.args['template'] or frame.args[1]);	-- get a page object for this page in 'Template:' namespace&lt;br /&gt;
	if not page then&lt;br /&gt;
		return '';																-- TODO: error message?&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local content = page:getContent();											-- get unparsed content&lt;br /&gt;
	if not page then&lt;br /&gt;
		return '';																-- TODO: error message?&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return content:find ('{{%s*#invoke:[Ll]ang%s*|') or '';						-- return index or empty string&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>wpzh&gt;Vozhuo</name></author>
	</entry>
</feed>