Zum Inhalt springen

Modul:Hatnote: Unterschied zwischen den Versionen

276 Bytes hinzugefügt ,  vor 10 Jahren
use the blacklist from Module:Category handler in the makeWikitextError function
(fix function name)
(use the blacklist from Module:Category handler in the makeWikitextError function)
Zeile 11: Zeile 11:
local mArguments -- lazily initialise [[Module:Arguments]]
local mArguments -- lazily initialise [[Module:Arguments]]
local yesno -- lazily initialise [[Module:Yesno]]
local yesno -- lazily initialise [[Module:Yesno]]
local mCategoryHandler -- lazily initialise [[Module:Category handler]]


local p = {}
local p = {}
Zeile 80: Zeile 81:
checkType('makeWikitextError', 1, msg, 'string')
checkType('makeWikitextError', 1, msg, 'string')
yesno = require('Module:Yesno')
yesno = require('Module:Yesno')
mCategoryHandler = require('Module:Category handler')
local errorCategory = 'Hatnote templates with errors'
local errorCategory = 'Hatnote templates with errors'
local errorCategoryLink
local errorCategoryLink = string.format(
if yesno(demo) then
'[[%s:%s]]',
errorCategoryLink = ''
mw.site.namespaces[14].name,
else
errorCategory
errorCategoryLink = string.format(
)
'[[%s:%s]]',
-- Feed the category link through [[Module:Category handler]] so we can
mw.site.namespaces[14].name,
-- use its blacklist.
errorCategory
errorCategoryLink = mCategoryHandler.main{
)
all = errorCategoryLink,
end
nocat = demo
}
errorCategoryLink = errorCategoryLink or ''
return string.format(
return string.format(
'<strong class="error">Error: %s.</strong>%s',
'<strong class="error">Error: %s.</strong>%s',
Anonymer Benutzer