| 第203行: |
第203行: |
| | if cfg.allowId then | | if cfg.allowId then |
| | self.id = args.id | | self.id = args.id |
| | + | self.name = args.name |
| | + | if self.name then |
| | + | self:addClass('box-' .. string.gsub(self.name,' ','_')) |
| | + | end |
| | end | | end |
| | self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks') | | self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks') |
| 第242行: |
第246行: |
| | local sect | | local sect |
| | if args.sect == '' then | | if args.sect == '' then |
| − | sect = ' 本' .. (cfg.sectionDefault or '頁面') | + | sect = ' 此' .. (cfg.sectionDefault or '頁面') |
| | elseif type(args.sect) == 'string' then | | elseif type(args.sect) == 'string' then |
| − | sect = ' 本' .. args.sect | + | sect = ' 此' .. args.sect |
| | end | | end |
| | local issue = args.issue | | local issue = args.issue |
| 第291行: |
第295行: |
| | if args.date and args.date ~= '' then | | if args.date and args.date ~= '' then |
| | date = args.date | | date = args.date |
| − | elseif args.date == '' 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日', time) | + | date = lang:formatDate('Y年n月j日', args.time) |
| | end | | end |
| | if date then | | if date then |
| − | self.date = format("<small> (%s )</small>", date) | + | local ok, tempdate = pcall(lang.formatDate, lang, 'Y年n月j日', date) -- 正規化日期 |
| | + | if ok then |
| | + | date = tempdate |
| | + | end |
| | + | end |
| | + | if date then |
| | + | self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date) |
| | end | | end |
| | if args.fix and args.fix ~= '' then | | if args.fix and args.fix ~= '' then |
| 第397行: |
第407行: |
| | if args.date and args.date ~= '' then | | if args.date and args.date ~= '' then |
| | date = args.date | | 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] |
| 第598行: |
第612行: |
| | :tag('div') | | :tag('div') |
| | :css('text-align', 'center') | | :css('text-align', 'center') |
| − | :wikitext(format(' 本 訊息框使用無效的「type=%s」參數,需要修復。', self.type or '')) | + | :wikitext(format(' 此 訊息框使用無效的「type=%s」參數,需要修復。', self.type or '')) |
| | end | | end |
| | | | |