Modhul:Message box: Béda antara owahan
Konten dihapus Konten ditambahkan
Tanpa ringkesan besutan |
anyari |
||
Larik 10:
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
--------------------------------------------------------------------------------
Baris 155 ⟶ 158:
-- Add attributes, classes and styles.
self.id = args.id
if yesno(args.plainlinks) ~= false then
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
Baris 202 ⟶ 205:
local sect
if args.sect == '' then
sect = 'Kaca ' .. (cfg.sectionDefault or '
elseif type(args.sect) == 'string' then
sect = 'Kaca ' .. args.sect
end
local issue = args.issue
Baris 278 ⟶ 281:
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
Baris 347 ⟶ 353:
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('
if not catTitle or not catTitle.exists then
self:addCat(0, 'Artikel mawa cithakan salah paramèter tanggal')
Baris 406 ⟶ 412:
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Kothak pitungkas Wikipédia butuh
end
if self.isSubstituted then
Baris 489 ⟶ 495:
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
Baris 540 ⟶ 552:
:css('text-align', 'center')
:wikitext(string.format(
'Kothak pitungkas iki nganggo paramèter "type=%s" salah lan butuh
self.type or ''
))
Baris 565 ⟶ 577:
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(
box:setParameters()
box:setCategories()
|