<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://159.13.49.45/index.php?action=history&amp;feed=atom&amp;title=Module%3ASDcat</id>
	<title>Module:SDcat - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://159.13.49.45/index.php?action=history&amp;feed=atom&amp;title=Module%3ASDcat"/>
	<link rel="alternate" type="text/html" href="http://159.13.49.45/index.php?title=Module:SDcat&amp;action=history"/>
	<updated>2026-04-03T21:32:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://159.13.49.45/index.php?title=Module:SDcat&amp;diff=881&amp;oldid=prev</id>
		<title>Nat: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://159.13.49.45/index.php?title=Module:SDcat&amp;diff=881&amp;oldid=prev"/>
		<updated>2025-04-07T11:42:03Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&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&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 11:42, 7 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&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 mediawiki:diff:1.41:old-880:rev-881 --&gt;
&lt;/table&gt;</summary>
		<author><name>Nat</name></author>
	</entry>
	<entry>
		<id>http://159.13.49.45/index.php?title=Module:SDcat&amp;diff=880&amp;oldid=prev</id>
		<title>wikipedia&gt;Pppery: Changed protection settings for &quot;Module:SDcat&quot;: Per main ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="http://159.13.49.45/index.php?title=Module:SDcat&amp;diff=880&amp;oldid=prev"/>
		<updated>2024-02-17T03:57:52Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/index.php/Module:SDcat&quot; title=&quot;Module:SDcat&quot;&gt;Module:SDcat&lt;/a&gt;&amp;quot;: Per main ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
SDcat&lt;br /&gt;
Module to check whether local short description matches that on Wikidata&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
--[[&lt;br /&gt;
setCat has the qid of a Wikidata entity passed as |qid=&lt;br /&gt;
(it defaults to the associated qid of the current article if omitted)&lt;br /&gt;
and the local short description passed as |sd=&lt;br /&gt;
It returns a category if there is an associated Wikidata entity.&lt;br /&gt;
It returns one of the following tracking categories, as appropriate:&lt;br /&gt;
* Category:Short description matches Wikidata (case-insensitive)&lt;br /&gt;
* Category:Short description is different from Wikidata&lt;br /&gt;
* Category:Short description with empty Wikidata description&lt;br /&gt;
For testing purposes, a link prefix |lp= may be set to &amp;quot;:&amp;quot; to make the categories visible.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- function exported for use in other modules&lt;br /&gt;
-- (local short description, Wikidata entity-ID, link prefix)&lt;br /&gt;
p._setCat = function(sdesc, itemID, lp)&lt;br /&gt;
	if not mw.wikibase then return nil end&lt;br /&gt;
	if itemID == &amp;quot;&amp;quot; then itemID = nil end&lt;br /&gt;
	-- Wikidata description field&lt;br /&gt;
	local wdesc = (mw.wikibase.getDescription(itemID) or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
	if wdesc == &amp;quot;&amp;quot; then&lt;br /&gt;
		return &amp;quot;[[&amp;quot; .. lp .. &amp;quot;Category:Short description with empty Wikidata description]]&amp;quot;&lt;br /&gt;
	elseif wdesc == sdesc then&lt;br /&gt;
		return &amp;quot;[[&amp;quot; .. lp .. &amp;quot;Category:Short description matches Wikidata]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;[[&amp;quot; .. lp .. &amp;quot;Category:Short description is different from Wikidata]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- function exported for call from #invoke&lt;br /&gt;
p.setCat = function(frame)&lt;br /&gt;
	local args&lt;br /&gt;
	if frame.args.sd then&lt;br /&gt;
		args = frame.args&lt;br /&gt;
	else&lt;br /&gt;
		args = frame:getParent().args&lt;br /&gt;
	end&lt;br /&gt;
	-- local short description&lt;br /&gt;
	local sdesc = mw.text.trim(args.sd or &amp;quot;&amp;quot;):lower()&lt;br /&gt;
	-- Wikidata entity-ID&lt;br /&gt;
	local itemID = mw.text.trim(args.qid or &amp;quot;&amp;quot;)&lt;br /&gt;
	-- link prefix, strip quotes&lt;br /&gt;
	local lp = mw.text.trim(args.lp or &amp;quot;&amp;quot;):gsub(&amp;#039;&amp;quot;&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
	return p._setCat(sdesc, itemID, lp)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Pppery</name></author>
	</entry>
</feed>