Module:Protection banner: Difference between revisions

add a Blurb:_makeIntroFragmentParameter function to get round the problem of how to deal with commas in run-on sentences using the INTROBLURB parameter
(undo, as a lot of code would need to be changed for template demos to look respectable on unprotected pages)
(add a Blurb:_makeIntroFragmentParameter function to get round the problem of how to deal with commas in run-on sentences using the INTROBLURB parameter)
Line 387:
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
Line 520 ⟶ 521:
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
 
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end