# Category edit dialog: default groups sometimes not translated

**URL:** https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832
**Category:** Bug
**Created:** [December 27, 2016, 4:30pm UTC](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832 "2016-12-27T16:30:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)
#### Post date: [December 27, 2016, 4:30pm UTC](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832/1 "2016-12-27T16:30:15Z")

</div>

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):

✅ Group name _everyone_ (_jeder_) is translated in permission list.  
❌ Group names are not translated in group selection (e.g. _staff_ should be _Mitarbeiter_).

 ![](https://global.discourse-cdn.com/meta/original/3X/9/4/94d7e3a97017072c2aab13ab40432155a120c1c6.png)

### 2. Edit the created category _Test_

❌ Group name _everyone_ is not translated in permission list.  
❌ Group names are not translated in group selection, except _everyone_ (_jeder_).

 ![](https://global.discourse-cdn.com/meta/original/3X/9/4/94a063cf6bb1427d0eee5a231562ca982b4b4c82.png)

### 3. Set permissions explicitly

Same as 2.

 ![](https://global.discourse-cdn.com/meta/original/3X/8/4/840f107ebe8859379493637d448993d544cba431.png)

PS: Interestingly, the _trust\_level_ group names are translated.

---

<div class="post-metadata">

### Author: ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)
#### Post date: [December 27, 2016, 4:50pm UTC](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832/2 "2016-12-27T16:50:47Z")

</div>

Here’s what I found out:

1. The category details for the dialog comes from [`app/controllers/categories_controller.rb#show`](https://github.com/discourse/discourse/blob/2b808ad9da7739f548d4af20ec79ef92420f2661/app/controllers/categories_controller.rb#L112-L117), which gets the permissions from [`app/models/category.rb#scoped_to_permissions`](https://github.com/discourse/discourse/blob/c531f4ded5604fe0335284f12149322c16931cb7/app/models/category.rb#L126-L138)
2. Group names are translated in [`app/models/group.rb`](https://github.com/discourse/discourse/blob/c531f4ded5604fe0335284f12149322c16931cb7/app/models/group.rb#L162).
3. The _everyone_ group is [a special group](https://github.com/discourse/discourse/blob/c531f4ded5604fe0335284f12149322c16931cb7/app/models/group.rb#L168-L172).
4. The security tab in the category edit dialog comes from [`app/assets/javascripts/discourse/templates/components/edit-category-security.hbs`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/assets/javascripts/discourse/templates/components/) and the group name is inserted [here](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/assets/javascripts/discourse/templates/components/edit-category-security.hbs#L8) (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.

---

<div class="post-metadata">

### Author: ![Thamer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thamer/32/183183_2.png) [@Thamer](https://meta.discourse.org/u/Thamer)
#### Post date: [June 27, 2020, 6:57pm UTC](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832/3 "2020-06-27T18:57:23Z")

</div>

Hello, my friend,

Could you find a good solution for that?

I am also trying to translate in my page all notifications and stuff related to the “Staff” group. I could translate the name of the group, but not exactly the word “staff” in other sentences around my forum.

I hope to not lose this old thread.
