Content added Content deleted
(remove extra newline before p.addTrackingCategories) |
(mirror latest changes on WP) |
||
Line 332: | Line 332: | ||
-- |
-- |
||
-- Messages: |
-- Messages: |
||
-- 'sandbox-notice-image' --> '[[Image:Sandbox. |
-- 'sandbox-notice-image' --> '[[Image:Sandbox.png|50px|alt=|link=]]' |
||
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' |
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' |
||
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' |
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' |
||
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' |
-- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page' |
||
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' |
-- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page' |
||
-- 'sandbox-notice-pagetype-other' --> 'sandbox page' |
-- 'sandbox-notice-pagetype-other' --> 'sandbox page' |
||
-- 'sandbox-notice-compare-link-display' --> 'diff' |
-- 'sandbox-notice-compare-link-display' --> 'diff' |
||
Line 379: | Line 379: | ||
local testcasesTitle = env.testcasesTitle |
local testcasesTitle = env.testcasesTitle |
||
if testcasesTitle and testcasesTitle.exists then |
if testcasesTitle and testcasesTitle.exists then |
||
⚫ | |||
if testcasesTitle.namespace == mw.site.namespaces.Module.id then |
|||
⚫ | |||
⚫ | |||
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) |
|||
⚫ | |||
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. |
||
Line 552: | Line 544: | ||
-- |
-- |
||
-- Messages: |
-- Messages: |
||
-- 'documentation-icon-wikitext' --> '[[File: |
-- 'documentation-icon-wikitext' --> '[[File:Template-info.png|50px|link=|alt=Documentation icon]]' |
||
-- 'template-namespace-heading' --> 'Template documentation' |
-- 'template-namespace-heading' --> 'Template documentation' |
||
-- 'module-namespace-heading' --> 'Module documentation' |
-- 'module-namespace-heading' --> 'Module documentation' |
||
Line 647: | Line 639: | ||
local content = args.content |
local content = args.content |
||
if not content and docTitle and docTitle.exists then |
if not content and docTitle and docTitle.exists then |
||
local frame = mw.getCurrentFrame() |
|||
content = frame:expandTemplate{title = docTitle.prefixedText} |
|||
end |
end |
||
-- The line breaks below are necessary so that "=== Headings ===" at the start and end |
-- The line breaks below are necessary so that "=== Headings ===" at the start and end |
||
-- of docs are interpreted correctly. |
-- of docs are interpreted correctly. |
||
return '\n' .. (content or '') .. '\n' |
return '\n' .. (content or '') .. '\n' |
||
end |
|||
p.contentTitle = makeInvokeFunc('_contentTitle') |
|||
function p._contentTitle(args, env) |
|||
env = env or p.getEnvironment(args) |
|||
local docTitle = env.docTitle |
|||
if not args.content and docTitle and docTitle.exists then |
|||
return docTitle.prefixedText |
|||
else |
|||
return '' |
|||
end |
|||
end |
end |
||
Line 756: | Line 737: | ||
-- 'history-link-display' --> 'history' |
-- 'history-link-display' --> 'history' |
||
-- 'transcluded-from-blurb' --> |
-- 'transcluded-from-blurb' --> |
||
-- 'The above [[Wikipedia:Template documentation|documentation]] |
-- 'The above [[w:Wikipedia:Template documentation|documentation]] |
||
-- is [[Wikipedia:Transclusion|transcluded]] from $1.' |
-- is [[w:Wikipedia:Transclusion|transcluded]] from $1.' |
||
-- 'module-preload' --> 'Template:Documentation/preload-module-doc' |
-- 'module-preload' --> 'Template:Documentation/preload-module-doc' |
||
-- 'create-link-display' --> 'create' |
-- 'create-link-display' --> 'create' |
||
-- 'create-module-doc-blurb' --> |
-- 'create-module-doc-blurb' --> |
||
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' |
-- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].' |
||
--]=] |
--]=] |
||
local docTitle = env.docTitle |
local docTitle = env.docTitle |
||
Line 946: | Line 927: | ||
-- Messages: |
-- Messages: |
||
-- 'print-link-display' --> '/Print' |
-- 'print-link-display' --> '/Print' |
||
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' |
-- 'print-blurb' --> 'A [[w:Help:Books/for experts#Improving the book layout|print version]]' |
||
-- .. ' of this template exists at $1.' |
-- .. ' of this template exists at $1.' |
||
-- .. ' If you make a change to this template, please update the print version as well.' |
-- .. ' If you make a change to this template, please update the print version as well.' |
||
Line 981: | Line 962: | ||
-- 'doc-subpage' --> 'doc' |
-- 'doc-subpage' --> 'doc' |
||
-- 'testcases-subpage' --> 'testcases' |
-- 'testcases-subpage' --> 'testcases' |
||
-- 'strange-usage-category' --> ' |
-- 'strange-usage-category' --> 'Wikisource pages with strange ((documentation)) usage' |
||
-- |
-- |
||
-- /testcases pages in the module namespace are not categorised, as they may have |
-- /testcases pages in the module namespace are not categorised, as they may have |