<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ACat_main</id>
	<title>Module:Cat main - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ACat_main"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:Cat_main&amp;action=history"/>
	<updated>2026-04-04T01:08:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=479258&amp;oldid=prev</id>
		<title>Sware at 00:26, 29 November 2025</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=479258&amp;oldid=prev"/>
		<updated>2025-11-29T00:26:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://linguifex.com/w/index.php?title=Module:Cat_main&amp;amp;diff=479258&amp;amp;oldid=229953&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=229953&amp;oldid=prev</id>
		<title>Sware at 16:45, 3 July 2021</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=229953&amp;oldid=prev"/>
		<updated>2021-07-03T16:45:32Z</updated>

		<summary type="html">&lt;p&gt;&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;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:45, 3 July 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local stringToFormat&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local stringToFormat&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if #links &amp;gt; 1 then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if #links &amp;gt; 1 then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		stringToFormat = &#039;The main %ss for this [[Help:Categories|category]] are %s.&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		stringToFormat = &#039;The main %ss for this [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;w:&lt;/ins&gt;Help:Categories|category]] are %s.&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		stringToFormat = &#039;The main %s for this [[Help:Categories|category]] is %s.&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		stringToFormat = &#039;The main %s for this [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;w:&lt;/ins&gt;Help:Categories|category]] is %s.&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=229946&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;-- This module implements {{cat main}}.  local mHatnote = require(&#039;Module:Hatnote&#039;) local yesno = require(&#039;Module:Yesno&#039;) local mTableTools -- lazily initialise local mArgumen...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:Cat_main&amp;diff=229946&amp;oldid=prev"/>
		<updated>2021-07-03T16:35:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This module implements {{cat main}}.  local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;) local yesno = require(&amp;#039;Module:Yesno&amp;#039;) local mTableTools -- lazily initialise local mArgumen...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{cat main}}.&lt;br /&gt;
&lt;br /&gt;
local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local mTableTools -- lazily initialise&lt;br /&gt;
local mArguments -- lazily initialise&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.catMain(frame)&lt;br /&gt;
	mTableTools = require(&amp;#039;Module:TableTools&amp;#039;)&lt;br /&gt;
	mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
	local args = mArguments.getArgs(frame, {wrappers = &amp;#039;Template:Cat main&amp;#039;})&lt;br /&gt;
	local pages = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local options = {&lt;br /&gt;
		article = args.article,&lt;br /&gt;
		selfref = args.selfref&lt;br /&gt;
	}&lt;br /&gt;
	return p._catMain(options, unpack(pages))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._catMain(options, ...)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
&lt;br /&gt;
	-- Get the links table.&lt;br /&gt;
	local links = mHatnote.formatPages(...)&lt;br /&gt;
	if not links[1] then&lt;br /&gt;
		local page = mw.title.getCurrentTitle().text&lt;br /&gt;
		links[1] = mHatnote._formatLink{link = page}&lt;br /&gt;
	end&lt;br /&gt;
	for i, link in ipairs(links) do&lt;br /&gt;
		links[i] = string.format(&amp;quot;&amp;#039;&amp;#039;&amp;#039;%s&amp;#039;&amp;#039;&amp;#039;&amp;quot;, link)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get the pagetype.&lt;br /&gt;
	local pagetype&lt;br /&gt;
	if yesno(options.article) ~= false then&lt;br /&gt;
		pagetype = &amp;#039;article&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		pagetype = &amp;#039;page&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Work out whether we need to be singular or plural.&lt;br /&gt;
	local stringToFormat&lt;br /&gt;
	if #links &amp;gt; 1 then&lt;br /&gt;
		stringToFormat = &amp;#039;The main %ss for this [[Help:Categories|category]] are %s.&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		stringToFormat = &amp;#039;The main %s for this [[Help:Categories|category]] is %s.&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get the text.&lt;br /&gt;
	local text = string.format(&lt;br /&gt;
		stringToFormat,&lt;br /&gt;
		pagetype,&lt;br /&gt;
		mw.text.listToText(links)&lt;br /&gt;
	)&lt;br /&gt;
	&lt;br /&gt;
	-- Pass it through to Module:Hatnote.&lt;br /&gt;
	local hnOptions = {}&lt;br /&gt;
	hnOptions.selfref = options.selfref&lt;br /&gt;
	hnOptions.extraclasses = &amp;#039;relarticle mainarticle&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	return mHatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>