main ← fix/use-localized-auto-group-names
opened 11:21AM - 12 Feb 26 UTC
Automatic group names (everyone, staff, admins, etc.) are translated based on th…e site's default locale. However, the `AUTO_GROUPS` JS constant had hardcoded English names which were used directly in several places — most notably during category creation. This caused the "everyone" group to always display its English name in the permissions table, even on sites with a different default locale.
This removes the `name` and `display_name` fields from `AUTO_GROUPS`, keeping only `id` and `automatic`. A new `groupsById` getter on the `Site` model provides a lookup map built from server-provided group data (which contains the properly localized names). All consumers now resolve group names via `site.groupsById[groupId].name` instead of reading from the constant.
The avatar-flair system is also refactored from name-based to ID-based lookups, and group identity checks in `user.js` now compare by `id` rather than `name`.
https://meta.discourse.org/t/395225