<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:Road data/locations - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:Road_data/locations&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Tue, 17 Nov 2026 16:57:44 GMT</lastBuildDate>
		<item>
			<title>Admin 12:50, 2026-yil 28-avgust da</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:Road_data/locations&amp;diff=1017540&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:Road_data/locations&amp;diff=1017540&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local parserModule = require(&amp;quot;Module:Road data/parser&amp;quot;)&lt;br /&gt;
local util = require(&amp;quot;Module:Road data/util&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local format = mw.ustring.format&lt;br /&gt;
local trim = mw.text.trim&lt;br /&gt;
local parser = parserModule.parser&lt;br /&gt;
&lt;br /&gt;
local function stateName(args)&lt;br /&gt;
	-- TODO transition&lt;br /&gt;
	local data = mw.loadData(&amp;quot;Module:Jct/statename&amp;quot;) &lt;br /&gt;
	local abbr = args.state or args.province&lt;br /&gt;
	local countryData = data[args.country]&lt;br /&gt;
	return countryData and countryData[abbr]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.locations(args, module, group)&lt;br /&gt;
	module = module or &amp;quot;&amp;quot;&lt;br /&gt;
	local modulearticle = module .. &amp;quot;article&amp;quot;&lt;br /&gt;
	local moduleprefix = module .. &amp;quot;prefix&amp;quot;&lt;br /&gt;
	local modulenameprefix = module .. &amp;quot;nameprefix&amp;quot;&lt;br /&gt;
	local modulenamesuffix = module .. &amp;quot;namesuffix&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local warnings = {}&lt;br /&gt;
&lt;br /&gt;
	-- Region, for disambiguation&lt;br /&gt;
	local region = parserModule.parser(args, &amp;quot;region&amp;quot;, &amp;quot; common &amp;quot;)&lt;br /&gt;
	if not region then&lt;br /&gt;
		-- TODO transition&lt;br /&gt;
		if args.region then&lt;br /&gt;
			warnings.region = &amp;quot;region parameter is deprecated&amp;quot;&lt;br /&gt;
			region = args.region&lt;br /&gt;
		elseif args.country and (args.state or args.province) then&lt;br /&gt;
			warnings.region = &amp;quot;Inferring region from country and state/province&amp;quot;&lt;br /&gt;
			region = stateName(args)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local regionName&lt;br /&gt;
	local regionText&lt;br /&gt;
	if type(region) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		regionName = region.name&lt;br /&gt;
		regionText = format(&amp;quot;[[%s|%s]]&amp;quot;, region.link, regionName)&lt;br /&gt;
	elseif region then&lt;br /&gt;
		regionName = region&lt;br /&gt;
		regionText = format(&amp;quot;[[%s]]&amp;quot;, regionName)&lt;br /&gt;
	end&lt;br /&gt;
	args.region = regionName&lt;br /&gt;
&lt;br /&gt;
	local locations = parserModule.parser(args, &amp;quot;locations&amp;quot;, &amp;quot; common &amp;quot;) or {}&lt;br /&gt;
&lt;br /&gt;
	-- Primary topic requires no specialization to supplied locations.&lt;br /&gt;
	local primaryTopic = not locations and module == &amp;quot;jctint&amp;quot; and args.primary_topic ~= &amp;#039;no&amp;#039;&lt;br /&gt;
	if args.primary_topic then&lt;br /&gt;
		-- TODO transition&lt;br /&gt;
		warnings.primary_topic = &amp;quot;primary_topic parameter is deprecated&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Independent city&lt;br /&gt;
	local indepCityText&lt;br /&gt;
	if args.indep_city_special then&lt;br /&gt;
		indepCityText = args.indep_city_special -- Overrides `indep_city` argument.&lt;br /&gt;
	elseif args.indep_city then&lt;br /&gt;
		local indepCity = args.indep_city&lt;br /&gt;
		local spec = locations.indep_city&lt;br /&gt;
		if spec then&lt;br /&gt;
			local link = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
				spec.linkprefix or &amp;quot;&amp;quot;, indepCity, spec.linksuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			local name = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
				spec[modulenameprefix] or spec.nameprefix or &amp;quot;&amp;quot;,&lt;br /&gt;
				indepCity,&lt;br /&gt;
				spec[modulenamesuffix] or spec.namesuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			indepCityText = format(&amp;quot;%s%s[[%s|%s]]&amp;quot;,&lt;br /&gt;
				spec[modulearticle] or spec.article or &amp;quot;&amp;quot;,&lt;br /&gt;
				spec[moduleprefix] or spec.prefix or &amp;quot;&amp;quot;,&lt;br /&gt;
				link, name)&lt;br /&gt;
		else&lt;br /&gt;
			-- TODO transition&lt;br /&gt;
			warnings.indep_city = &amp;quot;Spec for indep_city parameter undefined in road data module&amp;quot;&lt;br /&gt;
			local cityLink -- Wikilink for independent city&lt;br /&gt;
			if primaryTopic then&lt;br /&gt;
				cityLink = format(&amp;#039;[[%s]]&amp;#039;, indepCity)&lt;br /&gt;
			else&lt;br /&gt;
				-- Specialize independent city to the region.&lt;br /&gt;
				cityLink = format(&amp;#039;[[%s, %s|%s]]&amp;#039;, indepCity, region, indepCity)&lt;br /&gt;
			end&lt;br /&gt;
			indepCityText = &amp;quot;[[Independent city|City]] of &amp;quot; .. cityLink&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if indepCityText then&lt;br /&gt;
		return {region = regionText, indep_city = indepCityText, warnings = warnings}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- First-level subdivision, e.g., county&lt;br /&gt;
	-- Name of the type of subdivision, e.g., &amp;quot;County&amp;quot; and &amp;quot;Parish&amp;quot;&lt;br /&gt;
	local sub1name = args.sub1name -- TODO transition&lt;br /&gt;
	local sub1Text&lt;br /&gt;
	if args.sub1_special then&lt;br /&gt;
		sub1Text = args.sub1_special -- Overrides `sub1` argument.&lt;br /&gt;
	elseif args.sub1 then&lt;br /&gt;
		local sub1 = args.sub1&lt;br /&gt;
		local article&lt;br /&gt;
		local link = sub1&lt;br /&gt;
		local name = sub1&lt;br /&gt;
		-- Type of first-level subdivision area, as a form of disambiguation&lt;br /&gt;
		local sub1area = args.sub1area&lt;br /&gt;
		if sub1area then&lt;br /&gt;
			local sub1areaSpec = locations.sub1areas and locations.sub1areas[sub1area]&lt;br /&gt;
			if sub1areaSpec then&lt;br /&gt;
				article = sub1areaSpec[modulearticle] or sub1areaSpec.article or &amp;quot;&amp;quot;&lt;br /&gt;
				link = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
					sub1areaSpec.linkprefix or &amp;quot;&amp;quot;, link, sub1areaSpec.linksuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
				name = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
					group and &amp;quot;&amp;quot; or sub1areaSpec[modulenameprefix] or sub1areaSpec.nameprefix or &amp;quot;&amp;quot;,&lt;br /&gt;
					name,&lt;br /&gt;
					group and &amp;quot;&amp;quot; or sub1areaSpec[modulenamesuffix] or sub1areaSpec.namesuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			else&lt;br /&gt;
				-- TODO report error&lt;br /&gt;
				local errMsg = util.err(format(&amp;quot;Undefined sub1area: %s&amp;quot;, sub1area))&lt;br /&gt;
				name = format(&amp;quot;%s%s&amp;quot;, name, errMsg)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if locations.sub1 then&lt;br /&gt;
			local spec = locations.sub1&lt;br /&gt;
			-- Prepend and append text from spec.&lt;br /&gt;
			link = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
				spec.linkprefix or &amp;quot;&amp;quot;, link, spec.linksuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			name = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
				spec[modulenameprefix] or spec.nameprefix or &amp;quot;&amp;quot;,&lt;br /&gt;
				name,&lt;br /&gt;
				spec[modulenamesuffix] or spec.namesuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			sub1Text = format(&amp;quot;%s[[%s|%s]]&amp;quot;, article or &amp;quot;&amp;quot;, link, name)&lt;br /&gt;
		else&lt;br /&gt;
			-- TODO transition&lt;br /&gt;
			warnings.sub1 = &amp;quot;Spec for sub1 parameter undefined in road data module&amp;quot;&lt;br /&gt;
			-- Add type (if specified) to wikilink for first-level subdivision.&lt;br /&gt;
			local sub1Link = sub1name and trim(format(&amp;quot;%s %s&amp;quot;, sub1, sub1name)) or sub1&lt;br /&gt;
			local sub1Name = module == &amp;quot;jcttop&amp;quot; and sub1Link or sub1&lt;br /&gt;
			if primaryTopic then&lt;br /&gt;
				sub1Text = format(&amp;#039;[[%s|%s]]&amp;#039;, sub1Link, sub1Name)&lt;br /&gt;
			else&lt;br /&gt;
				-- Specialize first-level subdivision, with type added, to the region.&lt;br /&gt;
				sub1Text = format(&amp;#039;[[%s, %s|%s]]&amp;#039;, sub1Link, region, sub1Name)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Second-level subdivision, e.g., city and town&lt;br /&gt;
	local sub2Text&lt;br /&gt;
	if args.sub2_special then&lt;br /&gt;
		sub2Text = args.sub2_special -- Overrides `sub2` argument.&lt;br /&gt;
	elseif args.sub2 then&lt;br /&gt;
		local sub2 = args.sub2&lt;br /&gt;
		if sub2 == &amp;quot;none&amp;quot; then&lt;br /&gt;
			sub2Text = &amp;quot;&amp;amp;#8203;&amp;quot; -- Zero-width space&lt;br /&gt;
		elseif sub2 == &amp;quot;&amp;amp;nbsp;&amp;quot; then&lt;br /&gt;
			-- TODO transition&lt;br /&gt;
			warnings.sub2 = &amp;quot;&amp;amp;nbsp; argument for sub2 parameter is deprecated&amp;quot;&lt;br /&gt;
			sub2Text = &amp;quot;&amp;amp;#8203;&amp;quot; -- Zero-width space&lt;br /&gt;
		elseif primaryTopic then&lt;br /&gt;
			-- TODO transition&lt;br /&gt;
			sub2Text = format(&amp;quot;[[%s]]&amp;quot;, sub2)&lt;br /&gt;
		else&lt;br /&gt;
			local article&lt;br /&gt;
			local link = sub2&lt;br /&gt;
			local name = sub2&lt;br /&gt;
			-- Type of area, e.g., city and village, as a form of disambiguation&lt;br /&gt;
			local sub2area = args.sub2area --[[TODO transition]] or args.area&lt;br /&gt;
			if sub2area then&lt;br /&gt;
				local sub2areaSpec = locations.sub2areas and locations.sub2areas[sub2area]&lt;br /&gt;
				if not sub2areaSpec then&lt;br /&gt;
					-- TODO transition&lt;br /&gt;
					warnings.sub2 =&lt;br /&gt;
						format(&amp;quot;Spec for area parameter &amp;#039;%s&amp;#039; undefined in road data module&amp;quot;, sub2area)&lt;br /&gt;
					local sub2areas = { -- table of different area types&lt;br /&gt;
						city = {&lt;br /&gt;
							linksuffix = &amp;quot; (city)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;City of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						town = {&lt;br /&gt;
							linksuffix = &amp;quot; (town)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Town of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						village = {&lt;br /&gt;
							linksuffix = &amp;quot; (village)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Village of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						community = {&lt;br /&gt;
							linksuffix = &amp;quot; (community)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Community of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						CDP = {&lt;br /&gt;
							linksuffix = &amp;quot; (CDP)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Community of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						hamlet = {&lt;br /&gt;
							linksuffix = &amp;quot; (hamlet)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Hamlet of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						[&amp;quot;unorganized territory&amp;quot;] = {&lt;br /&gt;
							linksuffix = &amp;quot; (unorganized territory)&amp;quot;,&lt;br /&gt;
							jcttoparticle = &amp;quot;the &amp;quot;,&lt;br /&gt;
							nameprefix = &amp;quot;Unorganized Territory of &amp;quot;&lt;br /&gt;
						},&lt;br /&gt;
						township = {&lt;br /&gt;
							linksuffix = &amp;quot; Township&amp;quot;,&lt;br /&gt;
							namesuffix = &amp;quot; Township&amp;quot;,&lt;br /&gt;
						}&lt;br /&gt;
					}&lt;br /&gt;
					sub2areaSpec = sub2areas[sub2area]&lt;br /&gt;
				end&lt;br /&gt;
				if sub2areaSpec then&lt;br /&gt;
					article = sub2areaSpec[modulearticle] or sub2areaSpec.article or &amp;quot;&amp;quot;&lt;br /&gt;
					link = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
						sub2areaSpec.linkprefix or &amp;quot;&amp;quot;, link, sub2areaSpec.linksuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
					name = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
						group and &amp;quot;&amp;quot; or sub2areaSpec[modulenameprefix] or sub2areaSpec.nameprefix or &amp;quot;&amp;quot;,&lt;br /&gt;
						name,&lt;br /&gt;
						group and &amp;quot;&amp;quot; or sub2areaSpec[modulenamesuffix] or sub2areaSpec.namesuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
				else&lt;br /&gt;
					-- TODO report error&lt;br /&gt;
					local errMsg = util.err(format(&amp;quot;Undefined sub2area: %s&amp;quot;, sub2area))&lt;br /&gt;
					name = format(&amp;quot;%s%s&amp;quot;, name, errMsg)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if locations.sub2 then&lt;br /&gt;
				local spec = locations.sub2&lt;br /&gt;
				-- Prepend and append text from spec.&lt;br /&gt;
				link = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
					spec.linkprefix or &amp;quot;&amp;quot;, link, spec.linksuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
				name = format(&amp;quot;%s%s%s&amp;quot;,&lt;br /&gt;
					spec[modulenameprefix] or spec.nameprefix or &amp;quot;&amp;quot;,&lt;br /&gt;
					name,&lt;br /&gt;
					spec[modulenamesuffix] or spec.namesuffix or &amp;quot;&amp;quot;)&lt;br /&gt;
			else&lt;br /&gt;
				-- TODO transition&lt;br /&gt;
				warnings.sub2 = &amp;quot;Spec for sub2 parameter undefined in road data module&amp;quot;&lt;br /&gt;
				-- Some second-level subdivisions are not unique in a given region.&lt;br /&gt;
				-- `sub1dab` is the first-level subdivision to be used for disambiguation.&lt;br /&gt;
				local sub1dab = args.sub1dab&lt;br /&gt;
				if sub1dab then&lt;br /&gt;
					sub1dab = sub1name and trim(format(&amp;quot;%s %s&amp;quot;, sub1dab, sub1name)) or sub1dab&lt;br /&gt;
					link = format(&amp;quot;%s, %s&amp;quot;, link, sub1dab)&lt;br /&gt;
				end&lt;br /&gt;
				link = format(&amp;quot;%s, %s&amp;quot;, link, region) -- Add region to wikilink&lt;br /&gt;
			end&lt;br /&gt;
			sub2Text = format(&amp;quot;%s[[%s|%s]]&amp;quot;, article or &amp;quot;&amp;quot;, link, name)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return {region = regionText, sub1 = sub1Text, sub2 = sub2Text, warnings = warnings}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</description>
			<pubDate>Fri, 28 Aug 2026 12:50:19 GMT</pubDate>
			<dc:creator>Admin</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:Road_data/locations</comments>
		</item>
</channel></rss>