Reformatted category list page and added category rename (#4287)

This commit is contained in:
MatteoBiscosi 2022-04-11 12:49:57 +02:00
parent 29bde8ace2
commit d8842f7d2d
9 changed files with 295 additions and 359 deletions

View file

@ -1549,19 +1549,9 @@ end
-- #################################
function getCategoryLabel(cat_name)
if isEmptyString(cat_name) then
return("")
end
local v = i18n("ndpi_categories." .. cat_name)
if v then
-- Localized string found
return(v)
end
cat_name = cat_name:gsub("^%l", string.upper)
return(cat_name)
function getCategoryLabel(cat_name, cat_id)
local categories_utils = require 'categories_utils'
return categories_utils.getCustomCategoryName(cat_id, cat_name)
end
-- ###########################################