Category edit dialog: default groups sometimes not translated

Here’s what I found out:

  1. The category details for the dialog comes from app/controllers/categories_controller.rb#show, which gets the permissions from app/models/category.rb#scoped_to_permissions
  2. Group names are translated in app/models/group.rb.
  3. The everyone group is a special group.
  4. The security tab in the category edit dialog comes from app/assets/javascripts/discourse/templates/components/edit-category-security.hbs and the group name is inserted here (as it comes from the controller/ajax request).

Maybe the best solution would be to have the CategoriesController return permission with two keys group_name and group_name_localized? We would probably need to make sure that group_name_localized is equal to the group_name for custom/user-created groups.

2 « J'aime »