الفرق بين المراجعتين لصفحة: «وحدة:Lua banner»

تم حذف المحتوى تمت إضافة المحتوى
لا ملخص تعديل
لا ملخص تعديل
سطر 1:
-- This module implements the {{lua}} template.
local yesno = require('وحدةModule:Yesno')
local mList = require('وحدةModule:List')
local mTableTools = require('وحدةModule:TableTools')
local mMessageBox = require('وحدةModule:Message box')
 
local p = {}
سطر 18:
return p._main(args)
end
 
 
function p._main(args)
السطر 24 ⟵ 23:
local box = p.renderBox(modules)
local trackingCategories = p.renderTrackingCategories(args, modules)
return box .. (trackingCategories or '')
if args.nocat and args.nocat ~= '' then
end
if trackingCategories and trackingCategories ~= "" then
trackingCategories = mw.getCurrentFrame():preprocess('{{#تبديل:{{SUBPAGENAME}}|ملعب|ملعب2|doc|مختبر|نسخة|تجربة|شرح=|#default='.. trackingCategories .. "}}")
end
return box .. (trackingCategories or '')
end
 
السطر 35 ⟵ 29:
local boxArgs = {}
if #modules < 1 then
boxArgs.text = '<strong class="error">خطأError: لمno تذكرmodules أي وحدةspecified</strong>'
else
local moduleLinks = {}
السطر 44 ⟵ 38:
boxArgs.text = 'This ' ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
'هذا القالب يستعملuses [[ويكييبيدياWikipedia:لواLua|لواLua]]:\n' .. moduleList
end
boxArgs.type = 'notice'
السطر 61 ⟵ 55:
-- Error category
if #modules < 1 then
cats[#cats + 1] = 'قوالبLua لواtemplates بأخطاءwith errors'
end
السطر 78 ⟵ 72:
if not category then
local categories = {
['وحدةModule:String'] = 'قوالبLua تستندString-based على وحدة Stringtemplates',
['وحدةModule:Math'] = 'قوالبTemplates تستندbased علىon وحدةthe Math Lua module',
['وحدةModule:BaseConvert'] = 'قوالبTemplates تستندbased علىon وحدةthe BaseConvert Lua module',
['وحدةModule:Citation'] = 'قوالبLua-based استشهادcitation تستند على وحدة لواtemplates',
}
categories['وحدةModule:Citation/CS1'] = categories['وحدةModule:Citation']
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
السطر 93 ⟵ 87:
templateeditor = 3,
sysop = 4
}
local subpageBlacklist = {
['doc'] = true,
['شرح'] = true,
['sandbox'] = true,
['ملعب'] = true,
['sandbox2'] = true,
['testcases'] = true,
}
local currentProt = titleObj.protectionLevels["edit"][1]
السطر 108 ⟵ 94:
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end
if moduleProt < currentProt then
cats[#cats + 1] = "قوالبTemplates تستندusing علىunder-protected وحداتLua لواmodules"
break
end