跳转到内容

Module:Template:Delete/data

维基语录,自由的名人名言录

此模块的文档可以在Module:Template:Delete/data/doc创建

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, '、', '或') .. '[[w:Help:名字空间|名字空间]]'
        end
        return nil
    end
end

return {
    {code = 'G1', aliases = {'empty'}, criteria = '無實際內容或非語錄。'},
    {code = 'G2', aliases = {'test'}, criteria = '測試頁。'},
    {code = 'G3', aliases = {'attack', 'van', 'g6'}, criteria = '破壞。'},
    {code = 'G4', criteria = '非常短而无定义或内容。'},
    {code = 'G5', aliases = {'rep'}, criteria = "曾經依存廢討論被刪除的重建內容。"},
    {code = 'G7', criteria = '未翻译的内容。'},
    {code = 'G8', aliases = {'rm'}, criteria = '管理员因技术原因删除页面。'},
    {code = 'G9', criteria = '内容只包含参考、链接、模板或/及分类。'},
    {code = 'G10', aliases = {'author', 'ad'}, criteria = '作者請求或原作者清空頁面。'},
    {code = 'G11', aliases = {'spam'}, criteria = '廣告或宣傳。'},
    {code = 'G13', aliases = {'mt'}, criteria = '明顯且拙劣的機器翻譯。'},
    {code = 'R1', criteria = '重定向页指向不存在的页面。'},
    {code = 'R2', aliases = {'interwk'}, criteria = '跨名字空間重定向。', check = reqns(0)},
    {code = 'R3', aliases = {'wr'}, criteria = '名稱錯誤的重定向。'},
    {code = 'R4', criteria = '重定向破坏。'},
    {code = 'R5', aliases = {'br'}, criteria = '指向本身的重定向或循環的重定向。'},
    {code = 'O1', aliases = {'aup'}, criteria = '用戶請求刪除自己的用戶頁子頁面。', check = reqns('User')},
    {code = 'O3', aliases = {'ip'}, criteria = '匿名用戶的討論頁。', check = reqns('User talk')},
    {code = 'O4', aliases = {'o5', 'uc'}, criteria = '空的分類。', check = reqns('Category')},
}