Modul:WikidataCheck: razlika između inačica

Izbrisani sadržaj Dodani sadržaj
Stvorena nova stranica sa sadržajem: »local p = {} function p.wikidatacheck(frame) local pframe = frame:getParent() local config = frame.args -- the arguments passed BY the template, in t...«.
 
mNema sažetka uređivanja
Redak 31:
local hasProp = claims[property]
if not hasProp then -- no claim of that property
return frame:preprocess( {{pitanje}} ).."[[Category:" .. catbase .. " not in Wikidata]]" -- 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 frame:preprocess( {{OK}} ).."[[Category:" .. catbase .. " same as Wikidata]]" -- yay!
else
return nil -- if nocatsame, the "same as" category is not added
Redak 43:
end
end
return frame:preprocess( {{NO}} ) .. "[[Category:" .. catbase .. " different from Wikidata]]" -- needs human review :(
end