Content added Content deleted
(internationalise the sandbox template notice call) |
(internationalise the protection template code) |
||
Line 31: | Line 31: | ||
cfg.sandboxNoticeTemplate = 'template sandbox notice' -- The name of the template to display at the top of sandbox pages. |
cfg.sandboxNoticeTemplate = 'template sandbox notice' -- The name of the template to display at the top of sandbox pages. |
||
cfg.sandboxNoticeLivepageParam = 1 -- The parameter of the sandbox notice template to send the cfg.livepageArg to. |
cfg.sandboxNoticeLivepageParam = 1 -- The parameter of the sandbox notice template to send the cfg.livepageArg to. |
||
cfg.protectionTemplate = 'pp-template' -- The name of the template that displays the protection icon (a padlock on enwiki). |
|||
cfg.protectionTemplateArgs = {docusage = 'yes'} -- Any arguments to send to the protection template. |
|||
-- Display settings |
-- Display settings |
||
Line 148: | Line 150: | ||
function p.protectionTemplate() |
function p.protectionTemplate() |
||
local protectionTemplate = cfg.protectionTemplate |
|||
if currentTitle.namespace == 10 then -- We are in the template namespace. |
|||
if not (protectionTemplate and currentTitle.namespace == 10) then |
|||
⚫ | |||
-- Don't display the protection template if we are not in the template namespace. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
else |
|||
⚫ | |||
⚫ | |||
return level |
|||
⚫ | |||
else |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
end |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
return nil |
return nil |