模块:Message box:修订间差异

imported>Quest for Truth
无编辑摘要
imported>Quest for Truth
无编辑摘要
第105行: 第105行:
nsVals[i] = format('"%s"', val)
nsVals[i] = format('"%s"', val)
end
end
error('invalid ns parameter passed to box:addCat; valid values are ' .. mw.text.listToText(nsVals, nil, ' or '))
error('無效的ns參數傳送到box:addCat;有效的數值為' .. mw.text.listToText(nsVals, '、', ''))
end
end
self[tname] = self[tname] or {}
self[tname] = self[tname] or {}
第141行: 第141行:
end
end
tinsert(boxTypes, '"mbox"')
tinsert(boxTypes, '"mbox"')
error(format('invalid message box type "%s"; valid types are %s', tostring(boxType), mw.text.listToText(boxTypes)), 2)
error(format('無效的訊息框類型「%s」;有效的類型為%s', tostring(boxType), mw.text.listToText(boxTypes)), 2)
end
end
return cfg
return cfg
第478行: 第478行:
.addClass('error')
.addClass('error')
.wikitext(format(
.wikitext(format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
'模板<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('}}')
))
))
第580行: 第580行:
.tag('div')
.tag('div')
.css('text-align', 'center')
.css('text-align', 'center')
.wikitext(format('This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or ''))
.wikitext(format('本訊息框使用無效的「type=%s」參數,需要修正。', self.type or ''))
end
end