Module:Lua banner: Difference between revisions
m
1 revision imported from wikipedia:Module:Lua_banner
m (1 revision imported) |
m (1 revision imported from wikipedia:Module:Lua_banner) |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 34:
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
local maybeSandbox = mw.title.new(module .. '/sandbox')
if maybeSandbox.exists then
moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText)
end
end
local moduleList = mList.makeList('bulleted', moduleLinks)
Line 48 ⟶ 52:
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Lua-
return mMessageBox.main('mbox', boxArgs)
end
Line 78 ⟶ 82:
if not category then
local categories = {
['Module:String'] = '
['Module:Math'] = 'Templates based on the Math Lua module',
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
['Module:Citation/CS1'] = '
}
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
|