Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
why do we need to worry if category is empty, as long as it exists?
improve readability a bit
Line 336:
local new_class = class
local category_exists = function(class, new_suffix_style)
local cat = mw.title.new(cfg.quality.assessment_category:format(
class,
category .. ' ' .. (new_suffix_style and 'pages' or 'articles')))
))
return cat.exists -- check if category exists
end
Line 358 ⟶ 361:
return new_class
end
 
local class = raw_args.class
if class then -- banner gives quality ratings
Line 422 ⟶ 424:
show = true
end
local category = (class=='' and 'Unassessed' or class..'-Class') .. ' ' .. assessment_cat -- .. ' ' .. (article and 'articles' or 'pages')
-- use "pages" for non-articles if the category exists: temporary transition code
if fallback_suffix then