Difference between revisions of "Module:Documentation"
add a link to run the test cases from the sandbox page
>Jackmcbarn (add a link to run the test cases from the sandbox page) |
|||
Line 380: | Line 380: | ||
local testcasesTitle = env.testcasesTitle | local testcasesTitle = env.testcasesTitle | ||
if testcasesTitle and testcasesTitle.exists then | if testcasesTitle and testcasesTitle.exists then | ||
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') | if testcasesTitle.namespace == mw.site.namespaces.Module then | ||
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) | local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') | ||
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') | |||
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) | |||
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) | |||
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) | |||
else | |||
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') | |||
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) | |||
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) | |||
end | |||
end | end | ||
-- Add the sandbox to the sandbox category. | -- Add the sandbox to the sandbox category. |