1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 04:55:20 +02:00

Clean up i18n translations (#676)

* Clean up i18n translations

* Normalize translations
This commit is contained in:
Zach Gollwitzer 2024-04-25 14:41:12 -04:00 committed by GitHub
parent be21d2b4fd
commit da5021b6b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 27 additions and 28 deletions

View file

@ -40,9 +40,9 @@
<% end %> <% end %>
<%= link_to valuation_path(valuation.original), <%= link_to valuation_path(valuation.original),
data: { turbo_method: :delete, data: { turbo_method: :delete,
turbo_confirm: { title: t("custom_turbo_confirm.history.title"), turbo_confirm: { title: t(".confirm_title"),
body: t("custom_turbo_confirm.history.body_html"), body: t(".confirm_body_html"),
accept: t("custom_turbo_confirm.history.accept") } }, accept: t(".confirm_accept") } },
class: "text-red-600 flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %> 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") %> <%= lucide_icon("trash-2", class: "w-5 h-5 shrink-0") %>
<span class="text-sm">Delete entry</span> <span class="text-sm">Delete entry</span>

View file

@ -26,9 +26,9 @@
class: "block w-full py-2 text-red-600 hover:text-red-800 flex items-center", class: "block w-full py-2 text-red-600 hover:text-red-800 flex items-center",
data: { data: {
turbo_confirm: { turbo_confirm: {
title: t("custom_turbo_confirm.account_destroy.title"), title: t(".confirm_title"),
body: t("custom_turbo_confirm.account_destroy.body_html"), body: t(".confirm_body_html"),
accept: t("custom_turbo_confirm.account_destroy.accept", name: @account.name) accept: t(".confirm_accept", name: @account.name)
} }
} do %> } do %>
<%= lucide_icon("trash-2", class: "w-5 h-5 mr-2") %> Delete account <%= lucide_icon("trash-2", class: "w-5 h-5 mr-2") %> Delete account

View file

@ -38,7 +38,7 @@
</main> </main>
</div> </div>
<%= turbo_frame_tag "modal" %> <%= turbo_frame_tag "modal" %>
<%= render "shared/custom_confirm_modal" %> <%= render "shared/confirm_modal" %>
<%= render "shared/upgrade_notification" %> <%= render "shared/upgrade_notification" %>
<% if self_hosted? %> <% 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"> <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">

View file

@ -2,15 +2,15 @@
<form method="dialog" class="p-4"> <form method="dialog" class="p-4">
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<div class="flex justify-between mb-2 gap-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"> <button value="cancel">
<%= lucide_icon("x", class: "w-5 h-5 shrink-0 text-gray-500") %> <%= lucide_icon("x", class: "w-5 h-5 shrink-0 text-gray-500") %>
</button> </button>
</div> </div>
<div id="turbo-confirm-body" class="text-gray-500 text-sm"> <div id="turbo-confirm-body" class="text-gray-500 text-sm">
<%= t("custom_turbo_confirm.default.body_html") %> <%= t(".body_html") %>
</div> </div>
</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> </form>
</dialog> </dialog>

View file

@ -1,6 +1,13 @@
--- ---
en: en:
accounts: accounts:
account_valuation_list:
confirm_accept: Delete entry
confirm_body_html: "<p>Deleting this entry will remove it from the accounts
history which will impact different parts of your account. This includes the
net worth and account graphs.</p></br><p>The only way youll be able to add
this entry back is by re-entering it manually via a new entry</p>"
confirm_title: Delete Entry?
create: create:
success: New account created successfully success: New account created successfully
destroy: destroy:
@ -16,6 +23,14 @@ en:
placeholder: Example account name placeholder: Example account name
select_accountable_type: What would you like to add? select_accountable_type: What would you like to add?
title: Add an account 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: summary:
new: New account new: New account
sync: sync:

View file

@ -1,26 +1,10 @@
--- ---
en: en:
custom_turbo_confirm: shared:
account_destroy: confirm_modal:
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:
accept: Confirm accept: Confirm
body_html: "<p>You will not be able to undo this decision</p>" body_html: "<p>You will not be able to undo this decision</p>"
title: Are you sure? title: Are you sure?
history:
accept: Delete entry
body_html: "<p>Deleting this entry will remove it from the accounts history
which will impact different parts of your account. This includes the net worth
and account graphs.</p></br><p>The only way youll be able to add this entry
back is by re-entering it manually via a new entry</p>"
title: Delete Entry?
shared:
notification: notification:
dismiss: Dismiss dismiss: Dismiss
upgrade_notification: upgrade_notification: