模組:Template:Delete/data
外观
function reqns(nslist)
return function(title)
if type(nslist) ~= 'table' then
nslist = {nslist}
end
text = {}
for i, ns in ipairs(nslist) do
if title:inNamespace(ns) then
return nil
end
if mw.site.namespaces[ns].id ~= 0 then
table.insert(text, mw.site.namespaces[ns].name)
else
table.insert(text, mw.site.namespaces[ns].displayName)
end
end
if #text then
return '仅适用于' .. mw.text.listToText(text, '、', '或') .. '[[Help:名字空间|名字空间]]'
end
return nil
end
end
return {
{code = 'G1', aliases = {'empty'}, criteria = '無實際內容或非詞典'},
{code = 'G2', aliases = {'test'}, criteria = '測試頁'},
{code = 'G3', aliases = {'attack', 'van'}, criteria = '惡搞或破壞'},
{code = 'G5', aliases = {'rep'}, criteria = "曾經被刪除的重建內容"},
{code = 'G7', aliases = {}, criteria = "未翻譯的內容"},
{code = 'G8', aliases = {'rm'}, criteria = '管理员因技术原因删除页面'},
{code = 'G9', aliases = {}, criteria = '內容只包含參考、連接、模板或/及分類'},
{code = 'G10', aliases = {'author', 'ad'}, criteria = '作者請求或原作者清空頁面'},
{code = 'G11', aliases = {'spam'}, criteria = '廣告或宣傳'},
{code = 'G13', aliases = {'mt'}, criteria = '明顯的、拙劣的機器翻譯'},
{code = 'G15', aliases = {}, criteria = '孤立頁面'},
{code = 'A1', aliases = {}, criteria = '標題拼寫錯誤', check = reqns(0)},
{code = 'R2', aliases = {'interwk'}, criteria = '跨名字空間重定向', check = reqns(0)},
{code = 'R3', aliases = {'wr'}, criteria = '名稱錯誤的重定向'},
{code = 'O1', aliases = {'aup'}, criteria = '用戶請求刪除自己的用戶頁', check = reqns('User')},
{code = 'O3', aliases = {'ip'}, criteria = '匿名用戶的討論頁', check = reqns('User talk')},
{code = 'O4', aliases = {'uc'}, criteria = '空的分類', check = reqns('Category')}
}