Module:Documentation: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 194: | Line 194: | ||
local badDoc = args.baddoc | local badDoc = args.baddoc | ||
local pageType = mw.ustring.lower( args.type or getType( namespace, page ) ) | local pageType = mw.ustring.lower( args.type or getType( namespace, page ) ) | ||
local pageTypeDisplay = i18n[ 'pageType_' .. pageType ] or i18n.pageTypeTemplate | |||
if not docText and not noDoc then | if not docText and not noDoc then | ||
| Line 216: | Line 217: | ||
if noDoc then | if noDoc then | ||
docClass = 'documentation-noDoc' | docClass = 'documentation-noDoc' | ||
message = i18n.pageNoDocPrompt:format( | message = i18n.pageNoDocPrompt:format( pageTypeDisplay, pageTypeDisplay ) | ||
if not ( args.nocat or namespace == i18n.commonUser ) then | if not ( args.nocat or namespace == i18n.commonUser ) then | ||
category = i18n.pageNoDocCategory:format( | category = i18n.pageNoDocCategory:format( pageTypeDisplay ) | ||
if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | ||
category = i18n.pageNoDocCategoryDefault | category = i18n.pageNoDocCategoryDefault | ||
| Line 225: | Line 226: | ||
elseif badDoc then | elseif badDoc then | ||
docClass = 'documentation-badDoc' | docClass = 'documentation-badDoc' | ||
message = i18n.pageBadDocPrompt:format( | message = i18n.pageBadDocPrompt:format( pageTypeDisplay ) | ||
if not ( args.nocat or namespace == i18n.commonUser ) then | if not ( args.nocat or namespace == i18n.commonUser ) then | ||
category = i18n.pageBadDocCategory:format( | category = i18n.pageBadDocCategory:format( pageTypeDisplay ) | ||
if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | if not mw.title.new( i18n.commonCategoryPage:format( category ) ).exists then | ||
category = i18n.pageBadDocCategoryDefault | category = i18n.pageBadDocCategoryDefault | ||