# 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:** [2016 年 12 月 27 日午後 4:30 UTC](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832 "2016-12-27T16:30:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [2016 年 12 月 27 日午後 4:50 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.

---

_[View the full topic](https://meta.discourse.org/t/category-edit-dialog-default-groups-sometimes-not-translated/54832)._
