local p = {}
local i18n =
{
["noentity"] = "[[تصنيف:صفحات بلا عنصر ويكي بيانات]]",
["nolabel"] = "[[تصنيف:صفحات خاصها تسمية فويكي بيانات]]"
}
function findlabel(entity)
if entity
and entity.labels
and entity.labels['ary']
and entity.labels['ary'].value
then
local lang = entity.labels['ary']
if lang['language'] == 'ary'
then
return ''
else
return i18n.nolabel
end
end
end
function p.find(frame)
if not mw.wikibase then return '' end
local entity = mw.wikibase.getEntityObject()
if frame.args[1] == nil
then er = i18n.noentity
else er = frame.args[1]
end
if entity
then
return findlabel(entity)
else
-- This is the place to insert a category for articles that don't have items in Wikidata.
-- enwiki doesn't seem to have such a category, so in this case it is empty.
-- For other wikis, just remove the two comment dashes and insert the correct category name.
return er
end
end
return p