The personal finance app for everyone
Clean up i18n translations (#676)
Zach Gollwitzerda5021b6b0b6
diff --git a/app/views/accounts/_account_valuation_list.html.erb b/app/views/accounts/_account_valuation_list.html.erbindex 3e0833a3..8b5cea33 100644--- a/app/views/accounts/_account_valuation_list.html.erb+++ b/app/views/accounts/_account_valuation_list.html.erb@@ -40,9 +40,9 @@<% end %><%= link_to valuation_path(valuation.original),data: { turbo_method: :delete,- turbo_confirm: { title: t("custom_turbo_confirm.history.title"),- body: t("custom_turbo_confirm.history.body_html"),- accept: t("custom_turbo_confirm.history.accept") } },+ turbo_confirm: { title: t(".confirm_title"),+ body: t(".confirm_body_html"),+ accept: t(".confirm_accept") } },class: "text-red-600 flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %><%= lucide_icon("trash-2", class: "w-5 h-5 shrink-0") %><span class="text-sm">Delete entry</span>diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erbindex f2b041df..4e648d9a 100644--- a/app/views/accounts/show.html.erb+++ b/app/views/accounts/show.html.erb@@ -26,9 +26,9 @@class: "block w-full py-2 text-red-600 hover:text-red-800 flex items-center",data: {turbo_confirm: {- title: t("custom_turbo_confirm.account_destroy.title"),- body: t("custom_turbo_confirm.account_destroy.body_html"),- accept: t("custom_turbo_confirm.account_destroy.accept", name: @account.name)+ title: t(".confirm_title"),+ body: t(".confirm_body_html"),+ accept: t(".confirm_accept", name: @account.name)}} do %><%= lucide_icon("trash-2", class: "w-5 h-5 mr-2") %> Delete accountdiff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erbindex e2a7d01f..30f5c32c 100644--- a/app/views/layouts/application.html.erb+++ b/app/views/layouts/application.html.erb@@ -38,7 +38,7 @@</main></div><%= turbo_frame_tag "modal" %>- <%= render "shared/custom_confirm_modal" %>+ <%= render "shared/confirm_modal" %><%= render "shared/upgrade_notification" %><% if self_hosted? %><div class="flex items-center py-0.5 px-0.5 gap-1 fixed bottom-2 right-2 shadow-xs border border-alpha-black-50 rounded-md bg-white">diff --git a/app/views/shared/_custom_confirm_modal.html.erb b/app/views/shared/_confirm_modal.html.erbsimilarity index 79%rename from app/views/shared/_custom_confirm_modal.html.erbrename to app/views/shared/_confirm_modal.html.erbindex 9c40e047..8eb7e86b 100644--- a/app/views/shared/_custom_confirm_modal.html.erb+++ b/app/views/shared/_confirm_modal.html.erb@@ -2,15 +2,15 @@<form method="dialog" class="p-4"><div class="flex flex-col mb-4"><div class="flex justify-between mb-2 gap-4">- <h3 id="turbo-confirm-title" class="font-medium text-md"><%= t("custom_turbo_confirm.default.title") %></h3>+ <h3 id="turbo-confirm-title" class="font-medium text-md"><%= t(".title") %></h3><button value="cancel"><%= lucide_icon("x", class: "w-5 h-5 shrink-0 text-gray-500") %></button></div><div id="turbo-confirm-body" class="text-gray-500 text-sm">- <%= t("custom_turbo_confirm.default.body_html") %>+ <%= t(".body_html") %></div></div>- <button id="turbo-confirm-accept" class="w-full text-red-600 rounded-xl text-center p-[10px] border" value="confirm"><%= t("custom_turbo_confirm.default.accept") %></button>+ <button id="turbo-confirm-accept" class="w-full text-red-600 rounded-xl text-center p-[10px] border" value="confirm"><%= t(".accept") %></button></form></dialog>diff --git a/config/locales/views/account/en.yml b/config/locales/views/account/en.ymlindex 1aaf9cf5..82caf8a8 100644--- a/config/locales/views/account/en.yml+++ b/config/locales/views/account/en.yml@@ -1,6 +1,13 @@---en:accounts:+ account_valuation_list:+ confirm_accept: Delete entry+ confirm_body_html: "<p>Deleting this entry will remove it from the account’s+ history which will impact different parts of your account. This includes the+ net worth and account graphs.</p></br><p>The only way you’ll be able to add+ this entry back is by re-entering it manually via a new entry</p>"+ confirm_title: Delete Entry?create:success: New account created successfullydestroy:@@ -16,6 +23,14 @@ en:placeholder: Example account nameselect_accountable_type: What would you like to add?title: Add an account+ show:+ confirm_accept: Delete "%{name}"+ confirm_body_html: "<p>By deleting this account, you will erase its value history,+ affecting various aspects of your overall account. This action will have a+ direct impact on your net worth calculations and the account graphs.</p><br+ /> <p>After deletion, there is no way you'll be able to restore the account+ information because you'll need to add it as a new account.</p>"+ confirm_title: Delete account?summary:new: New accountsync:diff --git a/config/locales/views/shared/en.yml b/config/locales/views/shared/en.ymlindex 191dfbc2..8ae92784 100644--- a/config/locales/views/shared/en.yml+++ b/config/locales/views/shared/en.yml@@ -1,26 +1,10 @@---en:- custom_turbo_confirm:- account_destroy:- accept: Delete "%{name}"- body_html: "<p>By deleting this account, you will erase its value history, affecting- various aspects of your overall account. This action will have a direct impact- on your net worth calculations and the account graphs.</p><br /> <p>After- deletion, there is no way you'll be able to restore the account information- because you'll need to add it as a new account.</p>"- title: Delete account?- default:+ shared:+ confirm_modal:accept: Confirmbody_html: "<p>You will not be able to undo this decision</p>"title: Are you sure?- history:- accept: Delete entry- body_html: "<p>Deleting this entry will remove it from the account’s history- which will impact different parts of your account. This includes the net worth- and account graphs.</p></br><p>The only way you’ll be able to add this entry- back is by re-entering it manually via a new entry</p>"- title: Delete Entry?- shared:notification:dismiss: Dismissupgrade_notification: