Module:Documentation: Difference between revisions

mNo edit summary
mNo edit summary
Line 12: Line 12:
linkFormat = mw.text.nowiki( '[' ) .. '%s' .. mw.text.nowiki( ']' ),
linkFormat = mw.text.nowiki( '[' ) .. '%s' .. mw.text.nowiki( ']' ),
linkTextPurge = mw.getCurrentFrame():callParserFunction( 'int:smw_purge' ):lower(),
linkTextPurge = mw.getCurrentFrame():callParserFunction( 'int:smw_purge' ):lower(),
linkTextView = mw.getCurrentFrame():callParserFunction( 'int:view' ):lower(),
linkTextEdit = mw.getCurrentFrame():callParserFunction( 'int:edit' ):lower(),
linkTextHistory = mw.getCurrentFrame():callParserFunction( 'int:history_short' ):lower(),
linkTextCreate = mw.getCurrentFrame():callParserFunction( 'int:create' ):lower(),
createOutputFormat = '%s%s',
createOutputFormat = '%s%s',
createSplitDocPagePrompt = '\n<!-- Put categories/interwikis on the documentation page -->',
createSplitDocPagePrompt = '\n<!-- Put categories/interwikis on the documentation page -->',
Line 194: Line 198:
:attr( 'id', 'documentation-header-tools' )
:attr( 'id', 'documentation-header-tools' )


local purgeLink = '[[Special:Purge/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:smw_purge' ):lower() .. ']]'
local purgeLink = '[[Special:Purge/' .. docPage.fullText .. '|' .. i18n.linkTextPurge .. ']]'
if not noDoc and page ~= docPage then
if not noDoc and page ~= docPage then
local viewLink = '[[' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:view' ):lower() .. ']]'
local viewLink = '[[' .. docPage.fullText .. '|' .. i18n.linkTextView .. ']]'
local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:edit' ):lower() .. ']]'
local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. i18n.linkTextEdit .. ']]'
local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:history_short' ):lower() .. ']]'
local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. i18n.linkTextHistory .. ']]'
links:wikitext("&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;")
links:wikitext("&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;")
else
else
local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. f:callParserFunction( 'int:create' ):lower() .. ']'
local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. i18n.linkTextCreate .. ']'
links:wikitext("&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;")
links:wikitext("&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;")
end
end