Module:Documentation: Difference between revisions
No edit summary |
mNo edit summary |
||
| Line 4: | Line 4: | ||
local i18n = { | local i18n = { | ||
-- format strings, should not be translated | |||
commonInternalLink = '[[%s]]', | commonInternalLink = '[[%s]]', | ||
commonInternalLinkPipe = '[[%s|%s]]', | commonInternalLinkPipe = '[[%s|%s]]', | ||
| Line 9: | Line 10: | ||
commonExternalLinkWithName = '[%s %s]', | commonExternalLinkWithName = '[%s %s]', | ||
commonCategory = 'Category:%s', | commonCategory = 'Category:%s', | ||
-- translate following types if your language displays differ | |||
pageType_template = 'template', | pageType_template = 'template', | ||
pageType_module = 'module', | pageType_module = 'module', | ||
| Line 15: | Line 18: | ||
pageType_script = 'script', | pageType_script = 'script', | ||
pageType_message = 'message', | pageType_message = 'message', | ||
linkBar = '%s', | |||
linkFormat = mw.text.nowiki( '[' ) .. '%s' .. mw.text.nowiki( ']' ), | -- modify them if your wiki use different style to displaying links | ||
linkSeparator = ' ', | linkBar = '%s', -- format used for whole link bar | ||
linkFormat = mw.text.nowiki( '[' ) .. '%s' .. mw.text.nowiki( ']' ), -- format used for each individual links | |||
linkSeparator = ' ', -- separator between links | |||
-- name of different type of links, change them if necessary | |||
linkTextPurge = mw.getCurrentFrame():callParserFunction( 'int:smw_purge' ):lower(), | linkTextPurge = mw.getCurrentFrame():callParserFunction( 'int:smw_purge' ):lower(), | ||
linkTextView = mw.getCurrentFrame():callParserFunction( 'int:view' ):lower(), | linkTextView = mw.getCurrentFrame():callParserFunction( 'int:view' ):lower(), | ||
| Line 23: | Line 30: | ||
linkTextHistory = mw.getCurrentFrame():callParserFunction( 'int:history_short' ):lower(), | linkTextHistory = mw.getCurrentFrame():callParserFunction( 'int:history_short' ):lower(), | ||
linkTextCreate = mw.getCurrentFrame():callParserFunction( 'int:create' ):lower(), | linkTextCreate = mw.getCurrentFrame():callParserFunction( 'int:create' ):lower(), | ||
createOutputFormat = '%s%s', | |||
createSplitDocPagePrompt = '\n<!-- Put categories/interwikis on the documentation page -->', | -- strings used in p.create(): contents shown when using {{docc}} or {{subst:docc}} | ||
createNoSubstCategory = 'Pages with templates requiring substitution', | createOutputFormat = '%s%s', -- overall format | ||
docPagePrompt = 'This is the documentation page. It %s be transcluded into the main %s page. See [[Template:Documentation]] for more information.', | createSplitDocPagePrompt = '\n<!-- Put categories/interwikis on the documentation page -->', -- this string will shown when a separate documentation page will be created | ||
docPagePromptWill = 'will', | createNoSubstCategory = 'Pages with templates requiring substitution', -- tracking category for using {{docc}} without substitution | ||
docPagePromptShould = 'should', | |||
docPageBadDocPrompt = "<br>'''This %s's documentation needs improving or additional information.'''", | -- strings used in p.docPage(): contents shown in documentation page | ||
docPageCategory = 'Documentation pages', | docPagePrompt = 'This is the documentation page. It %s be transcluded into the main %s page. See [[Template:Documentation]] for more information.', -- message shown as documentation header in documentation pages. Params: word used when page is a module or not; code page's type | ||
pageNoDocPrompt = "'''This %s has no documentation. If you know how to use this %s, please create it.'''", | docPagePromptWill = 'will', -- word used when code page is a module page | ||
pageNoDocCategory = '%ss with no documentation', | docPagePromptShould = 'should', -- word used when code is not a module page | ||
pageNoDocCategoryDefault = 'Pages with no documentation', | docPageBadDocPrompt = "<br>'''This %s's documentation needs improving or additional information.'''", -- additional message if a documentation page marked as baddoc | ||
pageBadDocPrompt = "'''This %s's documentation needs improving or additional information.'''\n", | docPageCategory = 'Documentation pages', -- tracking category for documentation pages | ||
pageBadDocCategory = '%ss with bad documentation', | |||
pageBadDocCategoryDefault = 'Pages with bad documentation', | -- strings used in p.page(): contents shown in code page | ||
pageDocHeaderTitle = 'Documentation', | pageNoDocPrompt = "'''This %s has no documentation. If you know how to use this %s, please create it.'''", -- message shown when a separate documentation page is not exist, both parameters refers to page type | ||
pageDocJumpToCode = 'Jump to code ↴', | pageNoDocCategory = '%ss with no documentation', -- tracking category for pages without documentation, parameters refers to page type | ||
pageDocHeaderBottom = 'The above documentation is transcluded from %s.', | pageNoDocCategoryDefault = 'Pages with no documentation', -- fallback tracking category for pages without documentation | ||
pageBadDocPrompt = "'''This %s's documentation needs improving or additional information.'''\n", -- message shown when a documentation page marked as baddoc, both parameters refers to page type | |||
pageBadDocCategory = '%ss with bad documentation', -- tracking category for pages marked as baddoc, parameters refers to page type | |||
pageBadDocCategoryDefault = 'Pages with bad documentation', -- fallback tracking category for pages marked as baddoc | |||
pageDocHeaderTitle = 'Documentation', -- message shown as the title of the documentation header | |||
pageDocJumpToCode = 'Jump to code ↴', -- text of the link to jump to the code | |||
pageDocHeaderBottom = 'The above documentation is transcluded from %s.', -- message shown as the bottom line of the documentation header | |||
} | } | ||