<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:Wikidata/SisterCities - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:Wikidata/SisterCities&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Thu, 19 Nov 2026 20:32:09 GMT</lastBuildDate>
		<item>
			<title>Ziyosfera: mw.wikibase stub: Ziyosferada Wikibase klienti yoʻq (Lua xatosini oldini olish)</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:Wikidata/SisterCities&amp;diff=899304&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:Wikidata/SisterCities&amp;diff=899304&amp;oldid=prev</guid>
			<description>&lt;p&gt;mw.wikibase stub: Ziyosferada Wikibase klienti yoʻq (Lua xatosini oldini olish)&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;uz&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Avvalgi koʻrinishi&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026-yil 18-avgust, 14:46 dagi koʻrinishi&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-l1&quot;&gt;Qator 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Qator 1:&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-- [zs-wikibase-guard] Ziyosfera has no Wikibase client; stub mw.wikibase so&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-- modules reading Wikidata degrade to nil instead of erroring. Auto-added on import.&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if not mw.wikibase then mw.wikibase = setmetatable({}, { __index = function() return function() return nil end end }) end&lt;/ins&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;local 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;local p = {};&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;local flags = require( &amp;#039;Module:Wikidata/Flags&amp;#039; );&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 flags = require( &amp;#039;Module:Wikidata/Flags&amp;#039; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ziyoold-mediawiki-:diff:1.41:old-110890:rev-899304:php=table --&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 18 Aug 2026 09:46:24 GMT</pubDate>
			<dc:creator>Ziyosfera</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:Wikidata/SisterCities</comments>
		</item>
		<item>
			<title>Programmer: Oʻzbekcha Vikipediyadan import qilindi.</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:Wikidata/SisterCities&amp;diff=110890&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:Wikidata/SisterCities&amp;diff=110890&amp;oldid=prev</guid>
			<description>&lt;p&gt;Oʻzbekcha Vikipediyadan import qilindi.&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;
local flags = require( &amp;#039;Module:Wikidata/Flags&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
local delink&lt;br /&gt;
&lt;br /&gt;
function p.formatSisterCitiesProperty( context, options )&lt;br /&gt;
	if not context then error( &amp;#039;context not specified&amp;#039; ); end;&lt;br /&gt;
	if not options then error( &amp;#039;options not specified&amp;#039; ); end;&lt;br /&gt;
	if not options.entity then error( &amp;#039;options.entity missing&amp;#039; ); end;&lt;br /&gt;
&lt;br /&gt;
    local claims = context.selectClaims( options, options.property );&lt;br /&gt;
    if claims == nil then&lt;br /&gt;
        return &amp;#039;&amp;#039;; --TODO error?&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
	local cityNames = {};&lt;br /&gt;
    for i, claim in ipairs( claims ) do&lt;br /&gt;
    	if claim.mainsnak and claim.mainsnak.datavalue and claim.mainsnak.datavalue.value then&lt;br /&gt;
    		cityNames[ claim.id ] = mw.wikibase.label( claim.mainsnak.datavalue.value.id );&lt;br /&gt;
    	else&lt;br /&gt;
    		cityNames[ claim.id ] = &amp;#039;(none)&amp;#039;;&lt;br /&gt;
    	end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local comparator = function( c1, c2 )&lt;br /&gt;
		local n1 = cityNames[ c1.id ] or &amp;#039;&amp;#039;;&lt;br /&gt;
		local n2 = cityNames[ c2.id ] or &amp;#039;&amp;#039;;&lt;br /&gt;
		return n1 &amp;lt; n2;&lt;br /&gt;
	end&lt;br /&gt;
	table.sort( claims, comparator );&lt;br /&gt;
&lt;br /&gt;
    -- Barcha tasdiqlash arizalarini aylanib o‘tish va jadvalda rasmiylashtirilgan afzal ko‘rilgan &lt;br /&gt;
    -- arizalarni to‘plash&lt;br /&gt;
    local formattedClaims = {};&lt;br /&gt;
&lt;br /&gt;
    for i, claim in ipairs( claims ) do&lt;br /&gt;
        local formattedStatement = context.formatStatement( options, claim );&lt;br /&gt;
        -- bu yerda rasmiy ariza matni yoki xato satri qaytarilishi mumkin&lt;br /&gt;
        -- xato satrini ko‘rsatuvchi nil qiymati hech qachon qaytarilmaydiganga o‘xshaydi&lt;br /&gt;
        if formattedStatement then&lt;br /&gt;
            formattedStatement = &amp;#039;&amp;lt;span class=&amp;quot;wikidata-claim&amp;quot; data-wikidata-property-id=&amp;quot;&amp;#039; ..&lt;br /&gt;
            	string.upper( options.property ) .. &amp;#039;&amp;quot; data-wikidata-claim-id=&amp;quot;&amp;#039; .. claim.id .. &amp;#039;&amp;quot;&amp;gt;&amp;#039; ..&lt;br /&gt;
            	formattedStatement .. &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;;&lt;br /&gt;
            table.insert( formattedClaims, formattedStatement );&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
	-- jadvaldan rasmiy arizalar ro‘yxati bilan matnli satr hosil qilish  &lt;br /&gt;
    local out = mw.text.listToText( formattedClaims, &amp;#039;\n* &amp;#039;, &amp;#039;\n* &amp;#039; );&lt;br /&gt;
    if out ~= &amp;#039;&amp;#039; then&lt;br /&gt;
    	out = &amp;#039;* &amp;#039; .. out;&lt;br /&gt;
	    if options.before then&lt;br /&gt;
	    	out = options.before .. out;&lt;br /&gt;
		end&lt;br /&gt;
	    if options.after then&lt;br /&gt;
	    	out = out .. options.after;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
    return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function findCountryStatements( placeId )&lt;br /&gt;
	local countryStatements = {};&lt;br /&gt;
&lt;br /&gt;
	for _, countryStatement in pairs( mw.wikibase.getBestStatements( placeId, &amp;#039;P17&amp;#039; ) ) do&lt;br /&gt;
		if countryStatement and&lt;br /&gt;
			countryStatement.mainsnak and&lt;br /&gt;
			countryStatement.mainsnak.datavalue and&lt;br /&gt;
			countryStatement.mainsnak.datavalue.value and&lt;br /&gt;
			not ( countryStatement.qualifiers and countryStatement.qualifiers.P582 )&lt;br /&gt;
		then&lt;br /&gt;
			table.insert( countryStatements, countryStatement );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return countryStatements;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local flagsWikitextCache = {};&lt;br /&gt;
local countriesWikitextCache = {};&lt;br /&gt;
&lt;br /&gt;
function p.formatSisterCityClaim( context, options, statement )&lt;br /&gt;
&lt;br /&gt;
-- yoniq bo‘lsa, sanalar asosida filtrlash (masalan, through options.onlyCurrent)&lt;br /&gt;
    local function getDate(snak)&lt;br /&gt;
        if not snak or not snak.time then return nil end&lt;br /&gt;
         return mw.text.split(snak.time, &amp;quot;T&amp;quot;)[1]   -- &amp;quot;2020-04-01&amp;quot; из &amp;quot;+2020-04-01T00:00:00Z&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local today = os.date(&amp;quot;%Y-%m-%d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    if options.onlyCurrent == &amp;#039;yes&amp;#039; then&lt;br /&gt;
        local q = statement.qualifiers or {}&lt;br /&gt;
        local start = q.P580 and q.P580[1] and getDate(q.P580[1])&lt;br /&gt;
        local stop  = q.P582 and q.P582[1] and getDate(q.P582[1])&lt;br /&gt;
&lt;br /&gt;
    -- start &amp;gt; today → aloqa tiklandi&lt;br /&gt;
    if start and start &amp;gt; today then&lt;br /&gt;
        return &amp;#039;&amp;#039;  -- filtrlash&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- stop &amp;lt; today → yakunlangan&lt;br /&gt;
       if stop and stop &amp;lt; today then&lt;br /&gt;
           return &amp;#039;&amp;#039;  -- filtrlash&lt;br /&gt;
       end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	local result = &amp;#039;&amp;#039;;&lt;br /&gt;
	if not statement or statement.mainsnak.snaktype ~= &amp;#039;value&amp;#039; then&lt;br /&gt;
		return result;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local countryStatements = findCountryStatements( statement.mainsnak.datavalue.value.id );&lt;br /&gt;
	local flagImages = {};&lt;br /&gt;
	for _, countryStatement in pairs( countryStatements ) do&lt;br /&gt;
		local countryId = countryStatement.mainsnak.datavalue.value.id;&lt;br /&gt;
		local flagImage = flagsWikitextCache[ countryId ];&lt;br /&gt;
		if flagImage == nil then&lt;br /&gt;
			flagImage = flags.getFlag( context, countryId, os.time() * 1000);&lt;br /&gt;
			flagsWikitextCache[ countryId ] = flagImage;&lt;br /&gt;
		end&lt;br /&gt;
		if flagImage then&lt;br /&gt;
			table.insert( flagImages, flagImage );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if #flagImages then&lt;br /&gt;
		local flagText = mw.text.listToText( flagImages, &amp;#039;&amp;amp;nbsp;/&amp;amp;nbsp;&amp;#039;, &amp;#039;&amp;amp;nbsp;/&amp;amp;nbsp;&amp;#039; )&lt;br /&gt;
		result = result .. flagText .. ( flagText ~= &amp;#039;&amp;#039; and &amp;#039;&amp;amp;nbsp;&amp;#039; or &amp;#039;&amp;#039; );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = result .. context.formatSnak( options, statement.mainsnak, {} );&lt;br /&gt;
&lt;br /&gt;
	local countryLinks = {};&lt;br /&gt;
	for _, countryStatement in pairs( countryStatements ) do&lt;br /&gt;
		local countryId = countryStatement.mainsnak.datavalue.value.id;&lt;br /&gt;
		local countryText = countriesWikitextCache[ countryId ];&lt;br /&gt;
		if countryText == nil then&lt;br /&gt;
			countryText = context.formatSnak( {}, countryStatement.mainsnak, {} );&lt;br /&gt;
			countriesWikitextCache[ countryId ] = countryText;&lt;br /&gt;
		end&lt;br /&gt;
		if countryText then&lt;br /&gt;
			table.insert( countryLinks, countryText );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if #countryLinks then&lt;br /&gt;
		result = result .. &amp;#039;, &amp;#039; .. mw.text.listToText( countryLinks, &amp;#039; / &amp;#039;, &amp;#039; / &amp;#039; );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if statement.qualifiers and statement.qualifiers.P580 then&lt;br /&gt;
		if not delink then&lt;br /&gt;
			-- [[Module:Delink]] contains require( &amp;#039;strict&amp;#039; ), [[Module:Sources]] errors out with it&lt;br /&gt;
			delink = function( text )&lt;br /&gt;
				return mw.getCurrentFrame():expandTemplate{&lt;br /&gt;
					title = &amp;#039;Delink&amp;#039;,&lt;br /&gt;
					args = { text },&lt;br /&gt;
				}&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		local snak = context.formatSnak( options, statement.qualifiers.P580[ 1 ] )&lt;br /&gt;
		result = result .. &amp;#039; (&amp;#039; .. delink( snak ) .. &amp;#039;)&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if options.references then&lt;br /&gt;
		result = result .. context.formatRefs( options, statement );&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 12:12:48 GMT</pubDate>
			<dc:creator>Programmer</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:Wikidata/SisterCities</comments>
		</item>
</channel></rss>