The personal finance app for everyone (by everyone)
Ruby
Use i18n for AI cache reset strings
eureka928b82757f58ee6
diff --git a/app/controllers/rules_controller.rb b/app/controllers/rules_controller.rbindex b516e44f18..07c355a562 100644--- a/app/controllers/rules_controller.rb+++ b/app/controllers/rules_controller.rb@@ -130,7 +130,7 @@ class RulesController < ApplicationControllerdef clear_ai_cacheClearAiCacheJob.perform_later(Current.family)- redirect_to rules_path, notice: "AI cache is being cleared. This may take a few moments."+ redirect_to rules_path, notice: t("rules.clear_ai_cache.success")endprivatediff --git a/app/views/rules/index.html.erb b/app/views/rules/index.html.erbindex 0b10c4557f..2b5867bd5e 100644--- a/app/views/rules/index.html.erb+++ b/app/views/rules/index.html.erb@@ -5,14 +5,14 @@<%= render DS::Menu.new do |menu| %><% menu.with_item(variant: "button",- text: "Reset AI cache",+ text: t("rules.clear_ai_cache.button"),href: clear_ai_cache_rules_path,icon: "refresh-cw",method: :post,confirm: CustomConfirm.new(- title: "Reset AI cache?",- body: "Are you sure you want to reset the AI cache? This will allow AI rules to re-process all transactions. This may incur additional API costs.",- btn_text: "Reset Cache"+ title: t("rules.clear_ai_cache.confirm_title"),+ body: t("rules.clear_ai_cache.confirm_body"),+ btn_text: t("rules.clear_ai_cache.confirm_button"))) %><% menu.with_item(variant: "button",diff --git a/config/locales/views/rules/en.yml b/config/locales/views/rules/en.ymlindex 5cbd252d53..e91fd4246d 100644--- a/config/locales/views/rules/en.yml+++ b/config/locales/views/rules/en.yml@@ -37,3 +37,9 @@ en:pending: Pendingsuccess: Successfailed: Failed+ clear_ai_cache:+ button: Reset AI cache+ confirm_title: Reset AI cache?+ confirm_body: Are you sure you want to reset the AI cache? This will allow AI rules to re-process all transactions. This may incur additional API costs.+ confirm_button: Reset Cache+ success: AI cache is being cleared. This may take a few moments.