Difference between revisions of "Module:Documentation"
add comments for p.makeEndBoxExperimentBlurb
>Mr. Stradivarius (reorder end box functions) |
>Mr. Stradivarius (add comments for p.makeEndBoxExperimentBlurb) |
||
Line 512: | Line 512: | ||
-- 'start-box-linkclasses' --> 'mw-editsection plainlinks' | -- 'start-box-linkclasses' --> 'mw-editsection plainlinks' | ||
-- 'start-box-link-id' --> 'doc_editlinks' | -- 'start-box-link-id' --> 'doc_editlinks' | ||
-- 'testcases-create-link-display' --> 'create' | |||
--]=] | --]=] | ||
local subjectSpace = env.subjectSpace | local subjectSpace = env.subjectSpace | ||
Line 690: | Line 691: | ||
function p.makeDocPageBlurb(args, env) | function p.makeDocPageBlurb(args, env) | ||
-- | --[=[ | ||
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". | |||
-- @args - a table of arguments passed by the user | |||
-- @env - environment table containing title objects, etc., generated with p.getEnvironment | |||
-- | |||
-- Messages: | |||
-- 'edit-link-display' --> 'edit' | |||
-- 'history-link-display' --> 'history' | |||
-- 'transcluded-from-blurb' --> | |||
-- 'The above [[Wikipedia:Template documentation|documentation]] | |||
-- is [[Wikipedia:Transclusion|transcluded]] from $1.' | |||
-- 'module-preload' --> 'Template:Documentation/preload-module-doc' | |||
-- 'create-link-display' --> 'create' | |||
-- 'create-module-doc-blurb' --> | |||
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' | |||
--]=] | |||
local docTitle = env.docTitle | local docTitle = env.docTitle | ||
if not docTitle then | if not docTitle then | ||
return nil | return nil | ||
end | end | ||
local ret | local ret | ||
if docTitle.exists then | if docTitle.exists then | ||
Line 722: | Line 737: | ||
function p.makeEndBoxExperimentBlurb(args, env) | function p.makeEndBoxExperimentBlurb(args, env) | ||
--[[ | |||
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." | -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." | ||
-- | -- @args - a table of arguments passed by the user | ||
-- @env - environment table containing title objects, etc., generated with p.getEnvironment | |||
-- | |||
-- Messages: | |||
-- 'sandbox-link-display' --> 'sandbox' | |||
-- 'sandbox-edit-link-display' --> 'edit' | |||
-- 'compare-link-display' --> 'diff' | |||
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' | |||
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' | |||
-- 'sandbox-create-link-display' --> 'create' | |||
-- 'mirror-edit-summary' --> 'Create sandbox version of $1' | |||
-- 'mirror-link-display' --> 'mirror' | |||
-- 'sandbox-link-display' --> 'sandbox' | |||
-- 'testcases-link-display' --> 'testcases' | |||
-- 'testcases-edit-link-display'--> 'edit' | |||
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' | |||
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' | |||
-- 'testcases-create-link-display' --> 'create' | |||
-- 'testcases-link-display' --> 'testcases' | |||
-- 'testcases-edit-link-display' --> 'edit' | |||
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' | |||
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' | |||
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' | |||
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' | |||
--]] | |||
local subjectSpace = env.subjectSpace | local subjectSpace = env.subjectSpace | ||
local templateTitle = env.templateTitle | local templateTitle = env.templateTitle |