| 第1行: |
第1行: |
| | --[=[ | | --[=[ |
| | | | |
| − | 这个 模块由[[Template:Lua]]调用 | + | 本 模块由[[Template:Lua]]调用 |
| | 暂无模块调用 | | 暂无模块调用 |
| | /****************************/ | | /****************************/ |
| − | 這個 模組由[[Template:Lua]]調用 | + | 本 模組由[[Template:Lua]]調用 |
| | 暫無模組調用 | | 暫無模組調用 |
| | | | |
| 第52行: |
第52行: |
| | local boxArgs = {} | | local boxArgs = {} |
| | if #modules < 1 then | | if #modules < 1 then |
| − | boxArgs.text = '<strong class="error">错误: 没有 指定-{zh-hans:模块; zh-hant:模組;}-</strong>' | + | boxArgs.text = '<strong class="error">错误: 未 指定-{zh-hans:模块; zh-hant:模組;}-</strong>' |
| | else | | else |
| | local moduleLinks = {} | | local moduleLinks = {} |
| 第58行: |
第58行: |
| | moduleLinks[i] = string.format('%s', module) | | moduleLinks[i] = string.format('%s', module) |
| | moduleLinks[i] = '[[:Module:' .. mw.title.new(moduleLinks[i]).text .. ']]' | | moduleLinks[i] = '[[:Module:' .. mw.title.new(moduleLinks[i]).text .. ']]' |
| | + | local maybeSandbox = mw.title.new(module .. '/sandbox') |
| | + | if maybeSandbox.exists then |
| | + | moduleLinks[i] = moduleLinks[i] .. string.format('([[:%s|沙盒]])', maybeSandbox.fullText) |
| | + | end |
| | end | | end |
| | local moduleList = mList.makeList('bulleted', moduleLinks) | | local moduleList = mList.makeList('bulleted', moduleLinks) |
| | boxArgs.text = '此' .. | | boxArgs.text = '此' .. |
| | (mw.title.getCurrentTitle():inNamespaces(828,829) and '-{zh-hans:模块; zh-hant:模組;}-' or '模板') .. | | (mw.title.getCurrentTitle():inNamespaces(828,829) and '-{zh-hans:模块; zh-hant:模組;}-' or '模板') .. |
| − | '使用[[Akarin:Lua|Lua语言]]:\n' .. moduleList | + | '使用[[Wikipedia:Lua|Lua语言]]:\n' .. moduleList |
| | end | | end |
| | boxArgs.type = 'notice' | | boxArgs.type = 'notice' |
| | boxArgs.small = true | | boxArgs.small = true |
| − | boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=|link=]]' | + | boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' |
| | return mMessageBox.main('mbox', boxArgs) | | return mMessageBox.main('mbox', boxArgs) |
| | end | | end |