Module:Message box: Difference between revisions

Jump to navigation Jump to search
Copy from sandbox per request
enws>Xover
(add back in local pmbox logic)
enwp>Pppery
(Copy from sandbox per request)
Line 87: Line 87:
elseif ns == 14 then
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.cfg = cfg.cmbox -- category namespace
elseif ns == 104 then
obj.cfg = cfg.pmbox -- page namespace
else
else
local nsTable = mw.site.namespaces[ns]
local nsTable = mw.site.namespaces[ns]
Line 270: Line 268:
                 local talkText
                 local talkText
                 if self.isSmall then
                 if self.isSmall then
                     local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk)
                     local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk)
                     talkText = string.format('([[%s|talk]])', talkLink)
                     talkText = string.format('([[%s|talk]])', talkLink)
                 else
                 else
Line 283: Line 281:
                     else
                     else
                         talkText = string.format(
                         talkText = string.format(
                             '%s the [[%s#%s|talk page]].',
                             '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].',
                             talkText,
                             talkText,
                             talkTitle.prefixedText,
                             talkTitle.prefixedText,
Anonymous user

Navigation menu