1,507
个编辑
Cquote>Shizhao 无编辑摘要 |
小 (Simplified) |
||
| (未显示3个用户的6个中间版本) | |||
| 第246行: | 第246行: | ||
local sect | local sect | ||
if args.sect == '' then | if args.sect == '' then | ||
sect = ' | sect = '此' .. (cfg.sectionDefault or '页面') | ||
elseif type(args.sect) == 'string' then | elseif type(args.sect) == 'string' then | ||
sect = ' | sect = '此' .. args.sect | ||
end | end | ||
local issue = args.issue | local issue = args.issue | ||
| 第281行: | 第281行: | ||
end | end | ||
if talkTitle and talkTitle.exists then | if talkTitle and talkTitle.exists then | ||
local talkText = ' | local talkText = '相关讨论可见于' | ||
if talkArgIsTalkPage then | if talkArgIsTalkPage then | ||
talkText = format('%s[[%s|%s]].', talkText, talk, talkTitle.prefixedText) | talkText = format('%s[[%s|%s]].', talkText, talk, talkTitle.prefixedText) | ||
else | else | ||
talkText = format('%s[[%s#%s| | talkText = format('%s[[%s#%s|讨论页]].', talkText, talkTitle.prefixedText, talk) | ||
end | end | ||
self.talk = talkText | self.talk = talkText | ||
| 第293行: | 第293行: | ||
-- Get other values. | -- Get other values. | ||
local date | local date | ||
if args. | if args.date and args.date ~= '' then | ||
date = args. | date = args.date | ||
elseif args.time == '' and self.isTemplatePage then | elseif args.time == '' and self.isTemplatePage then | ||
date = lang:formatDate('Y年n月j日') | date = lang:formatDate('Y年n月j日') | ||
elseif args.time and args.time ~= '' then | elseif args.time and args.time ~= '' then | ||
date = lang:formatDate('Y年n月j日', args.time) | date = lang:formatDate('Y年n月j日', args.time) | ||
end | |||
if date then | |||
local ok, tempdate = pcall(lang.formatDate, lang, 'Y年n月j日', date) -- 正規化日期 | |||
if ok then | |||
date = tempdate | |||
end | |||
end | end | ||
if date then | if date then | ||
| 第399行: | 第405行: | ||
[31] = '㏾' | [31] = '㏾' | ||
} | } | ||
if args. | if args.date and args.date ~= '' then | ||
date = args. | date = args.date | ||
local ok, tempdate = pcall(lang.formatDate, lang, 'Y年n月', date) -- 正規化日期 | |||
if ok then | |||
date = tempdate | |||
end | |||
elseif args.time and args.time ~= '' then | elseif args.time and args.time ~= '' then | ||
date = lang:formatDate('Y年n月', time) | date = lang:formatDate('Y年n月', args.time) | ||
sortDay = lang:formatDate('j', time) | sortDay = lang:formatDate('j', args.time) | ||
sortDay = tonumber(sortDay) | sortDay = tonumber(sortDay) | ||
sortDay = dayName[sortDay] | sortDay = dayName[sortDay] | ||
| 第477行: | 第487行: | ||
end | end | ||
if self.isSubstituted then | if self.isSubstituted then | ||
self:addCat('all', ' | self:addCat('all', '错误使用替换引用的页面') | ||
end | end | ||
| 第500行: | 第510行: | ||
:addClass('error') | :addClass('error') | ||
:wikitext(format( | :wikitext(format( | ||
'模板<code>%s[[Template:%s|%s]]%s</code> | '模板<code>%s[[Template:%s|%s]]%s</code>被错误地替代。', | ||
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') | mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') | ||
)) | )) | ||
| 第602行: | 第612行: | ||
:tag('div') | :tag('div') | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
:wikitext(format(' | :wikitext(format('此消息框使用无效的「type=%s」参数,需要修复。', self.type or '')) | ||
end | end | ||