Module:Message box: Difference between revisions
Richardpruen (talk | contribs) m 1 revision imported |
Wikimedia+Commons>Tacsipacsi |
||
Line 190: | Line 190: | ||
self:addClass(args.class) | self:addClass(args.class) | ||
self.style = args.style | self.style = args.style | ||
self.lang = args.lang | |||
self.dir = args.dir or (args.lang and 'auto' or nil) | |||
self.attrs = args.attrs | self.attrs = args.attrs | ||
Line 268: | Line 270: | ||
end | end | ||
if talkTitle and talkTitle.exists then | if talkTitle and talkTitle.exists then | ||
local talkText = 'Relevant discussion may be found on' | |||
if talkArgIsTalkPage then | |||
talkText = string.format( | |||
'%s [[%s|%s]].', | |||
talkText, | |||
talk, | |||
talkTitle.prefixedText | |||
) | |||
else | |||
talkText = string.format( | |||
'%s the [[%s#%s|talk page]].', | |||
talkText, | |||
talkTitle.prefixedText, | |||
talk | |||
) | |||
end | |||
self.talk = talkText | self.talk = talkText | ||
end | end | ||
Line 494: | Line 490: | ||
:attr('role', 'presentation') | :attr('role', 'presentation') | ||
if self.lang then | |||
boxTable:attr('lang', self.lang) | |||
end | |||
if self.dir then | |||
boxTable:attr('dir', self.dir) | |||
end | |||
if self.attrs then | if self.attrs then | ||
boxTable:attr(self.attrs) | boxTable:attr(self.attrs) | ||
Line 530: | Line 532: | ||
:addClass('mbox-text-span') | :addClass('mbox-text-span') | ||
:wikitext(self.issue or nil) | :wikitext(self.issue or nil) | ||
if (self.talk or self.fix) then | if (self.talk or self.fix) and not self.isSmall then | ||
textCellDiv:tag('span') | textCellDiv:tag('span') | ||
:addClass('hide-when-compact') | :addClass('hide-when-compact') |