Module:Documentation: Difference between revisions

Jump to navigation Jump to search
m>Mr. Stradivarius
add comments to p.addTrackingCategories and reduce line length a little
m>Mr. Stradivarius
convert makeCategoriesBlurb comment
Line 837: Line 837:


function p.makeCategoriesBlurb(args, env)
function p.makeCategoriesBlurb(args, env)
-- Get the title object.
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
local docTitle = env.docTitle
if not docTitle then
if not docTitle then
return nil
return nil
end
end
-- Make the blurb.
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
return message('add-categories-blurb', {docPathLink})