Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(i18n): localize recurring allocation feedback (#3380)

Thomas Steiblbdc03be23a1c
diff --git a/config/locales/views/recurring_allocations/de.yml b/config/locales/views/recurring_allocations/de.yml
new file mode 100644
index 0000000000..3ea2ee77f4
--- /dev/null
+++ b/config/locales/views/recurring_allocations/de.yml
@@ -0,0 +1,15 @@
+---
+de:
+ recurring_allocations:
+ over_allocation: Damit würdest du mehr als den Transaktionsbetrag zuordnen.
+ missing_rate: Kein Wechselkurs verfügbar. Gib den Betrag manuell ein.
+ already_allocated: Diese Transaktion ist dieser Rechnung bereits zugeordnet
+ invalid: Die Zahlung konnte nicht erfasst werden
+ create:
+ success: Zahlung zugeordnet
+ destroy:
+ success: Zahlungszuordnung entfernt
+ confirm:
+ success: Zahlung der Rechnung zugeordnet
+ reject:
+ success: Vorschlag abgelehnt. Diese Transaktion wird für diese Rechnung nicht mehr vorgeschlagen.
diff --git a/test/controllers/recurring_allocations_controller_test.rb b/test/controllers/recurring_allocations_controller_test.rb
index bdf7231574..b548f65f13 100644
--- a/test/controllers/recurring_allocations_controller_test.rb
+++ b/test/controllers/recurring_allocations_controller_test.rb
@@ -88,4 +88,21 @@ class RecurringAllocationsControllerTest < ActionDispatch::IntegrationTest
assert_equal 0, @occurrence.reload.allocations.count,
"a nil-cast date would have silently defaulted the payment to today"
end
+
+ test "allocation feedback is available in German" do
+ expected_translations = {
+ "recurring_allocations.over_allocation" => "Damit würdest du mehr als den Transaktionsbetrag zuordnen.",
+ "recurring_allocations.missing_rate" => "Kein Wechselkurs verfügbar. Gib den Betrag manuell ein.",
+ "recurring_allocations.already_allocated" => "Diese Transaktion ist dieser Rechnung bereits zugeordnet",
+ "recurring_allocations.invalid" => "Die Zahlung konnte nicht erfasst werden",
+ "recurring_allocations.create.success" => "Zahlung zugeordnet",
+ "recurring_allocations.destroy.success" => "Zahlungszuordnung entfernt",
+ "recurring_allocations.confirm.success" => "Zahlung der Rechnung zugeordnet",
+ "recurring_allocations.reject.success" => "Vorschlag abgelehnt. Diese Transaktion wird für diese Rechnung nicht mehr vorgeschlagen."
+ }
+
+ expected_translations.each do |key, translation|
+ assert_equal translation, I18n.t(key, locale: :de, fallback: false)
+ end
+ end
end