Line 30: |
Line 30: |
| local boxArgs = {} | | local boxArgs = {} |
| if #modules < 1 then | | if #modules < 1 then |
− | boxArgs.text = 'This template should use [[Wikipedia:Lua|Lua]]' --'<strong class="error">Error: no modules specified</strong>' | + | boxArgs.text = '<strong class="error">Error: no modules specified</strong>' |
| else | | else |
| local moduleLinks = {} | | local moduleLinks = {} |
Line 37: |
Line 37: |
| end | | end |
| local moduleList = mList.makeList('bulleted', moduleLinks) | | local moduleList = mList.makeList('bulleted', moduleLinks) |
− | boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList | + | boxArgs.text = 'Uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList |
| end | | end |
| boxArgs.type = 'notice' | | boxArgs.type = 'notice' |
| boxArgs.small = true | | boxArgs.small = true |
− | boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=Lua logo|link=Wikipedia:Lua]]' | + | boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|link=Wikipedia:Lua]]' |
| return mMessageBox.main('mbox', boxArgs) | | return mMessageBox.main('mbox', boxArgs) |
| end | | end |
Line 52: |
Line 52: |
| local cats = {} | | local cats = {} |
| | | |
− | --[[ Error category | + | -- Error category |
| if #modules < 1 then | | if #modules < 1 then |
| cats[#cats + 1] = 'Lua templates with errors' | | cats[#cats + 1] = 'Lua templates with errors' |
− | end ]] | + | end |
| | | |
| -- Lua templates category | | -- Lua templates category |
Line 78: |
Line 78: |
| categories['Module:Citation/CS1'] = categories['Module:Citation'] | | categories['Module:Citation/CS1'] = categories['Module:Citation'] |
| category = modules[1] and categories[modules[1]] | | category = modules[1] and categories[modules[1]] |
− | category = category | + | category = category or 'Lua-based templates' |
− | if not category then
| |
− | if #modules < 1 then
| |
− | category = 'Lua-candidates' -- Templates requiring Lua
| |
− | else
| |
− | category = 'Lua-based templates'
| |
− | end
| |
− | end
| |
| end | | end |
| cats[#cats + 1] = category | | cats[#cats + 1] = category |