Изменения

Строка 112: Строка 112:  
end
 
end
 
if #redundant_params > 0 then
 
if #redundant_params > 0 then
table.insert(categories_list, 'unknown')
+
table.insert(categories_list, {'unknown', table.concat(redundant_params)})
 
end
 
end
   Строка 135: Строка 135:  
end
 
end
 
if is_empty(lang) and not is_empty(iw_title) and iw_title:match('^[a-z][a-z]$') then
 
if is_empty(lang) and not is_empty(iw_title) and iw_title:match('^[a-z][a-z]$') then
table.insert(categories_list, 'probably_wrong')
+
table.insert(categories_list, {'probably_wrong', nil})
 
end
 
end
 
end
 
end
Строка 204: Строка 204:  
 
 
if mode == 5 and considerAsRedirect then
 
if mode == 5 and considerAsRedirect then
table.insert(categories_list, 'redirect')
+
table.insert(categories_list, {'redirect', nil})
 
elseif considerAsExists then
 
elseif considerAsExists then
table.insert(categories_list, 'outdated')
+
table.insert(categories_list, {'outdated', nil})
 
end
 
end
 
 
Строка 353: Строка 353:  
local categories_text = ''
 
local categories_text = ''
 
if allow_cat then
 
if allow_cat then
for _, code in pairs(categories_list) do
+
for _, category_data in pairs(categories_list) do
categories_text = categories_text .. '[[Category:' .. categories[code] .. ']]'
+
local category_name = categories[category_data[1]]
 +
if category_data[2] ~= nil then
 +
category_name = category_name .. '|' .. category_data[2]
 +
end
 +
categories_text = categories_text .. '[[Category:' .. category_name .. ']]'
 
end
 
end
 
end
 
end
Анонимный участник