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 following types if your language displays differ | -- translate following types if your language displays differ | ||
| Line 106: | Line 107: | ||
out = f:preprocess( out ) | out = f:preprocess( out ) | ||
if not args.nocat then | if not args.nocat then | ||
out = out .. i18n.commonInternalLink:format( i18n. | out = out .. i18n.commonInternalLink:format( i18n.commonCategoryPage:format( i18n.createNoSubstCategory ) ) | ||
end | end | ||
end | end | ||
| Line 150: | Line 151: | ||
body:wikitext( i18n.docPageBadDocPrompt:format( pageTypeDisplay ) ) | body:wikitext( i18n.docPageBadDocPrompt:format( pageTypeDisplay ) ) | ||
end | end | ||
if not ( args.nocat or namespace == | if not ( args.nocat or namespace == i18n.commonUser ) then | ||
body:wikitext( i18n.commonInternalLink:format( i18n. | body:wikitext( i18n.commonInternalLink:format( i18n.commonCategoryPage:format( i18n.docPageCategory ) ) ) | ||
end | end | ||
| Line 209: | Line 210: | ||
docClass = 'documentation-noDoc' | docClass = 'documentation-noDoc' | ||
message = i18n.pageNoDocPrompt:format( pageType, pageType ) | message = i18n.pageNoDocPrompt:format( pageType, pageType ) | ||
if not ( args.nocat or namespace == | if not ( args.nocat or namespace == i18n.commonUser ) then | ||
category = i18n.pageNoDocCategory:format( pageType ) | category = i18n.pageNoDocCategory:format( pageType ) | ||
if not mw.title.new( i18n. | if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | ||
category = i18n.pageNoDocCategoryDefault | category = i18n.pageNoDocCategoryDefault | ||
end | end | ||
| Line 218: | Line 219: | ||
docClass = 'documentation-badDoc' | docClass = 'documentation-badDoc' | ||
message = i18n.pageBadDocPrompt:format( pageType ) | message = i18n.pageBadDocPrompt:format( pageType ) | ||
if not ( args.nocat or namespace == | if not ( args.nocat or namespace == i18n.commonUser ) then | ||
category = i18n.pageBadDocCategory:format( pageType ) | category = i18n.pageBadDocCategory:format( pageType ) | ||
if not mw.title.new( i18n. | if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | ||
category = i18n.pageBadDocCategoryDefault | category = i18n.pageBadDocCategoryDefault | ||
end | end | ||