Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
No edit summary
force NA on non-articles
Line 57:
end
 
local importance_mask = function(raw_importance, class, scale, banner_name, pagetype)
---------------------------
-- Importance mask --------
Line 73:
end
elseif raw_importance then-- standard importance scale
if pagetype=='article' then
local mask = {top = 'Top', high = 'High', mid = 'Mid', low = 'Low', na = 'NA', no = 'NA'}
if mask[raw_importance:lower()] then
importance =if mask[raw_importance:lower()] then
if importance = mask[raw_importance:lower()] then
else
importance = 'Unknown'
end
else
importance = 'UnknownNA'
end
end
Line 442 ⟶ 446:
-- Importance assessment --
---------------------------
local importance = importance_mask(raw_args.importance or raw_args.priority, class, args.IMPORTANCE_SCALE, banner_name, pagetype)
local importance_name = args.IMPN or (raw_args.priority and 'priority' or cfg.importance.default_name)
if importance then -- banner gives importance ratings
Line 537 ⟶ 541:
local tf_importance
if raw_args['tf '..k..' importance'] then
tf_importance = importance_mask(raw_args['tf '..k..' importance'], class, args.IMPORTANCE_SCALE, banner_name, pagetype)
if tf_importance=='Unknown' and yesno(args.INHERIT_IMPORTANCE) then
tf_importance = importance