Changes
more il8n work
cfg.contentArg = 'content' -- Passes documentation content directly from the {{documentation}} invocation.
cfg.linkBoxArg = 'link box' -- Specifies a custom link box (end box) or prevents it from being generated.
-- Software settings
-- The following are software settings that may change from wiki to wiki. For example, the classes
-- defined in commons.css or the names of templates.
cfg.mainDivId = 'template-documentation' -- The "id" attribute of the main HTML "div" tag.
cfg.mainDivClasses = 'template-documentation iezoomfix' -- The CSS classes added to the main HTML "div" tag.
cfg.sandboxSubpage = 'sandbox' -- The name of the template subpage typically used for sandboxes.
-- Display settings
-- The following settings configure the values displayed by the module.
cfg.sandboxLinkDisplay = 'sandbox'
----------------------------------------------------------------------------
-- so that we don't have to worry about unclosed tags.
.tag('div')
.attr('id', 'template-documentation'cfg.mainDivId) .addClass('template-documentation iezoomfix'cfg.mainDivClasses)
.wikitext(p._startBox(args))
.wikitext(p._content(args))
function p.sandboxNotice(args)
if currentTitle.subpageText == 'sandbox' cfg.sandboxSubpage then
local frame = mw.getCurrentFrame()
local root = htmlBuilder.create()
local docExist = docTitle.exists
local docnameFed = args[1] and true
local sandbox = docpageRoot .. '/sandbox'.. cfg.sandboxSubpage
local testcases = docpageRoot .. '/testcases'
templatePage = currentTitle.nsText .. ':' .. templatePage
local sandboxTitle = mw.title.new(sandbox)
if sandboxTitle.exists then
local sandboxLink = makeWikilink(sandbox, 'sandbox'cfg.sandboxLinkDisplay)
local sandboxEditLink = makeUrlLink(sandboxTitle:fullUrl{action = 'edit'}, 'edit')
local compareLink = makeUrlLink(mw.title.new('Special:ComparePages'):fullUrl{page1 = templatePage, page2 = sandbox}, 'diff')
local mirrorSummary = 'Create sandbox version of ' .. makeWikilink(templatePage)
local mirrorLink = makeUrlLink(sandboxTitle:fullUrl{action = 'edit', preload = templatePage, summary = mirrorSummary}, 'mirror')
text = text .. cfg.sandboxLinkDisplay .. 'sandbox ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
text = text .. ' and '
-- Determines the template page. No namespace or interwiki prefixes are included.
local subpage = currentTitle.subpageText
if subpage == 'sandbox' cfg.sandboxSubpage or subpage == 'testcases' then
return currentTitle.baseText
else