Module:Documentation: Difference between revisions

m (1 revision imported)
Line 363: Line 363:
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'module-sandbox-category' --> 'Module sandboxes'
-- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace'
--]=]
--]=]
local title = env.title
local title = env.title
Line 378: Line 380:
-- "This is the template sandbox for [[Template:Foo]] (diff)."
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local text = ''
local pagetype
local pagetype, sandboxCat
if subjectSpace == 10 then
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
pagetype = message('sandbox-notice-pagetype-template')
sandboxCat = message('sandbox-category')
elseif subjectSpace == 828 then
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
pagetype = message('sandbox-notice-pagetype-module')
sandboxCat = message('module-sandbox-category')
else
else
pagetype = message('sandbox-notice-pagetype-other')
pagetype = message('sandbox-notice-pagetype-other')
sandboxCat = message('other-sandbox-category')
end
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local templateLink = makeWikilink(templateTitle.prefixedText)
Line 411: Line 416:
end
end
end
end
-- Add the sandbox to the sandbox category.
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text .. makeCategoryLink(sandboxCat)


-- 'documentation-clear'
-- 'documentation-clear'
Anonymous user