الفرق بين المراجعتين لصفحة: «وحدة:Wikidata2»
تم حذف المحتوى تمت إضافة المحتوى
Mr. Ibrahem (نقاش | مساهمات) لا ملخص تعديل |
Mr. Ibrahem (نقاش | مساهمات) لا ملخص تعديل |
||
سطر 823:
end
local lan = langcode or 'ar'
▲function p.descriptionIn(frame)
local langcode = frame.args[1]▼
local id = frame.args[2] -- "id" must be nil, as access to other Wikidata objects is disabled in Mediawiki configuration▼
local entity = mw.wikibase.getEntityObject(id)
if entity
and entity.descriptions and entity.descriptions then
if lang['language'] == lan then
else return nil end
▲ return entity.descriptions[langcode or 'ar'].value
end
end▼
end
function
local id = frame.args[2] -- "id" must be nil, as access to other Wikidata objects is disabled in Mediawiki configuration▼
local entity = mw.wikibase.getEntityObject(id)
if entity
and entity.labels and entity.labels[''..lan..''].value
then
if lang['language'] == lan then
else return nil end
▲ return entity.labels[langcode or 'ar'].value
end
end▼
function p.descriptionIn(frame)
▲ local langcode = frame.args[1]
▲ local id = frame.args[2]
return descriptionIn( langcode ,id )
function p.labelIn(frame)
local langcode = frame.args[1]
▲ local id = frame.args[2]
return labelIn( langcode ,id )
end
|