mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Use i18n for AI cache reset strings
Extract hardcoded strings to locale file for proper internationalization.
This commit is contained in:
@@ -130,7 +130,7 @@ class RulesController < ApplicationController
|
||||
|
||||
def clear_ai_cache
|
||||
ClearAiCacheJob.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")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -37,3 +37,9 @@ en:
|
||||
pending: Pending
|
||||
success: Success
|
||||
failed: 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.
|
||||
|
||||
Reference in New Issue
Block a user