Anonymous user
Module:Protection banner: Difference between revisions
localise the error message by moving the makeWikitextError function code inside p._main; that way we don't have to worry about making cfg global
(make the args table optional from p._main) |
(localise the error message by moving the makeWikitextError function code inside p._main; that way we don't have to worry about making cfg global) |
||
Line 15:
-- Helper functions
--------------------------------------------------------------------------------
local errorText = mw.message.newRawMessage(boilerplate):params(msg):plain()▼
return string.format(▼
'<strong class="error">%s</strong>',▼
errorText▼
local function makeCategoryLink(cat)
Line 819 ⟶ 809:
)
if not protectionObjCreated then
local msg = protectionObj -- protectionObj is the error message.
local boilerplate = cfg.msg['error-message-blurb'] or 'Error: $1.'
▲ '<strong class="error">%s</strong>',
▲ errorText
)
end
|