Module:Template test case: Difference between revisions
add more messages and use the sandboxSubpage config value to generate sandbox template names
(add a shared message method) |
(add more messages and use the sandboxSubpage config value to generate sandbox template names) |
||
Line 170: | Line 170: | ||
for i = 3, highestNum do | for i = 3, highestNum do | ||
if not options['template' .. i] then | if not options['template' .. i] then | ||
error( | error(self:message( | ||
'missing-template-option-error', | |||
i, i | i, i | ||
), 2) | ), 2) | ||
Line 191: | Line 190: | ||
templateOptions[2] = templateOptions[2] or {} | templateOptions[2] = templateOptions[2] or {} | ||
if templateOptions[1].template and not templateOptions[2].template then | if templateOptions[1].template and not templateOptions[2].template then | ||
templateOptions[2].template = templateOptions[1].template .. '/ | templateOptions[2].template = templateOptions[1].template | ||
.. '/' .. obj.cfg.sandboxSubpage | |||
end | end | ||
if not templateOptions[1].template then | if not templateOptions[1].template then | ||
Line 197: | Line 197: | ||
end | end | ||
if not templateOptions[2].template then | if not templateOptions[2].template then | ||
templateOptions[2].title = templateOptions[1].title:subPageTitle( | templateOptions[2].title = templateOptions[1].title:subPageTitle( | ||
obj.cfg.sandboxSubpage | |||
) | |||
end | end | ||
Line 273: | Line 275: | ||
:cssText(self.options.style) | :cssText(self.options.style) | ||
:tag('caption') | :tag('caption') | ||
:wikitext(self.options.caption or ' | :wikitext(self.options.caption or self:message('columns-header')) | ||
-- Headings | -- Headings |