Content deleted Content added
fixes |
add pages/articles to assessment_cat |
||
Line 196:
table.sort(task_forces, function (x, y) return tonumber(x) < tonumber(y) end)
table.sort(notes, function (x, y) return tonumber(x) < tonumber(y) end)
local assessment_category = function(cat, name) -- remove "articles" from category, and append "articles" or "pages" depending on page type
local out
if cat then
else
end
return out .. ' ' .. (article and 'articles' or 'pages')
end
local assessment_cat = assessment_category(args.ASSESSMENT_CAT, project)
Line 339 ⟶ 341:
local new_class = class
local category_exists = function(class)
local cat = mw.title.new(cfg.quality.assessment_category:format(class, category
return cat.exists and #cat:getContent()>0 -- check if category exists and is not blank
end
Line 409 ⟶ 411:
end
class = check_fallbacks(class, assessment_cat)
local category = (class=='' and 'Unassessed' or class..'-Class') .. ' ' .. assessment_cat
if show then -- quality rating shown in banner
local rating
Line 459 ⟶ 461:
local importance_name = args.IMPN or (raw_args.priority and 'priority' or cfg.importance.default_name)
if importance then -- banner gives importance ratings
local category = importance .. '-' .. importance_name .. ' ' .. assessment_cat
if importance~='NA' then -- display importance rating
local rating = importance=='Unknown' and cfg.importance.not_yet or cfg.importance.rated:format(importance, importance_name)
Line 574 ⟶ 576:
and ' ' .. cfg.task_force.importance:format(
wikilink(
':Category:' .. tf_importance .. '-' .. importance_name .. ' ' .. tf_assessment_cat
tf_importance .. '-' .. importance_name
)
Line 604 ⟶ 606:
if yesno(args[tf_prefix..'QUALITY']) and class then
local tf_class = check_fallbacks(class, tf_assessment_cat)
add_category((tf_class=='' and 'Unassessed' or tf_class..'-Class') .. ' ' .. tf_assessment_cat
end
if tf_importance then
add_category(tf_importance .. '-' .. importance_name .. ' ' .. tf_assessment_cat
end
if args[tf_prefix..'QII_FORMAT'] then
|