- <%= label_tag "account_types[#{enable_banking_account.id}]", "Account Type:",
+ <%= label_tag "account_types[#{enable_banking_account.id}]", t(".account_type_label"),
class: "block text-sm font-medium text-primary mb-2" %>
<%= select_tag "account_types[#{enable_banking_account.id}]",
options_for_select(@account_type_options, enable_banking_account.suggested_account_type || "skip"),
@@ -115,7 +115,7 @@
<%= render DS::Button.new(
- text: "Create Accounts",
+ text: t(".create_accounts"),
variant: "primary",
icon: "plus",
type: "submit",
@@ -123,7 +123,7 @@
data: { loading_button_target: "button" }
) %>
<%= render DS::Link.new(
- text: "Cancel",
+ text: t(".cancel"),
variant: "secondary",
href: accounts_path
) %>
diff --git a/app/views/family_exports/new.html.erb b/app/views/family_exports/new.html.erb
index d6942158b..9433eee2f 100644
--- a/app/views/family_exports/new.html.erb
+++ b/app/views/family_exports/new.html.erb
@@ -1,40 +1,40 @@
<%= render DS::Dialog.new do |dialog| %>
- <% dialog.with_header(title: "Export your data", subtitle: "Download all your financial data") %>
+ <% dialog.with_header(title: t(".dialog_title"), subtitle: t(".dialog_subtitle")) %>
<% dialog.with_body do %>
-
What's included:
+
<%= t(".whats_included") %>
<%= icon "check", class: "shrink-0 mt-0.5 text-positive" %>
- All accounts and balances
+ <%= t(".accounts_and_balances") %>
<%= icon "check", class: "shrink-0 mt-0.5 text-positive" %>
- Transaction history
+ <%= t(".transaction_history") %>
<%= icon "check", class: "shrink-0 mt-0.5 text-positive" %>
- Investment trades
+ <%= t(".investment_trades") %>
<%= icon "check", class: "shrink-0 mt-0.5 text-positive" %>
- Categories, tags and rules
+ <%= t(".categories_tags_rules") %>
- Note: This export includes all of your data, but only some of the data can be imported back via the CSV import feature. We support account, transaction (with category and tags), and trade imports. Other account data cannot be imported and is for your records only.
+ <%= t(".note_label") %>: <%= t(".note_description") %>
<%= form_with url: family_exports_path, method: :post, class: "space-y-4" do |form| %>
- <%= link_to "Cancel", "#", class: "flex-1 text-center px-4 py-2 text-primary bg-surface border border-primary rounded-lg hover:bg-surface-hover", data: { action: "click->modal#close" } %>
- <%= form.submit "Export data", class: "flex-1 bg-inverse text-inverse rounded-lg px-4 py-2 cursor-pointer hover:bg-inverse-hover" %>
+ <%= link_to t(".cancel"), "#", class: "flex-1 text-center px-4 py-2 text-primary bg-surface border border-primary rounded-lg hover:bg-surface-hover", data: { action: "click->modal#close" } %>
+ <%= form.submit t(".export_data"), class: "flex-1 bg-inverse text-inverse rounded-lg px-4 py-2 cursor-pointer hover:bg-inverse-hover" %>
<% end %>
diff --git a/app/views/family_merchants/_family_merchant.html.erb b/app/views/family_merchants/_family_merchant.html.erb
index 8e3306df7..c0df9dfec 100644
--- a/app/views/family_merchants/_family_merchant.html.erb
+++ b/app/views/family_merchants/_family_merchant.html.erb
@@ -18,10 +18,10 @@
<%= render DS::Menu.new do |menu| %>
- <% menu.with_item(variant: "link", text: "Edit", href: edit_family_merchant_path(family_merchant), icon: "pencil", data: { turbo_frame: "modal" }) %>
+ <% menu.with_item(variant: "link", text: t(".edit"), href: edit_family_merchant_path(family_merchant), icon: "pencil", data: { turbo_frame: "modal" }) %>
<% menu.with_item(
variant: "button",
- text: "Delete",
+ text: t(".delete"),
href: family_merchant_path(family_merchant),
icon: "trash-2",
method: :delete,
diff --git a/app/views/holdings/_cost_basis_cell.html.erb b/app/views/holdings/_cost_basis_cell.html.erb
index 8d595baee..0b82ca299 100644
--- a/app/views/holdings/_cost_basis_cell.html.erb
+++ b/app/views/holdings/_cost_basis_cell.html.erb
@@ -30,7 +30,7 @@
<% else %>
<%= icon "pencil", size: "xs" %>
- Set
+ <%= t(".set") %>
<% end %>
<% end %>
diff --git a/app/views/ibkr_items/select_existing_account.html.erb b/app/views/ibkr_items/select_existing_account.html.erb
index 3598da843..d1d27663b 100644
--- a/app/views/ibkr_items/select_existing_account.html.erb
+++ b/app/views/ibkr_items/select_existing_account.html.erb
@@ -1,14 +1,14 @@
<%= turbo_frame_tag "modal" do %>
<%= render DS::Dialog.new do |dialog| %>
- <% dialog.with_header(title: "Link Interactive Brokers account") %>
+ <% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<% if @available_ibkr_accounts.blank? %>
-
No unlinked Interactive Brokers accounts are available yet.
+
<%= t(".no_accounts_available") %>
- Run a sync from Settings > Providers after updating your Flex query.
- Wait for the account discovery sync to finish.
+ <%= t(".run_sync_hint") %>
+ <%= t(".wait_for_sync") %>
<% else %>
@@ -21,7 +21,7 @@
<%= ibkr_account.name.presence || ibkr_account.ibkr_account_id %>
- <%= ibkr_account.currency %> • Balance: <%= number_to_currency((ibkr_account.current_balance || 0), unit: Money::Currency.new(ibkr_account.currency || "USD").symbol) %>
+ <%= ibkr_account.currency %> • <%= t(".balance") %>: <%= number_to_currency((ibkr_account.current_balance || 0), unit: Money::Currency.new(ibkr_account.currency || "USD").symbol) %>
@@ -29,8 +29,8 @@
- <%= render DS::Button.new(text: "Link", variant: :primary, icon: "link-2", type: :submit) %>
- <%= render DS::Link.new(text: "Cancel", variant: :secondary, href: accounts_path, data: { turbo_frame: "_top" }) %>
+ <%= render DS::Button.new(text: t(".link"), variant: :primary, icon: "link-2", type: :submit) %>
+ <%= render DS::Link.new(text: t(".cancel"), variant: :secondary, href: accounts_path, data: { turbo_frame: "_top" }) %>
<% end %>
<% end %>
diff --git a/app/views/impersonation_sessions/_super_admin_bar.html.erb b/app/views/impersonation_sessions/_super_admin_bar.html.erb
index a09a8250f..718471b67 100644
--- a/app/views/impersonation_sessions/_super_admin_bar.html.erb
+++ b/app/views/impersonation_sessions/_super_admin_bar.html.erb
@@ -1,20 +1,20 @@
<%= icon "alert-triangle", size: "lg", color: "current", class: "mr-2" %>
- Super Admin
+ <%= t(".super_admin") %>
- <%= link_to "Jobs", sidekiq_web_url, class: "text-white underline hover:text-gray-100" %>
+ <%= link_to t(".jobs"), sidekiq_web_url, class: "text-white underline hover:text-gray-100" %>
<% if Current.session.active_impersonator_session.present? %>
- Impersonating: <%= Current.impersonated_user.email %>
+ <%= t(".impersonating") %>: <%= Current.impersonated_user.email %>
- <%= button_to "Leave", leave_impersonation_sessions_path, method: :delete, class: "items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
- <%= button_to "Terminate", complete_impersonation_session_path(Current.session.active_impersonator_session), method: :put, class: "items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
+ <%= button_to t(".leave"), leave_impersonation_sessions_path, method: :delete, class: "items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
+ <%= button_to t(".terminate"), complete_impersonation_session_path(Current.session.active_impersonator_session), method: :put, class: "items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
<% else %>
<% if Current.true_user.impersonator_support_sessions.in_progress.any? %>
@@ -23,16 +23,16 @@
Current.true_user.impersonator_support_sessions.in_progress.map { |session|
["#{session.impersonated.email} (#{session.status})", session.id]
},
- { prompt: "Join a session" },
+ { prompt: t(".join_a_session") },
{ class: "rounded-md text-sm border-0 focus:ring-0 ring-0 text-black font-mono" } %>
- <%= f.submit "Join",
+ <%= f.submit t(".join"),
class: "inline-flex items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
<% end %>
<% end %>
<%= form_with model: ImpersonationSession.new, class: "flex items-center space-x-2" do |f| %>
- <%= f.text_field :impersonated_id, class: "rounded-md text-sm border-0 focus:ring-0 ring-0 text-black font-mono w-96", placeholder: "UUID", autocomplete: "off" %>
- <%= f.submit "Request Impersonation", class: "inline-flex items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
+ <%= f.text_field :impersonated_id, class: "rounded-md text-sm border-0 focus:ring-0 ring-0 text-black font-mono w-96", placeholder: t(".uuid_placeholder"), autocomplete: "off" %>
+ <%= f.submit t(".request_impersonation"), class: "inline-flex items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
<% end %>
<% end %>
diff --git a/app/views/import/cleans/show.html.erb b/app/views/import/cleans/show.html.erb
index 14941acf8..834b9741a 100644
--- a/app/views/import/cleans/show.html.erb
+++ b/app/views/import/cleans/show.html.erb
@@ -14,11 +14,11 @@
<%= icon "check-circle", size: "sm", color: "success" %>
-
Your data has been cleaned
+
<%= t(".data_cleaned") %>
<%= render DS::Link.new(
- text: "Next step",
+ text: t(".next_step"),
variant: "primary",
href: @import.is_a?(PdfImport) ? import_path(@import) : import_confirm_path(@import),
frame: :_top,
@@ -35,8 +35,8 @@
- <%= link_to "All rows", import_clean_path(@import, per_page: params[:per_page], view: "all"), class: "p-2 rounded-lg flex-1 md:flex-auto text-center #{params[:view] != 'errors' ? 'bg-container' : ''}" %>
- <%= link_to "Error rows", import_clean_path(@import, per_page: params[:per_page], view: "errors"), class: "p-2 rounded-lg flex-1 md:flex-auto text-center #{params[:view] == 'errors' ? 'bg-container' : ''}" %>
+ <%= link_to t(".all_rows"), import_clean_path(@import, per_page: params[:per_page], view: "all"), class: "p-2 rounded-lg flex-1 md:flex-auto text-center #{params[:view] != 'errors' ? 'bg-container' : ''}" %>
+ <%= link_to t(".error_rows"), import_clean_path(@import, per_page: params[:per_page], view: "errors"), class: "p-2 rounded-lg flex-1 md:flex-auto text-center #{params[:view] == 'errors' ? 'bg-container' : ''}" %>
diff --git a/app/views/import/configurations/_account_import.html.erb b/app/views/import/configurations/_account_import.html.erb
index a8c4ec010..2b50e4cb7 100644
--- a/app/views/import/configurations/_account_import.html.erb
+++ b/app/views/import/configurations/_account_import.html.erb
@@ -1,18 +1,18 @@
<%# locals: (import:) %>
<%= styled_form_with model: @import, url: import_configuration_path(@import), scope: :import, method: :patch, class: "space-y-4" do |form| %>
- <%= form.select :entity_type_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Entity Type" } %>
- <%= form.select :name_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Name" }, required: true %>
- <%= form.select :amount_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Balance" }, required: true %>
- <%= form.select :currency_col_label, import.csv_headers, { include_blank: "Default", label: "Currency" } %>
+ <%= form.select :entity_type_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".entity_type") } %>
+ <%= form.select :name_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".name") }, required: true %>
+ <%= form.select :amount_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".balance") }, required: true %>
+ <%= form.select :currency_col_label, import.csv_headers, { include_blank: t(".default"), label: t(".currency") } %>
- <%= form.select :date_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Balance Date" } %>
+ <%= form.select :date_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".balance_date") } %>
<%= form.select :date_format,
Family::DATE_FORMATS,
- { label: "Date Format", prompt: "Select format" },
+ { label: t(".date_format"), prompt: t(".select_format") },
required: @import.date_col_label.present? %>
- <%= form.submit "Apply configuration", disabled: import.complete? %>
+ <%= form.submit t(".apply_configuration"), disabled: import.complete? %>
<% end %>
diff --git a/app/views/import/configurations/_trade_import.html.erb b/app/views/import/configurations/_trade_import.html.erb
index b9ac4685c..4ac559487 100644
--- a/app/views/import/configurations/_trade_import.html.erb
+++ b/app/views/import/configurations/_trade_import.html.erb
@@ -3,38 +3,38 @@
<%= styled_form_with model: @import, url: import_configuration_path(@import), scope: :import, method: :patch, class: "space-y-4" do |form| %>
- <%= form.select :date_col_label, import.csv_headers, { include_blank: "Select column", label: "Date" }, required: true %>
+ <%= form.select :date_col_label, import.csv_headers, { include_blank: t(".select_column"), label: t(".date_label") }, required: true %>
<%= form.select :date_format, Family::DATE_FORMATS, { label: t(".date_format_label")}, label: true, required: true %>
- <%= form.select :qty_col_label, import.csv_headers, { include_blank: "Select column", label: "Quantity" }, required: true %>
- <%= form.select :signage_convention, [["Buys are positive qty", "inflows_positive"], ["Buys are negative qty", "inflows_negative"]], label: true, required: true %>
+ <%= form.select :qty_col_label, import.csv_headers, { include_blank: t(".select_column"), label: t(".quantity_label") }, required: true %>
+ <%= form.select :signage_convention, [[t(".buys_are_positive"), "inflows_positive"], [t(".buys_are_negative"), "inflows_negative"]], label: true, required: true %>
- <%= form.select :currency_col_label, import.csv_headers, { include_blank: "Default", label: "Currency" } %>
- <%= form.select :number_format, Import::NUMBER_FORMATS.keys, { label: "Format", prompt: "Select format" }, required: true %>
+ <%= form.select :currency_col_label, import.csv_headers, { include_blank: t(".default"), label: t(".currency_label") } %>
+ <%= form.select :number_format, Import::NUMBER_FORMATS.keys, { label: t(".format_label"), prompt: t(".select_format") }, required: true %>
- <%= form.select :ticker_col_label, import.csv_headers, { include_blank: "Select column", label: "Ticker" }, required: true %>
- <%= form.select :exchange_operating_mic_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Stock exchange code" } %>
- <%= form.select :price_col_label, import.csv_headers, { include_blank: "Select column", label: "Price" }, required: true %>
+ <%= form.select :ticker_col_label, import.csv_headers, { include_blank: t(".select_column"), label: t(".ticker_label") }, required: true %>
+ <%= form.select :exchange_operating_mic_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".stock_exchange_code_label") } %>
+ <%= form.select :price_col_label, import.csv_headers, { include_blank: t(".select_column"), label: t(".price_label") }, required: true %>
<% unless import.account.present? %>
- <%= form.select :account_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Account" } %>
+ <%= form.select :account_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".account_label") } %>
<% end %>
- <%= form.select :name_col_label, import.csv_headers, { include_blank: "Leave empty", label: "Name" } %>
+ <%= form.select :name_col_label, import.csv_headers, { include_blank: t(".leave_empty"), label: t(".name_label") } %>
<% unless Security.providers.any? %>
- Note: The security prices provider is not configured. Your trade imports will work, but Sure will not backfill price history. Please go to your settings to configure this.
+ <%= t(".note_label") %>: <%= t(".no_security_provider_warning") %>
<% end %>
- <%= form.submit "Apply configuration", disabled: import.complete? %>
+ <%= form.submit t(".apply_configuration"), disabled: import.complete? %>
<% end %>
diff --git a/app/views/import/configurations/_transaction_import.html.erb b/app/views/import/configurations/_transaction_import.html.erb
index e0466d550..e6b927101 100644
--- a/app/views/import/configurations/_transaction_import.html.erb
+++ b/app/views/import/configurations/_transaction_import.html.erb
@@ -19,11 +19,11 @@
<%= form.select :date_col_label,
import.csv_headers,
- { label: "Date", prompt: "Select column" },
+ { label: t(".date_label"), prompt: t(".select_column") },
required: true %>
<%= form.select :date_format,
Family::DATE_FORMATS,
- { label: t(".date_format_label"), prompt: "Select format" },
+ { label: t(".date_format_label"), prompt: t(".select_format") },
required: true %>
@@ -31,21 +31,21 @@
<%= form.select :amount_col_label,
import.csv_headers,
- { label: "Amount", container_class: "w-2/5", prompt: "Select column" },
+ { label: t(".amount_label"), container_class: "w-2/5", prompt: t(".select_column") },
required: true %>
<%= form.select :currency_col_label,
import.csv_headers,
- { include_blank: "Default", label: "Currency", container_class: "w-1/5" } %>
+ { include_blank: t(".default"), label: t(".currency_label"), container_class: "w-1/5" } %>
<%= form.select :number_format,
Import::NUMBER_FORMATS.keys,
- { label: "Format", prompt: "Select format", container_class: "w-2/5" },
+ { label: t(".format_label"), prompt: t(".select_format"), container_class: "w-2/5" },
required: true %>
<%# Amount Type Strategy %>
<%= form.select :amount_type_strategy,
Import::AMOUNT_TYPE_STRATEGIES.map { |strategy| [strategy.humanize, strategy] },
- { label: "Amount type strategy", prompt: "Select strategy" },
+ { label: t(".amount_type_strategy_label"), prompt: t(".select_strategy") },
required: true,
data: {
action: "import#handleAmountTypeStrategyChange",
@@ -58,8 +58,8 @@
↪
<%= form.select :signage_convention,
- [["Incomes are positive", "inflows_positive"], ["Incomes are negative", "inflows_negative"]],
- { label: "Amount type", prompt: "Select convention" },
+ [[t(".incomes_are_positive"), "inflows_positive"], [t(".incomes_are_negative"), "inflows_negative"]],
+ { label: t(".amount_type_label"), prompt: t(".select_convention") },
required: @import.amount_type_strategy == "signed_amount" %>
<% end %>
@@ -70,32 +70,32 @@
↪
- Set
+ <%= t(".set") %>
<%= form.select :entity_type_col_label,
import.csv_headers,
- { prompt: "Select column", container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
+ { prompt: t(".select_column"), container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
required: @import.amount_type_strategy == "custom_column",
data: { action: "import#handleAmountTypeChange" } %>
- as amount type column
+ <%= t(".as_amount_type_column") %>
" data-import-target="amountTypeValue">
↪
- Set
+ <%= t(".set") %>
<%= form.select :amount_type_identifier_value,
@import.selectable_amount_type_values,
- { prompt: "Select value", container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
+ { prompt: t(".select_value"), container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
required: @import.amount_type_strategy == "custom_column",
data: { action: "import#handleAmountTypeIdentifierChange" } %>
- as identifier value
+ <%= t(".as_identifier_value") %>
" data-import-target="amountTypeInflowValue">
↪
- Treat "<%= @import.amount_type_identifier_value %> " as
+ <%= t(".treat_as_html", value: @import.amount_type_identifier_value) %>
<%= form.select :amount_type_inflow_value,
- [["Income (inflow)", "inflows_positive"], ["Expense (outflow)", "inflows_negative"]],
- { prompt: "Select type", container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
+ [[t(".income_inflow"), "inflows_positive"], [t(".expense_outflow"), "inflows_negative"]],
+ { prompt: t(".select_type"), container_class: "w-48 px-3 py-1.5 border border-secondary rounded-md" },
required: @import.amount_type_strategy == "custom_column" %>
@@ -105,21 +105,21 @@
<% unless import.account.present? %>
<%= form.select :account_col_label,
import.csv_headers,
- { include_blank: "Leave empty", label: "Account" } %>
+ { include_blank: t(".leave_empty"), label: t(".account_label") } %>
<% end %>
<%= form.select :name_col_label,
import.csv_headers,
- { include_blank: "Leave empty", label: "Name" } %>
+ { include_blank: t(".leave_empty"), label: t(".name_label") } %>
<%= form.select :category_col_label,
import.csv_headers,
- { include_blank: "Leave empty", label: "Category" } %>
+ { include_blank: t(".leave_empty"), label: t(".category_label") } %>
<%= form.select :tags_col_label,
import.csv_headers,
- { include_blank: "Leave empty", label: "Tags" } %>
+ { include_blank: t(".leave_empty"), label: t(".tags_label") } %>
<%= form.select :notes_col_label,
import.csv_headers,
- { include_blank: "Leave empty", label: "Notes" } %>
+ { include_blank: t(".leave_empty"), label: t(".notes_label") } %>
- <%= form.submit "Apply configuration", disabled: import.complete? %>
+ <%= form.submit t(".apply_configuration"), disabled: import.complete? %>
<% end %>
diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erb
index 2bb31ee8f..2cfb6ab46 100644
--- a/app/views/import/confirms/_mappings.html.erb
+++ b/app/views/import/confirms/_mappings.html.erb
@@ -12,7 +12,7 @@
<%= tag.p t(".no_accounts"), class: "text-sm" %>
<%= render DS::Link.new(
- text: "Create account",
+ text: t(".create_account"),
variant: "primary",
href: new_account_path(return_to: import_confirm_path(import)),
frame: :modal
@@ -60,7 +60,7 @@
<%= render DS::Link.new(
- text: "Next",
+ text: t(".next"),
variant: "primary",
href: is_last_step ? import_path(import) : url_for(step: step_idx + 2),
icon: "arrow-right",
diff --git a/app/views/import/uploads/show.html.erb b/app/views/import/uploads/show.html.erb
index cc9a94136..56a5e320b 100644
--- a/app/views/import/uploads/show.html.erb
+++ b/app/views/import/uploads/show.html.erb
@@ -93,7 +93,7 @@
<%# ── Standard CSV upload ── %>
- <%= render "imports/drag_drop_overlay", title: "Drop CSV to upload", subtitle: "Your file will be uploaded automatically" %>
+ <%= render "imports/drag_drop_overlay", title: t(".drop_csv_title"), subtitle: t(".drop_csv_subtitle") %>
@@ -103,8 +103,8 @@
<%= render DS::Tabs.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %>
<% tabs.with_nav do |nav| %>
- <% nav.with_btn(id: "csv-upload", label: "Upload CSV") %>
- <% nav.with_btn(id: "csv-paste", label: "Copy & Paste") %>
+ <% nav.with_btn(id: "csv-upload", label: t(".upload_csv_tab")) %>
+ <% nav.with_btn(id: "csv-paste", label: t(".copy_paste_tab")) %>
<% end %>
<% tabs.with_panel(tab_id: "csv-upload") do %>
@@ -112,7 +112,7 @@
<%= form.select :col_sep, Import::SEPARATORS, label: true %>
<% if @import.type == "TransactionImport" || @import.type == "TradeImport" %>
- <%= form.select :account_id, @import.family.accounts.visible.alphabetically.pluck(:name, :id), { label: "Account (optional)", include_blank: "Multi-account import", selected: @import.account_id } %>
+ <%= form.select :account_id, @import.family.accounts.visible.alphabetically.pluck(:name, :id), { label: t(".account_optional_label"), include_blank: t(".multi_account_import"), selected: @import.account_id } %>
<% end %>
@@ -135,7 +135,7 @@
- <%= form.submit "Upload CSV", disabled: @import.complete? %>
+ <%= form.submit t(".upload_csv_button"), disabled: @import.complete? %>
<% end %>
<% end %>
@@ -144,16 +144,16 @@
<%= form.select :col_sep, Import::SEPARATORS, label: true %>
<% if @import.type == "TransactionImport" || @import.type == "TradeImport" %>
- <%= form.select :account_id, @import.family.accounts.visible.alphabetically.pluck(:name, :id), { label: "Account (optional)", include_blank: "Multi-account import", selected: @import.account_id } %>
+ <%= form.select :account_id, @import.family.accounts.visible.alphabetically.pluck(:name, :id), { label: t(".account_optional_label"), include_blank: t(".multi_account_import"), selected: @import.account_id } %>
<% end %>
<%= form.text_area :raw_file_str,
rows: 10,
required: true,
- placeholder: "Paste your CSV file contents here",
+ placeholder: t(".paste_csv_placeholder"),
"data-auto-submit-form-target": "auto" %>
- <%= form.submit "Upload CSV", disabled: @import.complete? %>
+ <%= form.submit t(".upload_csv_button"), disabled: @import.complete? %>
<% end %>
<% end %>
<% end %>
@@ -161,7 +161,7 @@
- <%= link_to "Download a sample CSV", "/imports/#{@import.id}/upload/sample_csv", class: "text-primary underline", data: { turbo: false } %> to see the required CSV format
+ <%= link_to t(".download_sample_csv"), "/imports/#{@import.id}/upload/sample_csv", class: "text-primary underline", data: { turbo: false } %> <%= t(".to_see_format") %>
diff --git a/app/views/imports/_failure.html.erb b/app/views/imports/_failure.html.erb
index ee9e8b9fc..3cdc4008f 100644
--- a/app/views/imports/_failure.html.erb
+++ b/app/views/imports/_failure.html.erb
@@ -7,10 +7,10 @@
-
Import failed
-
Please check that your file format, for any errors and that all required fields are filled, then come back and try again.
+
<%= t(".title") %>
+
<%= t(".description") %>
- <%= render DS::Button.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
+ <%= render DS::Button.new(text: t(".try_again"), href: publish_import_path(import), full_width: true) %>
diff --git a/app/views/imports/_importing.html.erb b/app/views/imports/_importing.html.erb
index 546701705..7fb8ed100 100644
--- a/app/views/imports/_importing.html.erb
+++ b/app/views/imports/_importing.html.erb
@@ -7,13 +7,13 @@
-
Import in progress
-
Your import is in progress. Check the imports menu for status updates or click 'Check Status' to refresh the page for updates. Feel free to continue using the app.
+
<%= t(".title") %>
+
<%= t(".description") %>
- <%= render DS::Link.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %>
- <%= render DS::Link.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
+ <%= render DS::Link.new(text: t(".check_status"), href: import_path(import), variant: "primary", full_width: true) %>
+ <%= render DS::Link.new(text: t(".back_to_dashboard"), href: root_path, variant: "secondary", full_width: true) %>
diff --git a/app/views/imports/_revert_failure.html.erb b/app/views/imports/_revert_failure.html.erb
index 9d64e7a76..6c4872d06 100644
--- a/app/views/imports/_revert_failure.html.erb
+++ b/app/views/imports/_revert_failure.html.erb
@@ -7,12 +7,12 @@
-
Reverting import failed
-
Please try again
+
<%= t(".title") %>
+
<%= t(".description") %>
<%= render DS::Button.new(
- text: "Try again",
+ text: t(".try_again"),
full_width: true,
href: revert_import_path(import)
) %>
diff --git a/app/views/imports/_success.html.erb b/app/views/imports/_success.html.erb
index c0849e94b..c3bc2d1eb 100644
--- a/app/views/imports/_success.html.erb
+++ b/app/views/imports/_success.html.erb
@@ -7,12 +7,12 @@
-
Import successful
-
Your imported data has been successfully added to the app and is now ready for use.
+
<%= t(".title") %>
+
<%= t(".description") %>
<%= render DS::Link.new(
- text: "Back to dashboard",
+ text: t(".back_to_dashboard"),
variant: "primary",
full_width: true,
href: root_path
diff --git a/app/views/layouts/shared/_confirm_dialog.html.erb b/app/views/layouts/shared/_confirm_dialog.html.erb
index 03e923818..a25c36f72 100644
--- a/app/views/layouts/shared/_confirm_dialog.html.erb
+++ b/app/views/layouts/shared/_confirm_dialog.html.erb
@@ -5,17 +5,17 @@