<?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%3Acategory_tree%2Ftopic_cat</id>
	<title>Module:category tree/topic cat - 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%3Acategory_tree%2Ftopic_cat"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree/topic_cat&amp;action=history"/>
	<updated>2026-05-23T02:51:56Z</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:category_tree/topic_cat&amp;diff=526846&amp;oldid=prev</id>
		<title>Sware: /* top */ clean up</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree/topic_cat&amp;diff=526846&amp;oldid=prev"/>
		<updated>2026-05-22T21:27:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top: &lt;/span&gt; clean up&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 21:27, 22 May 2026&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-l174&quot;&gt;Line 174:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 174:&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 plural_label_title = mw.title.new(label)&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 plural_label_title = mw.title.new(label)&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 plural_label_title and plural_label_title.exists 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 plural_label_title and plural_label_title.exists 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;				desc = desc:gsub(label_sub, &quot;[[&quot; .. label .. &quot;]]&quot;)&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;				desc = desc:gsub(label_sub, &quot;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wikt:&quot; .. label .. &quot;|&lt;/ins&gt;&quot; .. label .. &quot;]]&quot;)&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;&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;				desc = desc:gsub(label_sub, label)&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;				desc = desc:gsub(label_sub, label)&lt;/div&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:category_tree/topic_cat&amp;diff=228928&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local export = {}  local label_data = require(&quot;Module:category tree/topic cat/data&quot;)  -- Category object  local Category = {} Category.__index = Category  function Category.ne...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree/topic_cat&amp;diff=228928&amp;oldid=prev"/>
		<updated>2021-06-08T10:32:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local export = {}  local label_data = require(&amp;quot;Module:category tree/topic cat/data&amp;quot;)  -- Category object  local Category = {} Category.__index = Category  function Category.ne...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
