Module:Documentation: Difference between revisions

mNo edit summary
mNo edit summary
Line 18: Line 18:
commonSpecialPageSub = 'Special:%s/%s',
commonSpecialPageSub = 'Special:%s/%s',
commonUser = 'User',
commonUser = 'User',
specialPurge = 'Purge',
specialEdit = 'EditPage',
specialHistory = 'PageHistory',


-- translate following types if your language displays differ
-- translate following types if your language displays differ
Line 148: Line 151:
:tag( 'div' )
:tag( 'div' )
:attr( 'id', 'documentation-header-tools' )
:attr( 'id', 'documentation-header-tools' )
:wikitext( i18n.linkBar:format( i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'Purge', page.fullText ), i18n.linkTextPurge ) ) ) )
:wikitext( i18n.linkBar:format( i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( i18n.specialPurge, page.fullText ), i18n.linkTextPurge ) ) ) )
:done()
:done()
:wikitext( i18n.docPagePrompt:format( pageType == 'module' and i18n.docPagePromptWill or i18n.docPagePromptShould, pageTypeDisplay ) )
:wikitext( i18n.docPagePrompt:format( pageType == 'module' and i18n.docPagePromptWill or i18n.docPagePromptShould, pageTypeDisplay ) )
Line 237: Line 240:
if not noDoc and page ~= docPage then
if not noDoc and page ~= docPage then
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( docPage.fullText, i18n.linkTextView ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( docPage.fullText, i18n.linkTextView ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'EditPage', docPage.fullText ), i18n.linkTextEdit ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( i18n.specialEdit, docPage.fullText ), i18n.linkTextEdit ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'PageHistory', docPage.fullText ), i18n.linkTextHistory ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( i18n.specialHistory, docPage.fullText ), i18n.linkTextHistory ) ) )
else
else
table.insert( linkList, i18n.linkFormat:format( i18n.commonExternalLinkWithName:format( docPage:canonicalUrl{ action = 'edit', preload = docPreload }, i18n.linkTextCreate ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonExternalLinkWithName:format( docPage:canonicalUrl{ action = 'edit', preload = docPreload }, i18n.linkTextCreate ) ) )
end
end
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'Purge', docPage.fullText ), i18n.linkTextPurge ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( i18n.specialPurge, docPage.fullText ), i18n.linkTextPurge ) ) )
links:wikitext( i18n.linkBar:format( table.concat( linkList, i18n.linkSeparator ) ) )
links:wikitext( i18n.linkBar:format( table.concat( linkList, i18n.linkSeparator ) ) )