The personal finance app for everyone (by everyone)
Ruby
fix(i18n): localize German system health navigation (#3477)
Thomas Steiblaf1f0602150c
diff --git a/config/locales/views/settings/de.yml b/config/locales/views/settings/de.ymlindex bbfa2afd7d..dafaa7cee7 100644--- a/config/locales/views/settings/de.yml+++ b/config/locales/views/settings/de.yml@@ -217,6 +217,7 @@ de:sso_providers_label: SSO-Anbieterstatement_vault_label: Auszugsarchivusers_label: Benutzer+ system_health_label: Systemstatussettings_nav_link_large:next: Weiterprevious: Zurückdiff --git a/test/controllers/settings/system_health_navigation_localization_test.rb b/test/controllers/settings/system_health_navigation_localization_test.rbnew file mode 100644index 0000000000..2c5a4cf799--- /dev/null+++ b/test/controllers/settings/system_health_navigation_localization_test.rb@@ -0,0 +1,36 @@+require "test_helper"++class Settings::SystemHealthNavigationLocalizationTest < ActionDispatch::IntegrationTest+ setup do+ ensure_tailwind_build+ end++ test "German system health navigation has a translation without fallback" do+ assert_equal "Systemstatus", I18n.t("settings.settings_nav.system_health_label", locale: :de, fallback: false, raise: true)+ end++ test "super admins see localized system health links in both navigation layouts" do+ user = users(:sure_support_staff)+ sign_in user++ { "de" => "Systemstatus", "en" => "System health" }.each do |locale, label|+ user.update!(locale: locale)+ get settings_preferences_url++ assert_response :success+ assert_select "nav a[href='#{admin_system_health_path}']", text: label, count: 2+ end+ end++ test "German system health navigation remains hidden from other roles" do+ %i[family_admin family_member].each do |fixture|+ user = users(fixture)+ user.update!(locale: "de")+ sign_in user+ get settings_preferences_url++ assert_response :success+ assert_select "nav a[href='#{admin_system_health_path}']", count: 0+ end+ end+end