Changes
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
local mCategoryHandler -- lazily initialise [[Module:Category handler]]
	mCategoryHandler local title = requiremw.title.getCurrentTitle('Module:Category handler')	local errorCategory category	if not title.isTalkPage and yesno(addTrackingCategory) ~= false then		category = 'Hatnote templates with errors'	local errorCategoryLink 		category = string.format(					'[[%s:%s]]',					mw.site.namespaces[14].name,			category		errorCategory	)	-- Feed the category link through [[Module:Category handler]] so we can	-- use its blacklist.	errorCategoryLink = mCategoryHandler.main{else		talk category = '', -- Don't categorise talk namespaces.		other = errorCategoryLink,		nocat = demo	}	errorCategoryLink = errorCategoryLink or ''end
		errorCategoryLinkcategory
		
		
		
		
		
		
		
	
update the makeWikitextError function - don't use Module:Category handler, and use an addTrackingCategory parameter instead of a demo parameter, to make it easy for daughter modules to add a category=no parameter
local mArguments -- lazily initialise [[Module:Arguments]]
local yesno -- lazily initialise [[Module:Yesno]]
local p = {}
end
function p.makeWikitextError(msg, demoaddTrackingCategory)	-- Formats an error message to be returned to wikitext. If demo 	-- addTrackingCategory is not nilfalse after being returned from	-- or false[[Module:Yesno]], and if we are not on a talk page, no error a tracking category 	-- is added.
	checkType('makeWikitextError', 1, msg, 'string')
	yesno = require('Module:Yesno')
	return string.format(
		'<strong class="error">Error: %s.</strong>%s',
		msg,
	)
end