删除的内容 添加的内容
getMessage 双 pcall 容错
消息本地化:TNT 降级时用中文
 
第38行:
 
-- Helper function to get localized messages
local excerptMessages = {
['this'] = '这个部分',
['section'] = '这个部分',
['excerpt'] = '摘自:',
['more'] = '阅读更多……',
}
function getMessage(key)
local ok, TNT = pcall(require, 'Module:TNT')
if not ok then return key end
local ok2, msg = pcall(TNT.format, 'I18n/Module:Excerpt.tab', key)
if ok2 then return msg end
end
return key
return excerptMessages[key] or key
end