Difference between revisions of "Module:Documentation"
Undo revision 4731418 by Shirayuki (talk): templates on mediawiki.org use page language, not UI language, and it’s perfectly okay that way
>Tacsipacsi (don’t show “The above documentation is transcluded from…” when it’s not transcluded, but rather explicitly specified in the {{{content}}} parameter) |
>Tacsipacsi (Undo revision 4731418 by Shirayuki (talk): templates on mediawiki.org use page language, not UI language, and it’s perfectly okay that way) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 118: | Line 118: | ||
local parent = frame.getParent(frame) | local parent = frame.getParent(frame) | ||
local output = p._main(parent.args) | local output = p._main(parent.args) | ||
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. | return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output | ||
end | end | ||
Line 637: | Line 637: | ||
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 | ||
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle | content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle} | ||
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 | ||
Line 739: | Line 739: | ||
-- '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 |