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 .. '|' .. | 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 .. '|' .. | local viewLink = '[[' .. docPage.fullText .. '|' .. i18n.linkTextView .. ']]' | ||
local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. | local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. i18n.linkTextEdit .. ']]' | ||
local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. | local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. i18n.linkTextHistory .. ']]' | ||
links:wikitext("[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]") | links:wikitext("[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]") | ||
else | else | ||
local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. | local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. i18n.linkTextCreate .. ']' | ||
links:wikitext("[" .. createLink .. "] [" .. purgeLink .. "]") | links:wikitext("[" .. createLink .. "] [" .. purgeLink .. "]") | ||
end | end | ||