<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://bukvica.org/w/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AWikidata%2Fwhere</id>
	<title>Модуль:Wikidata/where - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://bukvica.org/w/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AWikidata%2Fwhere"/>
	<link rel="alternate" type="text/html" href="https://bukvica.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Wikidata/where&amp;action=history"/>
	<updated>2026-05-03T13:25:32Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://bukvica.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Wikidata/where&amp;diff=238365&amp;oldid=prev</id>
		<title>Karaby: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="https://bukvica.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Wikidata/where&amp;diff=238365&amp;oldid=prev"/>
		<updated>2025-07-27T15:36:14Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&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;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 15:36, 27 июля 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff:1.41:old-238364:rev-238365 --&gt;
&lt;/table&gt;</summary>
		<author><name>Karaby</name></author>
	</entry>
	<entry>
		<id>https://bukvica.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Wikidata/where&amp;diff=238364&amp;oldid=prev</id>
		<title>Буквица&gt;Putnik: дополнительная проверка — может вернуться пустой объект</title>
		<link rel="alternate" type="text/html" href="https://bukvica.org/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Wikidata/where&amp;diff=238364&amp;oldid=prev"/>
		<updated>2023-05-09T13:11:48Z</updated>

		<summary type="html">&lt;p&gt;дополнительная проверка — может вернуться пустой объект&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local function FormatWhereLinkFromCatName( categoryPageName, sitelink )&lt;br /&gt;
	local prep, linktext = string.match( categoryPageName, &amp;#039;^Категория:[^ ]+ ([^ ]+) (.+)$&amp;#039; )&lt;br /&gt;
	&lt;br /&gt;
	if sitelink then&lt;br /&gt;
		return prep .. &amp;#039; &amp;#039; .. &amp;quot;[[&amp;quot; .. sitelink .. &amp;quot;|&amp;quot; .. linktext .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		return prep .. &amp;#039; &amp;#039; .. linktext&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function MakeWherePlace(place, propertyOfProperty, isUpperplace)&lt;br /&gt;
	if place.mainsnak.datavalue then  -- если значение свойства &amp;quot;значение неизвестно&amp;quot;, то datavalue nil&lt;br /&gt;
		local entityId = place.mainsnak.datavalue.value.id&lt;br /&gt;
		local categories = mw.wikibase.getBestStatements( entityId, propertyOfProperty )&lt;br /&gt;
		if categories and categories[ 1 ] then&lt;br /&gt;
			local sitelink = mw.wikibase.sitelink( entityId )&lt;br /&gt;
			local categoryId = categories[ 1 ].mainsnak.datavalue.value.id&lt;br /&gt;
			local categoryPageName = mw.wikibase.label( categoryId )&lt;br /&gt;
			if categoryPageName then&lt;br /&gt;
				return FormatWhereLinkFromCatName( categoryPageName, sitelink )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if isUpperplace == nil then&lt;br /&gt;
			local upperPlace = mw.wikibase.getBestStatements( entityId, &amp;#039;P131&amp;#039; )&lt;br /&gt;
			if upperPlace and upperPlace[ 1 ] then&lt;br /&gt;
				return MakeWherePlace( upperPlace[ 1 ], propertyOfProperty, true )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function MakeWherePlaces( places, propertyOfProperty )&lt;br /&gt;
	local res = &amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	for i, place in pairs(places) do&lt;br /&gt;
		if i &amp;gt; 1 then&lt;br /&gt;
			if next( places, _ ) == nil then&lt;br /&gt;
			    res = res .. &amp;#039; и &amp;#039;&lt;br /&gt;
			else&lt;br /&gt;
			    res = res .. &amp;#039;, &amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local text = MakeWherePlace( place, propertyOfProperty )&lt;br /&gt;
		&lt;br /&gt;
		if text then&lt;br /&gt;
			res = res .. text&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
    return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mainFunction( frame )&lt;br /&gt;
	local args = {}&lt;br /&gt;
	if frame == mw.getCurrentFrame() then&lt;br /&gt;
		args = frame.args&lt;br /&gt;
	else&lt;br /&gt;
		args = frame&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local result = &amp;#039;&amp;#039;&lt;br /&gt;
	local entity = mw.wikibase.getEntity()&lt;br /&gt;
	&lt;br /&gt;
	if entity and entity.claims then&lt;br /&gt;
		local countries = entity.claims[ args[ 1 ] ]&lt;br /&gt;
		if countries then&lt;br /&gt;
			result = result .. MakeWherePlaces( countries, args[ 2 ] )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Буквица&gt;Putnik</name></author>
	</entry>
</feed>