Module:Protection banner: Difference between revisions

make the variable names a little more descriptive
Enwikipedia>Mr. Stradivarius
(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)
Enwikipedia>Mr. Stradivarius
(make the variable names a little more descriptive)
Line 809:
)
if not protectionObjCreated then
local msgerrorMessage = protectionObj -- protectionObj is the error message.
local boilerplateerrorBlurb = cfg.msg['error-message-blurb'] or 'Error: $1.'
local errorText = mw.message.newRawMessage(boilerplateerrorBlurb):params(msgerrorMessage):plain()
return string.format(
'<strong class="error">%s</strong>',