Category edit dialog: default groups sometimes not translated

When creating or editing a category, the default group names (everyone, admins, moderators, staff) should be translated. However, sometimes this is not the case:

1. Create a new category Test (without changing any permission):

:white_check_mark: Group name everyone (jeder) is translated in permission list.
:x: Group names are not translated in group selection (e.g. staff should be Mitarbeiter).

2. Edit the created category Test

:x: Group name everyone is not translated in permission list.
:x: Group names are not translated in group selection, except everyone (jeder).

3. Set permissions explicitly

Same as 2.

PS: Interestingly, the trust_level group names are translated.

2 Me gusta

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 Me gusta

Hola, amigo,

¿Podrías encontrar una buena solución para eso?

También estoy intentando traducir en mi página todas las notificaciones y todo lo relacionado con el grupo “Staff”. Podría traducir el nombre del grupo, pero no exactamente la palabra “staff” en otras frases alrededor de mi foro.

Espero no perder este antiguo hilo.