<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ar">
	<id>https://www.copticpedia.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AWikidataCheck</id>
	<title>وحدة:WikidataCheck - تاريخ المراجعة</title>
	<link rel="self" type="application/atom+xml" href="https://www.copticpedia.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AWikidataCheck"/>
	<link rel="alternate" type="text/html" href="https://www.copticpedia.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:WikidataCheck&amp;action=history"/>
	<updated>2026-04-26T03:51:11Z</updated>
	<subtitle>تاريخ التعديل لهذه الصفحة في الويكي</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://www.copticpedia.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:WikidataCheck&amp;diff=22351&amp;oldid=prev</id>
		<title>Gerges: ٩ مراجعات</title>
		<link rel="alternate" type="text/html" href="https://www.copticpedia.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:WikidataCheck&amp;diff=22351&amp;oldid=prev"/>
		<updated>2021-03-26T21:18:10Z</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;
function cc(arg , c)&lt;br /&gt;
    if arg and arg ~= '' &lt;br /&gt;
    	then return arg&lt;br /&gt;
		else return c&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.wikidatacheck(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template&lt;br /&gt;
    local property = config.property&lt;br /&gt;
    local value = config.value&lt;br /&gt;
    local catbase = config.category&lt;br /&gt;
    local namespaces = config.namespaces&lt;br /&gt;
	----------&lt;br /&gt;
    local same = cc(config.same , 'كما في ويكي بيانات')&lt;br /&gt;
    local notinwikidata = cc(config.notinwikidata , 'ليست على ويكي بيانات')&lt;br /&gt;
    local defrent = cc(config.defrent , 'مختلفة عن ويكي بيانات')&lt;br /&gt;
	----------&lt;br /&gt;
    local ok = false -- one-way flag to check if we're in a good namespace&lt;br /&gt;
    local ns = mw.title.getCurrentTitle().namespace&lt;br /&gt;
	----------&lt;br /&gt;
    local cate_same =&amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; &amp;quot; .. same ..  &amp;quot;]]&amp;quot;&lt;br /&gt;
    local cate_notinwikidata = &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; &amp;quot; .. notinwikidata .. &amp;quot;]]&amp;quot;&lt;br /&gt;
    local cate_defrent = &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; &amp;quot; .. defrent ..  &amp;quot;]]&amp;quot;&lt;br /&gt;
	----------&lt;br /&gt;
    for v in mw.text.gsplit( namespaces, &amp;quot;,&amp;quot;, true) do&lt;br /&gt;
        if tonumber(v) == ns then&lt;br /&gt;
            ok = true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
	----------&lt;br /&gt;
    if not ok or catbase == &amp;quot;&amp;quot; then -- not in one of the approved namespaces&lt;br /&gt;
        return &amp;quot;&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
	----------&lt;br /&gt;
    local entity = mw.wikibase.getEntityObject()&lt;br /&gt;
    if not entity then -- no Wikidata item&lt;br /&gt;
        return cate_notinwikidata&lt;br /&gt;
    end&lt;br /&gt;
	----------&lt;br /&gt;
    local claims = entity.claims or {}&lt;br /&gt;
    local hasProp = claims[property]&lt;br /&gt;
    if not hasProp then -- no claim of that property&lt;br /&gt;
        return cate_notinwikidata -- bad. Bot needs to add the property&lt;br /&gt;
    end&lt;br /&gt;
	----------&lt;br /&gt;
    if hasProp[1].mainsnak.snaktype == 'value'&lt;br /&gt;
    then&lt;br /&gt;
	    local propValue = hasProp[1].mainsnak.datavalue.value -- This should eventually iterate over all possible values?&lt;br /&gt;
	    if propValue == value then&lt;br /&gt;
	        return cate_same -- yay!&lt;br /&gt;
	    else&lt;br /&gt;
	        return cate_defrent -- needs human review :(&lt;br /&gt;
	    end&lt;br /&gt;
	end&lt;br /&gt;
	----------&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Gerges</name></author>
	</entry>
</feed>