Modul:WikidataCheck: razlika između inačica

Izbrisani sadržaj Dodani sadržaj
m rev
Oznaka: uklanjanje ručnim načinom
m ispravak
Redak 23:
local entity = mw.wikibase.getEntityObject()
if not entity then -- no Wikidata item
return '<abbr style="color:grey;" title="Podatak nije prisutan na WikidatiWikipodatcima">?</abbr>' .. "[[Category:" .. catbase .. " koji nisu prisutni na WikidatiWikipodatcima]]"
end
if value == "" then
Redak 31:
local hasProp = claims[property]
if not hasProp then -- no claim of that property
return '<abbr style="color:grey;" title="Podatak nije prisutan na WikidatiWikipodatcima">?</abbr>' .. "[[Category:" .. catbase .. " koji nisu prisutni na WikidatiWikipodatcima]]" -- bad. Bot needs to add the property
end
for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?
Redak 37:
if propValue == value then
if nocatsame == "" then
return '<abbr style="color:green;" title="Podatak je isti kao na WikidatiWikipodatcima">✓</abbr>' .. "[[Category:" .. catbase .. " isti kao na WikidatiWikipodatcima]]" -- yay!
else
return nil -- if nocatsame, the "same as" category is not added
Redak 43:
end
end
return '<abbr style="color:red;" title="Podatak je različit od WikidateWikipodataka">X</abbr>' .. "[[Category:" .. catbase .. " različiti od WikidateWikipodataka]]" -- needs human review :(
end