&lt;br /&gt;
local label_data = require(&amp;quot;Module:category tree/topic cat/data&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- Category object&lt;br /&gt;
&lt;br /&gt;
local Category = {}&lt;br /&gt;
Category.__index = Category&lt;br /&gt;
&lt;br /&gt;
function Category.new_main(frame)&lt;br /&gt;
	local self = setmetatable({}, Category)&lt;br /&gt;
	&lt;br /&gt;
	local params = {&lt;br /&gt;
		[1] = {},&lt;br /&gt;
		[2] = {required = true},&lt;br /&gt;
		[&amp;quot;sc&amp;quot;] = {},&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	args = require(&amp;quot;Module:parameters&amp;quot;).process(frame:getParent().args, params)&lt;br /&gt;
	self._info = {code = args[1], label = args[2]}&lt;br /&gt;
	&lt;br /&gt;
	self:initCommon()&lt;br /&gt;
	&lt;br /&gt;
	if not self._data then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return self&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Category.new(info)&lt;br /&gt;
	for key, val in pairs(info) do&lt;br /&gt;
		if not (key == &amp;quot;code&amp;quot; or key == &amp;quot;label&amp;quot;) then&lt;br /&gt;
			error(&amp;quot;The parameter “&amp;quot; .. key .. &amp;quot;” was not recognized.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local self = setmetatable({}, Category)&lt;br /&gt;
	self._info = info&lt;br /&gt;
	&lt;br /&gt;
	if not self._info.label then&lt;br /&gt;
		error(&amp;quot;No label was specified.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	self:initCommon()&lt;br /&gt;
	&lt;br /&gt;
	if not self._data then&lt;br /&gt;
		error(&amp;quot;The label “&amp;quot; .. self._info.label .. &amp;quot;” does not exist.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return self&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
export.new = Category.new&lt;br /&gt;
export.new_main = Category.new_main&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:initCommon()&lt;br /&gt;
	if self._info.code then&lt;br /&gt;
		self._lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(self._info.code) or&lt;br /&gt;
			error(&amp;quot;The language code “&amp;quot; .. self._info.code .. &amp;quot;” is not valid.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Convert label to lowercase if possible&lt;br /&gt;
	local lowercase_label = mw.getContentLanguage():lcfirst(self._info.label)&lt;br /&gt;
	&lt;br /&gt;
	-- Check if the label exists&lt;br /&gt;
	local labels = label_data[&amp;quot;LABELS&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
	if labels[lowercase_label] then&lt;br /&gt;
		self._info.label = lowercase_label&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	self._data = labels[self._info.label]&lt;br /&gt;
	&lt;br /&gt;
	-- Go through handlers&lt;br /&gt;
	if not self._data then&lt;br /&gt;
		for _, handler in ipairs(label_data[&amp;quot;HANDLERS&amp;quot;]) do&lt;br /&gt;
			self._data = handler.handler(self._info.label)&lt;br /&gt;
			if self._data then&lt;br /&gt;
				self._data.module = handler.module&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getInfo()&lt;br /&gt;
	return self._info&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getBreadcrumbName()&lt;br /&gt;
	return self._info.label&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getDataModule()&lt;br /&gt;
	return self._data.module&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:canBeEmpty()&lt;br /&gt;
	if self._lang then&lt;br /&gt;
		return false&lt;br /&gt;
	else&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:isHidden()&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getCategoryName()&lt;br /&gt;
	if self._lang then&lt;br /&gt;
		return self._lang:getCode() .. &amp;quot;:&amp;quot; .. mw.getContentLanguage():ucfirst(self._info.label)&lt;br /&gt;
	else&lt;br /&gt;
		return mw.getContentLanguage():ucfirst(self._info.label)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function replace_special_descriptions(desc)&lt;br /&gt;
	-- TODO: Should probably find a better way to do this&lt;br /&gt;
	local descriptionFormats = {&lt;br /&gt;
		[&amp;quot;default&amp;quot;]					= &amp;quot;{{{langname}}} terms related to {{{label_lc}}}.&amp;quot;,&lt;br /&gt;
		[&amp;quot;default with capital&amp;quot;]	= &amp;quot;{{{langname}}} terms related to {{{label_uc}}}.&amp;quot;,&lt;br /&gt;
		[&amp;quot;default with the&amp;quot;]		= &amp;quot;{{{langname}}} terms related to the {{{label_uc}}}.&amp;quot;,&lt;br /&gt;
		[&amp;quot;default with the lower&amp;quot;]	= &amp;quot;{{{langname}}} terms related to the {{{label_lc}}}.&amp;quot;,&lt;br /&gt;
		[&amp;quot;default with topic&amp;quot;]		= &amp;quot;{{{langname}}} terms related to {{{label_lc}}} topics.&amp;quot;,&lt;br /&gt;
		[&amp;quot;default-set&amp;quot;]				= &amp;quot;{{{langname}}} terms for various {{{label_lc}}}.&amp;quot;,&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if descriptionFormats[desc] then&lt;br /&gt;
		return descriptionFormats[desc]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if desc then&lt;br /&gt;
		local desc_no_sing = desc:match(&amp;quot;^(.+) no singularize$&amp;quot;)&lt;br /&gt;
		if desc_no_sing and descriptionFormats[desc_no_sing] then&lt;br /&gt;
			return descriptionFormats[desc_no_sing]:gsub(&amp;quot;({{{label_[ul]c)}}}&amp;quot;, &amp;quot;%1_no_sing}}}&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return desc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:substitute_template_specs(desc)&lt;br /&gt;
	if not desc or type(desc) ~= &amp;quot;string&amp;quot; then&lt;br /&gt;
		return desc&lt;br /&gt;
	end&lt;br /&gt;
	if self._lang then&lt;br /&gt;
		desc = desc:gsub(&amp;quot;{{{langname}}}&amp;quot;, self._lang:getCanonicalName())&lt;br /&gt;
		desc = desc:gsub(&amp;quot;{{{langcode}}}&amp;quot;, self._lang:getCode())&lt;br /&gt;
		desc = desc:gsub(&amp;quot;{{{langcat}}}&amp;quot;, self._lang:getCategoryName())&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function handle_label_uc_lc(label_sub, label, no_singularize)&lt;br /&gt;
		local singular_label, singular_label_title&lt;br /&gt;
		if not no_singularize then&lt;br /&gt;
			singular_label = require(&amp;quot;Module:string utilities&amp;quot;).singularize(label)&lt;br /&gt;
			singular_label_title = mw.title.new(singular_label)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if singular_label_title and singular_label_title.exists then&lt;br /&gt;
			desc = desc:gsub(label_sub, &amp;quot;[[&amp;quot; .. singular_label .. &amp;quot;|&amp;quot; .. label .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
			-- &amp;#039;happiness&amp;#039; etc. that look like plurals but aren&amp;#039;t&lt;br /&gt;
			local plural_label_title = mw.title.new(label)&lt;br /&gt;
			if plural_label_title and plural_label_title.exists then &lt;br /&gt;
				desc = desc:gsub(label_sub, &amp;quot;[[&amp;quot; .. label .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
			else&lt;br /&gt;
				desc = desc:gsub(label_sub, label)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return desc&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	if desc:find(&amp;quot;{{{label_uc}}}&amp;quot;) then&lt;br /&gt;
		desc = handle_label_uc_lc(&amp;quot;{{{label_uc}}}&amp;quot;, mw.getContentLanguage():ucfirst(self._info.label))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if desc:find(&amp;quot;{{{label_uc_no_sing}}}&amp;quot;) then&lt;br /&gt;
		desc = handle_label_uc_lc(&amp;quot;{{{label_uc_no_sing}}}&amp;quot;, mw.getContentLanguage():ucfirst(self._info.label), &amp;quot;no singularize&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if desc:find(&amp;quot;{{{label_lc}}}&amp;quot;) then&lt;br /&gt;
		desc = handle_label_uc_lc(&amp;quot;{{{label_lc}}}&amp;quot;, mw.getContentLanguage():lcfirst(self._info.label))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if desc:find(&amp;quot;{{{label_lc_no_sing}}}&amp;quot;) then&lt;br /&gt;
		desc = handle_label_uc_lc(&amp;quot;{{{label_lc_no_sing}}}&amp;quot;, mw.getContentLanguage():lcfirst(self._info.label), &amp;quot;no singularize&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return desc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:substitute_template_specs_in_args(args)&lt;br /&gt;
	if not args then&lt;br /&gt;
		return args&lt;br /&gt;
	end&lt;br /&gt;
	local pinfo = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		k = self:substitute_template_specs(k)&lt;br /&gt;
		v = self:substitute_template_specs(v)&lt;br /&gt;
		pinfo[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return pinfo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getDescription(isChild)&lt;br /&gt;
	-- Allows different text in the list of a category&amp;#039;s children&lt;br /&gt;
	local isChild = isChild == &amp;quot;child&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	if self._lang then&lt;br /&gt;
		local desc = self._data[&amp;quot;description&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
		desc = replace_special_descriptions(desc)&lt;br /&gt;
		if desc then&lt;br /&gt;
			if not isChild and self._data.additional then&lt;br /&gt;
				desc = desc .. &amp;quot;\n\n&amp;quot; .. self._data.additional&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			return self:substitute_template_specs(desc)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		if not self._lang and ( self._info.label == &amp;quot;all topics&amp;quot; or self._info.label == &amp;quot;all sets&amp;quot; ) then&lt;br /&gt;
			return &amp;quot;This category applies to content and not to meta material about the Wiki.&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local eninfo = mw.clone(self._info)&lt;br /&gt;
		eninfo.code = &amp;quot;en&amp;quot;&lt;br /&gt;
		local en = Category.new(eninfo)&lt;br /&gt;
&lt;br /&gt;
		local desc = self._data[&amp;quot;description&amp;quot;]&lt;br /&gt;
		desc = replace_special_descriptions(desc)&lt;br /&gt;
		if desc then&lt;br /&gt;
			desc = desc:gsub(&amp;quot;^{{{langname}}} &amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			desc = desc:gsub(&amp;quot;^{{{langcode}}} &amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			desc = desc:gsub(&amp;quot;^{{{langcat}}} &amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			desc = desc:gsub(&amp;quot;%.$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
			desc = self:substitute_template_specs(desc)&lt;br /&gt;
		else&lt;br /&gt;
			desc = self._info.label&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return&lt;br /&gt;
			&amp;quot;This category concerns the topic: &amp;quot; .. desc .. &amp;quot;.\n\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;It contains no dictionary entries, only other categories. The subcategories are of two sorts:\n\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;* Subcategories named like “aa:&amp;quot; .. self._info.label .. &amp;quot;” (with a prefixed language code) are categories of terms in specific languages. &amp;quot; ..&lt;br /&gt;
			&amp;quot;You may be interested especially in [[:Category:&amp;quot; .. en:getCategoryName() .. &amp;quot;]], for English terms.\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;* Subcategories of this one named without the prefixed language code are further categories just like this one, but devoted to finer topics.&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getParents()&lt;br /&gt;
	local parents = self._data[&amp;quot;parents&amp;quot;]&lt;br /&gt;
	&lt;br /&gt;
	if not self._lang and ( self._info.label == &amp;quot;all topics&amp;quot; or self._info.label == &amp;quot;all sets&amp;quot; ) then&lt;br /&gt;
		return {{ name = &amp;quot;Category:Fundamental&amp;quot;, sort = self._info.label:gsub(&amp;quot;all &amp;quot;, &amp;quot;&amp;quot;) }}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not parents or #parents == 0 then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local is_set = false&lt;br /&gt;
	&lt;br /&gt;
	if self._info.label == &amp;quot;all sets&amp;quot; then&lt;br /&gt;
		is_set = true&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for key, parent in ipairs(parents) do&lt;br /&gt;
		parent = mw.clone(parent)&lt;br /&gt;
		&lt;br /&gt;
		if type(parent) ~= &amp;quot;table&amp;quot; then&lt;br /&gt;
			parent = {name = parent}&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if not parent.sort then&lt;br /&gt;
			parent.sort = self._info.label&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if self._lang then&lt;br /&gt;
			parent.sort = self:substitute_template_specs(parent.sort)&lt;br /&gt;
		elseif parent.sort:find(&amp;quot;{{{langname}}}&amp;quot;) or parent.sort:find(&amp;quot;{{{langcat}}}&amp;quot;) or&lt;br /&gt;
			parent.template == &amp;quot;langcatboiler&amp;quot; or parent.module then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if not self._lang then&lt;br /&gt;
			parent.sort = &amp;quot; &amp;quot; .. parent.sort&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if parent.name and parent.name:find(&amp;quot;^Category:&amp;quot;) then&lt;br /&gt;
			if self._lang then&lt;br /&gt;
				parent.name = self:substitute_template_specs(parent.name)&lt;br /&gt;
			elseif parent.name:find(&amp;quot;{{{langname}}}&amp;quot;) or parent.name:find(&amp;quot;{{{langcat}}}&amp;quot;) or&lt;br /&gt;
				parent.template == &amp;quot;langcatboiler&amp;quot; or parent.module then&lt;br /&gt;
				return nil&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			if parent.name == &amp;quot;list of sets&amp;quot; then&lt;br /&gt;
				is_set = true&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			local pinfo = mw.clone(self._info)&lt;br /&gt;
			pinfo.label = parent.name&lt;br /&gt;
			&lt;br /&gt;
			if parent.template then&lt;br /&gt;
				parent.name = require(&amp;quot;Module:category tree/&amp;quot; .. parent.template).new(pinfo)&lt;br /&gt;
			elseif parent.module then&lt;br /&gt;
				-- A reference to a category using another category tree module.&lt;br /&gt;
				if not parent.args then&lt;br /&gt;
					error(&amp;quot;Missing .args in parent table with module=\&amp;quot;&amp;quot; .. parent.module .. &amp;quot;\&amp;quot; for &amp;#039;&amp;quot; ..&lt;br /&gt;
						self._info.label .. &amp;quot;&amp;#039; topic entry in module &amp;#039;&amp;quot; .. (self._data.module or &amp;quot;unknown&amp;quot;) .. &amp;quot;&amp;#039;&amp;quot;)&lt;br /&gt;
				end&lt;br /&gt;
				parent.name = require(&amp;quot;Module:category tree/&amp;quot; .. parent.module).new(self:substitute_template_specs_in_args(parent.args))&lt;br /&gt;
			else&lt;br /&gt;
				parent.name = Category.new(pinfo)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		table.insert(ret, parent)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not is_set and self._info.label ~= &amp;quot;list of topics&amp;quot; and self._info.label ~= &amp;quot;list of sets&amp;quot; then&lt;br /&gt;
		local pinfo = mw.clone(self._info)&lt;br /&gt;
		pinfo.label = &amp;quot;list of topics&amp;quot;&lt;br /&gt;
		table.insert(ret, {name = Category.new(pinfo), sort = (not self._lang and &amp;quot; &amp;quot; or &amp;quot;&amp;quot;) .. self._info.label})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getChildren()&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Category:getUmbrella()&lt;br /&gt;
	if not self._lang then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local uinfo = mw.clone(self._info)&lt;br /&gt;
	uinfo.code = nil&lt;br /&gt;
	return Category.new(uinfo)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>