「モジュール:Documentation」の版間の差分

ナビゲーションに移動 検索に移動
add __EXPECTUNUSEDTEMPLATE__ to sandboxNotice
(1版 をインポートしました)
bsd>WOSlinker
(add __EXPECTUNUSEDTEMPLATE__ to sandboxNotice)
363行目: 363行目:
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'sandbox-category' --> 'Template sandboxes'
-- 'module-sandbox-category' --> 'Module sandboxes'
-- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace'
--]=]
--]=]
local title = env.title
local title = env.title
377行目: 379行目:
-- Get the text. We start with the opening blurb, which is something like
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local text = '__EXPECTUNUSEDTEMPLATE__'
local pagetype
local pagetype, sandboxCat
if subjectSpace == 10 then
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
pagetype = message('sandbox-notice-pagetype-template')
sandboxCat = message('sandbox-category')
elseif subjectSpace == 828 then
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
pagetype = message('sandbox-notice-pagetype-module')
sandboxCat = message('module-sandbox-category')
else
else
pagetype = message('sandbox-notice-pagetype-other')
pagetype = message('sandbox-notice-pagetype-other')
sandboxCat = message('other-sandbox-category')
end
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local templateLink = makeWikilink(templateTitle.prefixedText)
411行目: 416行目:
end
end
end
end
-- Add the sandbox to the sandbox category.
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text .. makeCategoryLink(sandboxCat)


-- 'documentation-clear'
-- 'documentation-clear'
760行目: 766行目:
return nil
return nil
end
end
local ret
if docTitle.exists then
if docTitle.exists then
-- /doc exists; link to it.
-- /doc exists; link to it.
768行目: 773行目:
local historyDisplay = message('history-link-display')
local historyDisplay = message('history-link-display')
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay)
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
return message('transcluded-from-blurb', {docLink})
.. ' '
.. ' '
.. makeToolbar(editLink, historyLink)
.. makeToolbar(editLink, historyLink)
777行目: 782行目:
local createDisplay = message('create-link-display')
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
return message('create-module-doc-blurb', {createLink})
.. '<br />'
.. '<br />'
end
end
return ret
end
end


963行目: 967行目:
end
end
local subpage = title.subpageText
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
if message('display-strange-usage-category', nil, 'boolean')
and (
and (
970行目: 973行目:
)
)
then
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
return makeCategoryLink(message('strange-usage-category'))
end
end
return ret
return ''
end
end


return p
return p
匿名利用者

ナビゲーション メニュー