Module:Documentation: Difference between revisions

mNo edit summary
mNo edit summary
Line 13: Line 13:
commonExternalLink = '[%s]',
commonExternalLink = '[%s]',
commonExternalLinkWithName = '[%s %s]',
commonExternalLinkWithName = '[%s %s]',
commonCategoryPage = 'Category:%s', -- translate if your language prefers localized name, although remain it untouched most likely not affect anything
 
commonUser = 'User', -- translate if your language prefers localized name, although remain it untouched most likely not affect anything
-- translate if your language prefers localized namespace name, although remain it untouched most likely not affect anything
commonCategoryPage = 'Category:%s',
commonSpecialPageSub = 'Special:%s/%s',
commonUser = 'User',


-- translate following types if your language displays differ
-- translate following types if your language displays differ
Line 145: Line 148:
:tag( 'div' )
:tag( 'div' )
:attr( 'id', 'documentation-header-tools' )
:attr( 'id', 'documentation-header-tools' )
:wikitext( i18n.linkBar:format( i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( 'Special:Purge/' .. page.fullText, i18n.linkTextPurge ) ) ) )
:wikitext( i18n.linkBar:format( i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'Purge', 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 234: Line 237:
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( 'Special:EditPage/' .. docPage.fullText, i18n.linkTextEdit ) ) )
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( 'Special:PageHistory/' .. docPage.fullText, i18n.linkTextHistory ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'PageHistory', 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( 'Special:Purge/' .. docPage.fullText, i18n.linkTextPurge ) ) )
table.insert( linkList, i18n.linkFormat:format( i18n.commonInternalLinkPipe:format( i18n.commonSpecialPageSub:format( 'Purge', docPage.fullText ), i18n.linkTextPurge ) ) )
links:wikitext( i18n.linkBar:format( table.concat( linkList, i18n.linkSeparator ) ) )
links:wikitext( i18n.linkBar:format( table.concat( linkList, i18n.linkSeparator ) ) )