Module:Hatnote: Difference between revisions

113 bytes added ,  10 years ago
add a demo parameter to makeWikitextError
(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 = errorCategory
if not demo then
anderrorCategoryLink = string.format(
'[[%s:%s]]',
mw.site.namespaces[14].name,
errorCategory
)
else
or ''
errorCategoryLink = ''
end
return string.format(
'<strong class="error">Error: %s.</strong>%s',
Anonymous user