discourse/app/assets/javascripts/admin/addon/routes
Natalie Tay 235c673fe8
FEATURE: Localize language names (#33790)
This PR adds localized language names to settings. The language names
are localized in the frontend, not the backend, due to setting
initialization complexity.

This change affects these areas:
- `SiteSetting.available_locales` 
- this "setting" is a lookup table to get language names. use
`languageNameLookup` service to get the name for a locale
- it returns an object that looks like the following, then gets
re-hydrated with client localized values when initializing the
`siteSettingService` in the frontend.
  ```
  [
{"native_name":"اللغة العربية","value":"ar","name":"languages.ar.name"},
    ...
  ]  
  ```

- `SiteSetting.default_locale` 
- this is a single-value `enum` setting that has always been hardcoded.
This caused quite an issue as it is not initialized the same way as
other site settings in the yml file. It has always relied on reading
directly from a `names.yml` file to load native language names, thus
bypassing the need for I18n to be initialized from the backend. A new
locale_enum type has been introduced for this setting, and any future
settings.
  
- `SiteSetting.content_localization_supported_locales` - this is a
`enum_list` setting,
  - enum_list is introduced, leveraging both `list` and `enum`
  
- theme translations

- site texts

- Wizard's default_locale choices 
- it was set up from the backend using `LocaleSiteSetting.value`. This
proved problematic, as a Japanese user would be getting the locales in
English because the values are initialized using English even without
memoization
- therefore we're now initializing the choices in the frontend using
`available_locales` as defined above
  
- content localization meta data
- post language in the composer, localization composer, post history
modal, post language tooltip, language switcher



/t/151409
2025-07-29 11:48:45 +08:00
..
admin-badges FIX: Badge not showing as disabled when it is (#32591) 2025-05-06 14:15:25 +08:00
admin-analytics.js DEV: Add Analytics and SEO admin config page (#32190) 2025-04-07 16:15:37 +08:00
admin-api-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-api-keys-index.js DEV: Move User API admin settings into API keys page (#32232) 2025-04-10 10:40:25 +08:00
admin-api-keys-new.js DEV: Convert admin API keys to conform to UI guidelines (#30660) 2025-01-09 10:57:40 +08:00
admin-api-keys-settings.js DEV: Move User API admin settings into API keys page (#32232) 2025-04-10 10:40:25 +08:00
admin-api-keys-show.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-backups-index.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
admin-backups-logs.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-backups-settings.js FEATURE: settings tab for permalinks (#30192) 2024-12-19 10:40:34 +11:00
admin-backups.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
admin-badges.js DEV: Add Settings tab to admin Badges page (#32251) 2025-04-21 09:41:29 +08:00
admin-config-about.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-color-palettes-show.js FEATURE: Add color palette list selection to new UI (#32379) 2025-05-05 05:12:50 +03:00
admin-config-color-palettes.js UX: Various improvements to the new color palette page (#32597) 2025-05-07 17:53:50 +03:00
admin-config-content-categories-and-tags.js DEV: Add Content admin config page (#32194) 2025-04-10 11:20:22 +08:00
admin-config-content-posts-and-topics.js DEV: Add Content admin config page (#32194) 2025-04-10 11:20:22 +08:00
admin-config-content-settings.js FIX: Broken links to site settings under Content section (#33597) 2025-07-14 16:14:50 +08:00
admin-config-content-sharing.js DEV: Add Content admin config page (#32194) 2025-04-10 11:20:22 +08:00
admin-config-content-stats-and-thresholds.js DEV: Add Content admin config page (#32194) 2025-04-10 11:20:22 +08:00
admin-config-customize-components.js FEATURE: Introduce new components listing page (#32164) 2025-04-08 17:58:29 +03:00
admin-config-customize-index.js UX: Tweaks to the theme/component pages when using admin sidebar (#30953) 2025-03-13 15:34:17 +03:00
admin-config-customize-themes.js FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin-config-customize.js FIX: Themes and components page title (#32856) 2025-05-22 16:27:34 +08:00
admin-config-developer.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-experimental.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-files.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-flags-edit.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-config-flags-index.js UX: Fix flags config page translations (#31476) 2025-02-24 16:29:53 +10:00
admin-config-flags-settings.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-fonts.js UX: split admin logo and fonts to separate pages (#32700) 2025-05-14 14:02:34 +08:00
admin-config-group-permissions.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-interface-settings.js DEV: Add Interface and layout admin config page (#32197) 2025-04-08 09:22:10 +08:00
admin-config-legal.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-localization.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-login-and-authentication.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-logo.js UX: split admin logo and fonts to separate pages (#32700) 2025-05-14 14:02:34 +08:00
admin-config-navigation.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-notifications.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-onebox.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-rate-limits.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-search.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-security.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-site-admin-settings.js DEV: Add Site admin admin config page (#32196) 2025-04-08 09:52:42 +08:00
admin-config-spam.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-theme-site-settings.js FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
admin-config-trust-levels.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-user-api.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-config-user-defaults-settings.js DEV: Add User defaults admin config page (#32195) 2025-04-08 09:21:54 +08:00
admin-config-with-settings-route.js DEV: Preserve unsaved site settings (#32100) 2025-04-03 16:10:30 +08:00
admin-customize-colors-show.js FEATURE: redesigned admin color palette index layout (#33628) 2025-07-22 11:52:39 -04:00
admin-customize-colors.js FEATURE: redesigned admin color palette index layout (#33628) 2025-07-22 11:52:39 -04:00
admin-customize-email-style-edit.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-customize-email-style-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-customize-email-style.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-customize-form-templates-edit.js DEV: Remove unnecessary setupController methods (#29592) 2024-11-05 13:17:32 +01:00
admin-customize-form-templates-index.js DEV: Remove unnecessary setupController methods (#29592) 2024-11-05 13:17:32 +01:00
admin-customize-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-customize-robots-txt.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-customize-themes-edit.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-customize-themes-index.js DEV: remove old themes/components code (#32875) 2025-05-26 09:21:15 +08:00
admin-customize-themes-show-colors.js FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin-customize-themes-show-index.js FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin-customize-themes-show-schema.js DEV: Use async/await in admin route model fns (#27745) 2024-07-05 22:25:42 +02:00
admin-customize-themes-show.js FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin-customize-themes.js DEV: remove old themes/components code (#32875) 2025-05-26 09:21:15 +08:00
admin-dashboard-general.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-dashboard-reports.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-dashboard.js DEV: duplicate scroll-top util function to lib and replace current usage with new path (#32367) 2025-04-21 08:12:51 +08:00
admin-email-incomings.js DEV: Remove unnecessary setupController methods (#29592) 2024-11-05 13:17:32 +01:00
admin-email-logs-bounced.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-logs-received.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-logs-rejected.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-logs-sent.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-logs-skipped.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-logs.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
admin-email-preview-digest.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-email-server-settings.js DEV: Add e-mail site settings to e-mail admin page (#32214) 2025-04-08 18:59:50 +08:00
admin-email-settings.js DEV: Add e-mail site settings to e-mail admin page (#32214) 2025-04-08 18:59:50 +08:00
admin-email-templates-edit.js DEV: duplicate scroll-top util function to lib and replace current usage with new path (#32367) 2025-04-21 08:12:51 +08:00
admin-email-templates.js UX: Use DPageHeader on the Emails page (#30781) 2025-01-15 15:36:16 +11:00
admin-email.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-embedding-edit.js UX: admins embedding page follows admin ux guideline (#30122) 2025-01-06 13:01:08 +11:00
admin-embedding-new.js UX: admins embedding page follows admin ux guideline (#30122) 2025-01-06 13:01:08 +11:00
admin-embedding.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-emojis-settings.js FEATURE: settings tab for permalinks (#30192) 2024-12-19 10:40:34 +11:00
admin-emojis.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-flags-posts-active.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-flags-posts-old.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-flags-topics-index.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-groups-index.js DEV: Add dedicated admin groups page (#32377) 2025-04-22 11:23:25 +08:00
admin-groups-settings.js DEV: Add dedicated admin groups page (#32377) 2025-04-22 11:23:25 +08:00
admin-groups.js DEV: Add dedicated admin groups page (#32377) 2025-04-22 11:23:25 +08:00
admin-logs-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-logs-screened-emails.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-logs-screened-ip-addresses.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-logs-screened-urls.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-logs-staff-action-logs.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-logs.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-permalinks-edit.js UX: redesign admin permalinks page (#29634) 2024-11-14 10:03:58 +11:00
admin-permalinks-index.js FIX: Make permalink search work even when there're 100+ permalinks (#31354) 2025-02-16 00:19:16 +03:00
admin-permalinks.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-plugins-index.js UX: Change admin plugins list to follow UI guidelines (#28478) 2024-08-30 14:53:36 +10:00
admin-plugins-show-index.js DEV: Clean up imports (#28060) 2024-07-25 15:09:06 +02:00
admin-plugins-show-settings.js FEATURE: Initial version of experimental admin search (#31299) 2025-02-21 11:59:24 +10:00
admin-plugins-show.js FEATURE: Convert chat plugin UI to new show plugin and admin UI guidelines (#28632) 2024-09-10 15:16:16 +10:00
admin-plugins.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-reports-dashboard-settings.js DEV: Add Dashboard settings tab to Reports page (#32235) 2025-04-10 10:41:12 +08:00
admin-reports-show.js FEATURE: Show legacy pageview report for sites using legacy pageviews (#33620) 2025-07-17 10:46:22 +08:00
admin-reports.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-route-map.js FEATURE: redesigned admin color palette index layout (#33628) 2025-07-22 11:52:39 -04:00
admin-schema.js FEATURE: porting type object to site settings (#32706) 2025-05-13 14:30:24 -03:00
admin-search-index.js FEATURE: Experimental admin search refinements round 1 (#31441) 2025-03-03 13:56:07 +10:00
admin-search-logs-index.js DEV: Use async/await in admin route model fns (#27745) 2024-07-05 22:25:42 +02:00
admin-search-logs-term.js DEV: Use async/await in admin route model fns (#27745) 2024-07-05 22:25:42 +02:00
admin-site-settings-category.js UX: show My messages count in sidebar (#33539) 2025-07-23 02:48:00 +08:00
admin-site-settings-index.js DEV: Change admin site settings filter to be route based (#33167) 2025-06-16 11:20:38 +08:00
admin-site-settings.js DEV: Change admin site settings filter to be route based (#33167) 2025-06-16 11:20:38 +08:00
admin-site-text-edit.js FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
admin-site-text-index.js FEATURE: Allow showing site text search in selected locale (#28453) 2024-08-26 11:25:36 +10:00
admin-site-text.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-user-badges.js DEV: Remove unnecessary setupController methods (#29592) 2024-11-05 13:17:32 +01:00
admin-user-fields-edit.js DEV: Modernize admin user fields (#29843) 2024-11-25 11:54:43 +08:00
admin-user-fields-new.js DEV: Modernize admin user fields (#29843) 2024-11-25 11:54:43 +08:00
admin-user-fields.js DEV: Modernize admin user fields (#29843) 2024-11-25 11:54:43 +08:00
admin-user-index.js FIX: Don't load all groups when rendering <GroupChooser /> (#31271) 2025-02-11 21:32:02 +03:00
admin-user-tl3-requirements.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-user.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-users-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-users-list-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-users-list-show.js FEATURE: Add bulk destroy to admin users list (#29744) 2024-11-25 11:13:35 +03:00
admin-users-list.js FIX: Clicking send invites and export button on admin users page (#33121) 2025-06-10 08:44:43 +08:00
admin-users-settings.js DEV: Add Settings tab to admin Users page (#32255) 2025-04-11 11:10:53 +08:00
admin-users.js FIX: Clicking send invites and export button on admin users page (#33121) 2025-06-10 08:44:43 +08:00
admin-watched-words-action.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin-watched-words-index.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-watched-words.js UX: Add missing admin config page titles (#32198) 2025-04-08 10:02:11 +08:00
admin-web-hooks-edit.js Admin webhooks UI guidelines (#30764) 2025-01-16 10:22:18 +08:00
admin-web-hooks-index.js Admin webhooks UI guidelines (#30764) 2025-01-16 10:22:18 +08:00
admin-web-hooks-new.js Admin webhooks UI guidelines (#30764) 2025-01-16 10:22:18 +08:00
admin-web-hooks-show.js DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
admin-web-hooks.js Admin webhooks UI guidelines (#30764) 2025-01-16 10:22:18 +08:00
admin-whats-new.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
admin.js FEATURE: Release admin search for all sites (#32327) 2025-04-16 16:26:53 +10:00