وحدة:Finditem: الفرق بين النسختين
[نسخة منشورة] | [نسخة منشورة] |
تم حذف المحتوى تمت إضافة المحتوى
Ibrahim.ID (نقاش | مساهمات) ط حمى "وحدة:Finditem": صفحة كثيرة الاستخدام: نظراً لارتباطها بالاف الصفحات وذات أهمية عالية ([تعديل=السماح للمستخدمين المحررين فقط] (غير محدد) [ا... |
ط غيّر إعدادات حماية »وحدة:Finditem«: بوت: [https://w.wiki/7NGP تحسين مستوي الحماية] ([تعديل=السماح للمحررين فقط] (غير محدد) [النقل=السماح للمحررين فقط] (غير محدد)) |
||
(4 مراجعات متوسطة بواسطة مستخدمين اثنين آخرين غير معروضة) | |||
سطر 1:
local p = {}
local i18n =
function p.find(frame)▼
{
local entity = mw.wikibase.getEntityObject()▼
["nolabel"] = "[[category:صفحات بحاجة لتسمية في ويكي بيانات]]"
}
function findlabelold(entity)
and entity.labels
and entity.labels['ar']
and entity.labels['ar'].value
then
local lang = entity.labels['ar']
if lang['language'] == 'ar'
then
return ''
else
return i18n.nolabel
end
end
end
function findlabel(id)
if frame.args[1] == nil then▼
local label = mw.wikibase.getLabelByLang( id , 'ar' ) or ''
▲ er = '[[تصنيف:صفحات دون عنصر ويكي بيانات]]'
if label ~= '' then return '' end
return i18n.nolabel
end
▲function p.find(frame)
▲ if not entity then
if not mw.wikibase then return '' end
-- This is the place to insert a category for articles that don't have items in Wikidata.▼
▲ --local entity = mw.wikibase.getEntityObject()
-- enwiki doesn't seem to have such a category, so in this case it is empty.▼
local EntityId = mw.wikibase.getEntityIdForCurrentPage()
-- For other wikis, just remove the two comment dashes and insert the correct category name.▼
local er = i18n.noentity
if EntityId then
return findlabel(EntityId)
else
return er
end
end
return p
|