Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(l10n): localize the German system health breadcrumb (#3538)

Thomas Steibl3e614883dccf
diff --git a/config/locales/breadcrumbs/de.yml b/config/locales/breadcrumbs/de.yml
index cef4c60e25..37485a52b5 100644
--- a/config/locales/breadcrumbs/de.yml
+++ b/config/locales/breadcrumbs/de.yml
@@ -82,6 +82,7 @@ de:
sso_identities: SSO-Verbindungen
sso_providers: SSO-Anbieter
subscriptions: Abo
+ system_health: Systemstatus
tags: Tags
trades: Trades
transactions: Transaktionen
diff --git a/config/locales/breadcrumbs/en.yml b/config/locales/breadcrumbs/en.yml
index 2703898128..06e635e164 100644
--- a/config/locales/breadcrumbs/en.yml
+++ b/config/locales/breadcrumbs/en.yml
@@ -83,6 +83,7 @@ en:
sso_identities: SSO connections
sso_providers: SSO providers
subscriptions: Subscription
+ system_health: System Health
tags: Tags
trades: Trades
transactions: Transactions
diff --git a/test/controllers/concerns/breadcrumbable_test.rb b/test/controllers/concerns/breadcrumbable_test.rb
new file mode 100644
index 0000000000..18fa6a5a07
--- /dev/null
+++ b/test/controllers/concerns/breadcrumbable_test.rb
@@ -0,0 +1,15 @@
+require "test_helper"
+
+class BreadcrumbableTest < ActiveSupport::TestCase
+ test "system health breadcrumbs use the active locale" do
+ controller = Admin::SystemHealthController.new
+ controller.set_request!(ActionDispatch::TestRequest.create)
+
+ { de: [ "Startseite", "Systemstatus" ], en: [ "Home", "System Health" ] }.each do |locale, labels|
+ I18n.with_locale(locale) do
+ assert_equal labels.last, I18n.t("breadcrumbs.system_health", fallback: false, raise: true)
+ assert_equal [ [ labels.first, "/" ], [ labels.last, nil ] ], controller.send(:breadcrumbs)
+ end
+ end
+ end
+end