From baace1fa5df46694ddd515dc3bbca59b22df8692 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 25 Jul 2026 03:51:44 +0200 Subject: Extract flashes to i18n and stop dispatching on submit labels --- test/controllers/page_translations_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/controllers/page_translations_controller_test.rb') diff --git a/test/controllers/page_translations_controller_test.rb b/test/controllers/page_translations_controller_test.rb index feaacd0e..7484a203 100644 --- a/test/controllers/page_translations_controller_test.rb +++ b/test/controllers/page_translations_controller_test.rb @@ -55,7 +55,7 @@ class PageTranslationsControllerTest < ActionController::TestCase delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } - assert_equal "Can't remove the only remaining translation.", flash[:error] + assert_equal I18n.t("flash.page_translations.last_translation"), flash[:error] end test "destroy is a safe no-op, not a false success, when the translation doesn't exist" do @@ -64,7 +64,7 @@ class PageTranslationsControllerTest < ActionController::TestCase delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } - assert_match(/No EN translation exists/, flash[:error]) + assert_equal I18n.t("flash.page_translations.none_to_remove", :lang => "EN"), flash[:error] end test "autosave writes the translation without creating a new revision or touching the draft" do -- cgit v1.3