Module:Hatnote: Difference between revisions
Content deleted Content added
merge rellink into hatnote, use an options table to pass options to the hatnote function, and add a tracking category for errors |
add a demo parameter to makeWikitextError |
||
Line 74:
end
function p._makeWikitextError(msg, demo)
-- Formats an error message to be returned to wikitext. If demo is not nil
-- or false, no error category is added.
checkType('_makeWikitextError', 1, msg, 'string')
local errorCategory = 'Hatnote templates with errors'
local errorCategoryLink
if not demo then
'[[%s:%s]]',
mw.site.namespaces[14].name,
errorCategory
)
else
errorCategoryLink = ''
end
return string.format(
'<strong class="error">Error: %s.</strong>%s',
|