Module:Documentation: Difference between revisions

mNo edit summary
mNo edit summary
Line 176: Line 176:
:attr( 'id', 'documentation-header-tools' )
:attr( 'id', 'documentation-header-tools' )


local purgeLink = '[[Special:Purge/' .. docPage.fullText .. '|' .. f:preprocess('{{lc:{{int:smw purge}}}}') .. ']]'
local purgeLink = '[[Special:Purge/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:smw_purge' ):lower() .. ']]'
if not noDoc and page ~= docPage then
if not noDoc and page ~= docPage then
local viewLink = '[[' .. docPage.fullText .. '|' .. f:preprocess('{{lc:{{int:view}}}}') .. ']]'
local viewLink = '[[' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:view' ):lower() .. ']]'
local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. f:preprocess('{{lc:{{int:edit}}}}') .. ']]'
local editLink = '[[Special:EditPage/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:edit' ):lower() .. ']]'
local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. f:preprocess('{{lc:{{int:history short}}}}') .. ']]'
local historyLink = '[[Special:PageHistory/' .. docPage.fullText .. '|' .. f:callParserFunction( 'int:history_short' ):lower() .. ']]'
links:wikitext("[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]")
links:wikitext("[" .. viewLink .. "] [" .. editLink .. "] [" .. historyLink .. "] [" .. purgeLink .. "]")
else
else
local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. f:preprocess('{{lc:{{int:create}}}}') .. ']'
local createLink = '[' .. docPage:canonicalUrl{action = 'edit', preload = 'Template:Documentation/preload' } .. ' ' .. f:callParserFunction( 'int:create' ):lower() .. ']'
links:wikitext("[" .. createLink .. "] [" .. purgeLink .. "]")
links:wikitext("[" .. createLink .. "] [" .. purgeLink .. "]")
end
end