跳至內容

「模組:Template:Delete」:修訂間差異

移除 103 位元組 、​ 2024年7月22日 (星期一)
無編輯摘要
imported>CYL992
(建立內容為「local data = require('Module:Template:Delete/data') local z = {} function extractAliases(item) allnames = {item['code']} for j, alias in ipairs(item['aliases']) do table.insert(allnames, alias) end return allnames end function extractShortDesc(item) if item['description'] then return item['description']:gsub('{', '{'):gsub('}', '}'):gsub('|', '|') else return '' end end function extractDe…」的新頁面)
 
無編輯摘要
第116行: 第116行:
                 end
                 end
             end
             end
            -- special case for O1/G10 in user namespace, see Wikipedia:机器人/申请/Xiplus-abot/8
             if title.namespace == 2 and (item['code'] == 'O1' or item['code'] == 'G10') then
             if title.namespace == 2 and (item['code'] == 'O1' or item['code'] == 'G10') then
             rowsuffix2 = args.cat or args.cate or args.category or ('[[Category:O1快速删除候选]]')
             rowsuffix2 = args.cat or args.cate or args.category or ('[[Category:O1快速刪除候選]]')
             end
             end
              
              
             if check then
             if check then
                 rowsuffix = '<br><span class="error">' .. check .. '</span>' .. (args.cat or args.cate or args.category or '[[Category:快速删除候选|]]')
                 rowsuffix = '<br><span class="error">' .. check .. '</span>' .. (args.cat or args.cate or args.category or '[[Category:快速刪除候選|]]')
             else
             else
                 if frame.args.deletelink then
                 if frame.args.deletelink then
                     table.insert(deletelinks, '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]: ' .. extractDeleteReason(item) .. deletesuffix)
                     table.insert(deletelinks, '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]: ' .. extractDeleteReason(item) .. deletesuffix)
                 end
                 end
                 rowsuffix = args.cat or args.cate or args.category or ('[[Category:快速删除候选|' .. (item['category'] or '速') .. ']]')
                 rowsuffix = args.cat or args.cate or args.category or ('[[Category:快速刪除候選|' .. (item['category'] or '速') .. ']]')
             end
             end
             if deletesuffix then
             if deletesuffix then
第141行: 第140行:
             -- try to read it as a title
             -- try to read it as a title
             title = mw.title.new(mw.text.trim(arg))
             title = mw.title.new(mw.text.trim(arg))
             cat = args.cat or args.cate or args.category or '[[Category:快速删除候选|速]]'
             cat = args.cat or args.cate or args.category or '[[Category:快速刪除候選|速]]'
             if title and title.exists then
             if title and title.exists then
                 if frame.args.deletelink then
                 if frame.args.deletelink then
第171行: 第170行:
         return mw.text.trim(table.concat(pretext) .. '\n' .. table.concat(rows, '\n'))
         return mw.text.trim(table.concat(pretext) .. '\n' .. table.concat(rows, '\n'))
     else
     else
         return '<span style="font-weight:bold;color:red;">(請填寫理由)</span>' .. (args.cat or args.cate or args.category or '[[Category:快速删除候选|]]')
         return '<span style="font-weight:bold;color:red;">(請填寫理由)</span>' .. (args.cat or args.cate or args.category or '[[Category:快速刪除候選|]]')
     end
     end
end
end


return z
return z