<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ASettlement_short_description</id>
	<title>Module:Settlement short description - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ASettlement_short_description"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;action=history"/>
	<updated>2026-05-03T00:16:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=38085&amp;oldid=prev</id>
		<title>imported&gt;Jonesey95: Undid revision 1071438822 by Jonesey95 (talk). false positive?</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=38085&amp;oldid=prev"/>
		<updated>2022-02-12T16:43:02Z</updated>

		<summary type="html">&lt;p&gt;Undid revision 1071438822 by &lt;a href=&quot;/mediawiki/index.php/Special:Contributions/Jonesey95&quot; title=&quot;Special:Contributions/Jonesey95&quot;&gt;Jonesey95&lt;/a&gt; (&lt;a href=&quot;/mediawiki/index.php?title=User_talk:Jonesey95&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Jonesey95 (page does not exist)&quot;&gt;talk&lt;/a&gt;). false positive?&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-GB&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 17:43, 12 February 2022&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-l83&quot;&gt;Line 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 83:&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;			return&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;			return&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;			return p.shortdesc(short_description, frame)&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			local language = mw.language.getContentLanguage()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;			return p.shortdesc&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(language:ucfirst&lt;/ins&gt;(short_description&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;, frame)&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;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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 124:&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;	&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;	&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 location then location =  &amp;quot; in &amp;quot; .. location else location = &amp;quot;&amp;quot; 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;	if location then location =  &amp;quot; in &amp;quot; .. location else location = &amp;quot;&amp;quot; end&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; &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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/ins&gt;&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;	return p.shortdesc(settlement_type..location, frame)..p.categories&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local language = mw.language.getContentLanguage()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;	return p.shortdesc&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(language:ucfirst&lt;/ins&gt;(settlement_type..location&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;, frame)..p.categories&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;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;return p&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;return p&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-6311:rev-38085:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Jonesey95</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=6311&amp;oldid=prev</id>
		<title>Richardpruen: 1 revision imported: Template for journal </title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=6311&amp;oldid=prev"/>
		<updated>2021-08-25T03:50:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Template for journal &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-GB&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 04:50, 25 August 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-6310:rev-6311 --&gt;
&lt;/table&gt;</summary>
		<author><name>Richardpruen</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=6310&amp;oldid=prev</id>
		<title>Wikipedia&gt;Galobtter: fix cleanups</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:Settlement_short_description&amp;diff=6310&amp;oldid=prev"/>
		<updated>2021-04-19T20:42:52Z</updated>

		<summary type="html">&lt;p&gt;fix cleanups&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--generates auto short description for use in infobox settlement&lt;br /&gt;
local p = {}&lt;br /&gt;
p.categories = &amp;quot;&amp;quot;&lt;br /&gt;
local plain = require(&amp;#039;Module:Plain text&amp;#039;)._main&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local tableTools = require (&amp;#039;Module:TableTools&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
function p.reverseTable (init)&lt;br /&gt;
	init[1], init[3] = init[3], init[1]&lt;br /&gt;
	return init&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.assign (args, argname, num)&lt;br /&gt;
	local val&lt;br /&gt;
	local var = {}&lt;br /&gt;
	for i = 0,num do&lt;br /&gt;
		--handle initial &amp;quot;subdivision_foo&amp;quot; without number&lt;br /&gt;
		if i == 0 then&lt;br /&gt;
			val = &amp;quot;&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			val = tostring(i)&lt;br /&gt;
		end&lt;br /&gt;
		var[i+1] = p.validate(plain(args[argname..val]))&lt;br /&gt;
	end&lt;br /&gt;
	return var&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Display short description using {{short description}}&lt;br /&gt;
function p.shortdesc(text, frame)&lt;br /&gt;
	return frame:expandTemplate{title = &amp;#039;Short description&amp;#039;, args = {text, &amp;#039;noreplace&amp;#039;}}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.category (cattype)&lt;br /&gt;
	local category = string.format(&amp;#039;[[Category:Pages using infobox settlement with bad %s]]&amp;#039;, cattype)&lt;br /&gt;
	if category then p.categories = p.categories..category end --categorize&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--sanity and other checks&lt;br /&gt;
function p.validate (parameter, cat)&lt;br /&gt;
	if not parameter then return nil end&lt;br /&gt;
	parameter = parameter:gsub(&amp;#039;%b()&amp;#039;, &amp;#039;&amp;#039;) --remove things in brackets as extraneous information&lt;br /&gt;
			   :gsub(&amp;#039;%s+&amp;#039;, &amp;#039; &amp;#039;) --fix possible extra spaces from previous cleanup&lt;br /&gt;
			   :gsub(&amp;#039;^%s+&amp;#039;, &amp;#039;&amp;#039;) --trim spaces from beginning&lt;br /&gt;
			   :gsub(&amp;#039;%s+$&amp;#039;, &amp;#039;&amp;#039;) --trim spaces from end&lt;br /&gt;
	if parameter:match(&amp;quot;[,;]&amp;quot;) or not parameter:match(&amp;quot;%a&amp;quot;) then --must have some letters, ignore if multiple types/subdivisions&lt;br /&gt;
		if cat then p.category (cat) end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if (parameter == &amp;quot;&amp;quot;) then return nil end&lt;br /&gt;
	return parameter&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--removes redundancy like &amp;quot;England, United Kingdom&amp;quot; and fixes issues like &amp;quot;Foo in United States&amp;quot; (to &amp;quot;Foo in the United States&amp;quot;)&lt;br /&gt;
--also used in Module:Type in location&lt;br /&gt;
function p.cleanupLoc (location)&lt;br /&gt;
	if location == &amp;quot;&amp;quot; then return nil end&lt;br /&gt;
	local replacements = {&lt;br /&gt;
		[&amp;quot;England, United Kingdom&amp;quot;] =  &amp;quot;England&amp;quot;,&lt;br /&gt;
		[&amp;quot;Scotland, United Kingdom&amp;quot;] =  &amp;quot;Scotland&amp;quot;,&lt;br /&gt;
		[&amp;quot;Wales, United Kingdom&amp;quot;] =  &amp;quot;Wales&amp;quot;,&lt;br /&gt;
		[&amp;quot;New York City, New York, United States&amp;quot;] =  &amp;quot;New York City&amp;quot;,&lt;br /&gt;
		[&amp;quot;^United States$&amp;quot;] = &amp;quot;the United States&amp;quot;,&lt;br /&gt;
		[&amp;quot;London, United Kingdom&amp;quot;] = &amp;quot;London, England&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
	for i, v in pairs(replacements) do &lt;br /&gt;
		location = location:gsub(i, v) --series of replacements&lt;br /&gt;
	end&lt;br /&gt;
	return location&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local categories = &amp;quot;&amp;quot;&lt;br /&gt;
	local subdivision_types = {}&lt;br /&gt;
	local subdivision_names = {}&lt;br /&gt;
	local args = getArgs (frame, {parentOnly = true})&lt;br /&gt;
	local settlement_type = p.validate(plain(args.settlement_type or args.type), &amp;quot;settlement type&amp;quot;) or &amp;quot;Place&amp;quot;&lt;br /&gt;
	local short_description = plain(args.short_description)&lt;br /&gt;
	subdivision_types = p.assign(args, &amp;quot;subdivision_type&amp;quot;, 2)&lt;br /&gt;
	subdivision_names = p.assign(args, &amp;quot;subdivision_name&amp;quot;, 2)&lt;br /&gt;
	&lt;br /&gt;
	if short_description then&lt;br /&gt;
		if (short_description == &amp;#039;no&amp;#039;) then&lt;br /&gt;
			return&lt;br /&gt;
		else&lt;br /&gt;
			return p.shortdesc(short_description, frame)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not(subdivision_names[3] and&lt;br /&gt;
		(string.find(settlement_type, &amp;#039;[nN]eighbo[u]?rhood&amp;#039;) or string.find(settlement_type, &amp;#039;[sS]uburb&amp;#039;))) then&lt;br /&gt;
		subdivision_names[3] = nil --display the third subdivision_type only if suburb or neighborhood&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--if say &amp;quot;Voivodeship&amp;quot; is found within the subdivision_type, then specially handle&lt;br /&gt;
	--by adding Voivodeship to the end if not already present&lt;br /&gt;
	for x, y in ipairs (subdivision_types) do&lt;br /&gt;
		local special_types = {&lt;br /&gt;
			&amp;quot;Voivodeship&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		for i, j in ipairs(special_types) do&lt;br /&gt;
			if subdivision_names[x] and string.find(y, j, 1, true)&lt;br /&gt;
				and not string.find(subdivision_names[x], j, 1, true) then&lt;br /&gt;
				subdivision_names[x] = subdivision_names[x]..&amp;quot; &amp;quot;..j&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for x, y in ipairs (subdivision_names) do&lt;br /&gt;
		if y then&lt;br /&gt;
			if string.find(settlement_type, y, 1, true) then --if the subdivision is found within the settlement type&lt;br /&gt;
				subdivision_names[x] = nil --don&amp;#039;t display redundancy&lt;br /&gt;
				p.category (&amp;quot;settlement type&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
			if y == mw.title.getCurrentTitle().text then --if the title is the same as one of the subdivision_names&lt;br /&gt;
				subdivision_names[x] = nil --don&amp;#039;t display redundancy&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local location = table.concat(tableTools.compressSparseArray(p.reverseTable(subdivision_names)), &amp;#039;, &amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	location = p.cleanupLoc (location)&lt;br /&gt;
	&lt;br /&gt;
	if location then location =  &amp;quot; in &amp;quot; .. location else location = &amp;quot;&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
	return p.shortdesc(settlement_type..location, frame)..p.categories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Galobtter</name></author>
	</entry>
</feed>