Open main menu

Changes

Module:Protection banner

87 bytes removed, 07:04, 3 July 2014
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
-- Helper functions
--------------------------------------------------------------------------------
 
local function makeWikitextError(msg)
-- @TODO: localise this.
local boilerplate = 'Error: $1 ([[Module:Protection banner#Errors|help]])'
local errorText = mw.message.newRawMessage(boilerplate):params(msg):plain()
return string.format(
'<strong class="error">%s</strong>',
errorText
)
end
local function makeCategoryLink(cat)
)
if not protectionObjCreated then
local msg = protectionObj -- protectionObj is the error message. local boilerplate = cfg.msg['error-message-blurb'] or 'Error: $1.' local errorText = mw.message.newRawMessage(boilerplate):params(msg):plain() return makeWikitextErrorstring.format(protectionObj '<strong class="error">%s</strong>', errorText )
end
Anonymous user