discourse/spec/system
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
..
composer FEATURE: create new topic while viewing restricted category or tag (#33495) 2025-07-28 09:09:10 +04:00
emojis DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
groups FIX: Updating a group without e-mail domains (#31896) 2025-03-19 10:38:41 +08:00
helpers
page_objects FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
topic_list DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_page DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
about_page_spec.rb DEV: Have about page extra groups depend on groups selected (#33095) 2025-06-06 11:25:59 +08:00
admin_about_config_area_spec.rb DEV: skips a spec failing very often (#33854) 2025-07-25 12:10:25 +02:00
admin_api_keys_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_backups_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_badges_grouping_modal_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_badges_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_color_palette_config_area_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
admin_color_palettes_config_area_spec.rb FEATURE: Add color palette list selection to new UI (#32379) 2025-05-05 05:12:50 +03:00
admin_color_palettes_features_spec.rb FEATURE: redesigned admin color palette index layout (#33628) 2025-07-22 11:52:39 -04:00
admin_config_theme_site_settings_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
admin_customize_components_config_area_spec.rb UX: Update some delete confirmation dialogs (#33018) 2025-06-02 09:14:58 -04:00
admin_customize_emojis_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_customize_form_templates_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
admin_customize_themes_config_area_spec.rb DEV: enable Foundation and stop Default (#33610) 2025-07-15 11:16:11 +08:00
admin_customize_themes_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
admin_dashboard_community_health_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_dashboard_new_features_spec.rb FIX: remove admin_sidebar_enabled_groups setting (#31693) 2025-03-11 11:41:38 +11:00
admin_editing_objects_typed_theme_setting_spec.rb FEATURE: porting type object to site settings (#32706) 2025-05-13 14:30:24 -03:00
admin_email_login_readonly_spec.rb FIX: improve "read only" modes (#33521) 2025-07-10 09:08:00 +02:00
admin_embeddable_hosts_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_filter_controls_spec.rb FEATURE: Add reusable AdminFilterControls component, apply to plugins and reports (#33706) 2025-07-24 16:55:33 -04:00
admin_flags_spec.rb DEV: Fix broken test (#33403) 2025-07-01 12:56:19 +08:00
admin_fonts_spec.rb UX: split admin logo and fonts to separate pages (#32700) 2025-05-14 14:02:34 +08:00
admin_logo_spec.rb UX: split admin logo and fonts to separate pages (#32700) 2025-05-14 14:02:34 +08:00
admin_notices_spec.rb FIX: Only render admin notice dismiss button for admins (#29103) 2024-10-07 13:14:01 +08:00
admin_permalinks_page_spec.rb UX: Conditionally render permalinks filter (#30633) 2025-01-08 06:18:01 -06:00
admin_reports_spec.rb FEATURE: Show legacy pageview report for sites using legacy pageviews (#33620) 2025-07-17 10:46:22 +08:00
admin_search_spec.rb FIX: Broken links to site settings under Content section (#33597) 2025-07-14 16:14:50 +08:00
admin_sidebar_navigation_spec.rb FIX: bring back sidebar filter (#32837) 2025-05-22 13:44:25 +08:00
admin_site_setting_bulk_action_spec.rb FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin_site_setting_category_bulk_action_spec.rb FEATURE: Theme-owned color palettes (#32795) 2025-06-04 07:47:58 +03:00
admin_site_setting_label_formatting_spec.rb UX: Add Sentence Casing for Setting Names (#30479) 2024-12-31 09:55:53 +11:00
admin_site_setting_locale_spec.rb FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
admin_site_setting_requires_confirmation_spec.rb DEV: Fix admin confirmation flaky spec (#29456) 2024-10-30 04:59:51 +10:00
admin_site_setting_search_spec.rb FEATURE: Introduce site settings which require confirmation (#27315) 2024-06-19 16:01:24 +10:00
admin_site_texts_spec.rb FIX: correctly display category name in replace text modal (#29612) 2024-11-06 13:39:52 +11:00
admin_staff_action_logs_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_user_badges_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_user_fields_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_user_spec.rb FIX: JS error when silencing and unsilencing the user (#33851) 2025-07-25 14:33:07 +08:00
admin_users_list_spec.rb UX: update groups route on admin users page (#33738) 2025-07-21 14:17:16 -04:00
admin_watched_words_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
admin_web_hook_events_spec.rb FEATURE: Add Filter for Webhook Events by Status (#27332) 2024-06-07 10:26:00 -05:00
admin_webhooks_spec.rb Admin webhooks UI guidelines (#30764) 2025-01-16 10:22:18 +08:00
anon_language_switcher_spec.rb FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
bookmarks_spec.rb FEATURE: Clear bookmark reminders from bookmark menu (#33168) 2025-06-13 10:37:08 +10:00
bootstrap_error_pages_spec.rb FIX: Improve handling of 'PublicExceptions' when bootstrap_error_pages enabled (#26700) 2024-04-24 09:40:13 +01:00
capabilities_service_spec.rb DEV: Introduce reactive JS API for viewport size (#32060) 2025-04-30 15:26:59 +01:00
category_topics_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
change_owner_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
composer_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
composer_uploads_spec.rb FIX: ensures auto grid works in german (#33831) 2025-07-24 20:15:08 +02:00
content_localization_spec.rb FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
content_security_policy_spec.rb FIX: invalid CSP directive sources should allow site to boot with valid CSP directives (#31256) 2025-02-10 20:38:36 +08:00
core_features_spec.rb DEV: Add more granularity to the core features specs shared example 2025-04-01 14:54:11 +02:00
create_invite_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
csv_exports_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
custom_sidebar_sections_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
dev_tools_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
discourse_id_spec.rb DEV: Add validator for enable_discourse_id setting (#33710) 2025-07-21 08:18:36 -04:00
discovery_breadcrumb_navigation_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
discovery_category_spec.rb DEV: Add system spec for categories page (#29621) 2024-11-06 20:01:27 +02:00
discovery_h1_accessibility_spec.rb A11Y: Update accessible headings for more flexible translations (#32863) 2025-05-23 09:15:44 -04:00
discovery_list_spec.rb FIX: Ensure discovery queryParams do not persist invisibly (#32178) 2025-04-11 09:44:32 +01:00
dismissing_new_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
drafts_dropdown_spec.rb FEATURE: create new topic while viewing restricted category or tag (#33495) 2025-07-28 09:09:10 +04:00
edit_category_form_templates_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
edit_category_images_spec.rb FIX: UppyUploader issues when authorized_extensions setting is blank but authorized_extensions_for_staff is not (#33423) 2025-07-01 18:39:47 -05:00
edit_category_localizations_spec.rb DEV: Supplement updateCategory API doc to include localizations (#33601) 2025-07-15 22:03:33 +08:00
edit_category_security_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
editing_sidebar_categories_navigation_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
editing_sidebar_community_section_spec.rb FIX: Sidebar messages link updates (#33444) 2025-07-07 11:55:39 +08:00
editing_sidebar_tags_navigation_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
email_change_spec.rb DEV: Remove full_page_login setting (#32189) 2025-04-29 10:40:40 +02:00
ember_deprecation_spec.rb DEV: Improve deprecation warning banner (#33648) 2025-07-16 13:24:23 +01:00
filtering_topics_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
flagging_post_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
forgot_password_spec.rb DEV: Introduce with_security_key system test helper (#32459) 2025-04-25 15:40:07 +08:00
grant_badge_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
group_activity_spec.rb DEV: Update rubocop-discourse to latest version 2024-03-04 15:08:35 +01:00
group_card_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
hashtag_autocomplete_spec.rb FEATURE: add icons and emojis to category (#31795) 2025-03-26 09:46:17 +04:00
header_search_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
header_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
homepage_spec.rb DEV: Fix flaky system test (#31822) 2025-03-14 16:10:48 +08:00
interface_color_selector_spec.rb FEATURE: Dark/light mode selector (#31086) 2025-02-07 03:28:34 +03:00
keyboard_shortcuts_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
locale_spec.rb FIX: Moment locale loading in type=module (#33128) 2025-06-09 14:20:04 +01:00
login_spec.rb DEV: signup/login spec cleanup (#32867) 2025-05-23 09:17:37 -04:00
mobile_mode_spec.rb DEV: Introduce experimental viewport-based mobile mode (#32859) 2025-05-23 13:01:04 +01:00
navigation_menu_state_integration_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
network_disconnected_spec.rb DEV: Skip flaky topic map spec on CI (#28159) 2024-07-31 13:04:05 +10:00
new_category_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
new_topic_list_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
pm_user_removal_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
post_menu_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
post_replies_spec.rb SECURITY: add pagination to post replies 2024-10-07 11:48:48 +08:00
post_selection_copy_quote_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
post_selection_fast_edit_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
post_small_action_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
post_stream_spec.rb DEV: Introduce state handling for post cooked HTML decorators (#33200) 2025-06-23 18:13:49 -03:00
post_translation_spec.rb FEATURE: Localize language names (#33790) 2025-07-29 11:48:45 +08:00
posts_page_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
powered_by_discourse_spec.rb FEATURE: optionally show "Powered by Discourse" link to discourse.org (#26162) 2024-03-14 10:30:12 -04:00
private_message_spec.rb FIX: ensures we have changed page first (#32802) 2025-05-19 17:44:56 +02:00
request_tracker_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
reviewables_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
s3_secure_uploads_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
s3_uploads_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
scroll_manager_service_spec.rb DEV: adds logo page component (#28276) 2024-08-08 13:52:48 +02:00
search_shortcut_variation_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
search_spec.rb FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
signup_spec.rb FIX: Show tip for required selectable field on signup when not selected (#33401) 2025-07-02 09:54:23 +08:00
social_authentication_spec.rb FIX: Unblock social signup when name is required and `auth overrides… (#32923) 2025-05-27 08:26:38 -04:00
staff_writes_only_mode_spec.rb FIX: improve "read only" modes (#33521) 2025-07-10 09:08:00 +02:00
table_builder_spec.rb DEV: updates playwright to 1.54 (#33715) 2025-07-24 10:07:31 +02:00
tag_edit_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
tag_notification_level_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
tag_synonyms_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
tag_view_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
tags_intersection_spec.rb FIX: Transitioning to tag-intersection route (#23931) 2023-10-13 16:23:04 +01:00
theme_qunit_spec.rb DEV: Stop building test assets in production under Embroider (#23388) 2023-09-11 09:12:37 +01:00
topic_admin_menu_spec.rb FIX: shows errors when converting to public is impossible (#27103) 2024-05-21 12:14:31 +02:00
topic_bulk_select_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
topic_list_focus_spec.rb DEV: Remove flaky spec (#24795) 2023-12-08 11:43:17 -05:00
topic_page_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
topics_unread_when_closed_spec.rb FEATURE: Silence Close Notifications User Setting (#26072) 2024-03-08 15:14:46 -07:00
user_activation_spec.rb UX: Add progress bar to the registration flow (#27694) 2024-08-28 08:43:39 -03:00
user_activity_bookmarks_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_activity_posts_spec.rb DEV: replace selenium driver with playwright (#31977) 2025-05-06 10:44:14 +02:00
user_invites_spec.rb FIX: Don't show that an existing user is invited_by another user (#27665) 2024-07-04 10:27:37 +08:00
user_selector_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_tips_spec.rb FIX: Show the last rendered user-tip (#29346) 2024-10-22 22:41:29 +02:00
viewing_category_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
viewing_group_members_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
viewing_navigation_menu_preferences_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
viewing_reviewable_spec.rb DEV: Fix topic link component for reviewabled flagged post in new UI (#33518) 2025-07-09 09:11:25 +08:00
viewing_sidebar_as_anonymous_user_spec.rb
viewing_sidebar_mobile_spec.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
viewing_sidebar_spec.rb FEAUTRE: Hide messages count in sidebar with feature flag (#33774) 2025-07-23 11:14:13 +10:00
viewing_user_menu_spec.rb FEATURE: add new hidden site setting to show full names in user card 2025-01-23 12:26:59 -05:00
viewing_user_private_messages_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
welcome_banner_spec.rb UX: add welcome banner location site setting to admin interface (#33438) 2025-07-17 13:34:22 +08:00
wizard_spec.rb DEV: Remove branding and styling steps from wizard (#32797) 2025-05-21 09:46:49 +08:00