Module:Documentation: Difference between revisions

Created page with "local p = {} -- Creating a documentation page or transclution through {{subst:doc}} function p.create( f ) local args = require( 'Module:ProcessArgs' ).norm() page = mw.titl..."
 
No edit summary
Line 23: Line 23:
end
end
if not mw.isSubsting() then
if not args.nocat and not mw.isSubsting() then
out = out .. '[[Category:Pages with templates requiring substitution]]'
out = out .. '[[Category:Pages with templates requiring substitution]]'
end
end
Line 107: Line 107:
colour = 'F9EAEA'
colour = 'F9EAEA'
message = "'''This " .. pageType .. " has no documentation. If you know how to use this " .. pageType .. ", please create it.'''"
message = "'''This " .. pageType .. " has no documentation. If you know how to use this " .. pageType .. ", please create it.'''"
if mw.title.new( 'Category:' .. pageType .. 's with no documentation' ).exists then
if not args.nocat then
category = '[[Category:' .. pageType .. 's with no documentation]]'
if mw.title.new( 'Category:' .. pageType .. 's with no documentation' ).exists then
else
category = '[[Category:' .. pageType .. 's with no documentation]]'
category = '[[Category:Pages with no documentation]]'
else
category = '[[Category:Pages with no documentation]]'
end
end
end
elseif badDoc then
elseif badDoc then
colour = 'F9F2EA'
colour = 'F9F2EA'
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
if mw.title.new( 'Category:' .. pageType .. 's with bad documentation' ).exists then
if not args.nocat then
category = '[[Category:' .. pageType .. 's with bad documentation]]'
if mw.title.new( 'Category:' .. pageType .. 's with bad documentation' ).exists then
else
category = '[[Category:' .. pageType .. 's with bad documentation]]'
category = '[[Category:Pages with bad documentation]]'
else
category = '[[Category:Pages with bad documentation]]'
end
end
end
end
end