mirror of
https://github.com/we-promise/sure.git
synced 2026-05-24 13:04:56 +00:00
* Extract hardcoded strings to i18n
Replace numerous hardcoded English strings with I18n lookups (t / I18n.t) across controllers, views, helpers, and components, and convert model validation error messages to symbol keys. Added multiple locale files under config/locales for models and views. This centralizes user-facing notices/alerts, UI text, import/validation messages, and prepares the app for localization and easier translation maintenance.
* Update en.yml
* Update preview-cleanup.yml
* Revert "Update preview-cleanup.yml"
This reverts commit 1ba6d3c34c.
* test: align i18n assertions with translated messages
* Standardize balance error key and tweak locales
Replace SophtronAccount's :requires_balance error key with :no_balance and update related locale strings for sophtron, plaid, and simplefin accounts to use the new key and clearer copy. Also switch the QIF upload redirect notice to use a relative translation key (t('.qif_uploaded')), remove an unused SSO providers help line, and fix a trailing-newline/whitespace issue in the subscriptions locale. These changes standardize validation keys and improve translation consistency and messaging.
---------
Co-authored-by: KiloClaw <kiloclaw@openclaw.ai>
48 lines
1.8 KiB
Plaintext
48 lines
1.8 KiB
Plaintext
<%= content_for :header_nav do %>
|
|
<%= render "budgets/budget_nav", budget: @budget %>
|
|
<% end %>
|
|
|
|
<%= content_for :previous_path, budget_path(@budget) %>
|
|
<%= content_for :cancel_path, budget_path(@budget) %>
|
|
|
|
<div>
|
|
<div class="space-y-4">
|
|
<div class="text-center space-y-2">
|
|
<h1 class="text-3xl text-primary font-medium"><%= t(".setup_title") %></h1>
|
|
<p class="text-secondary text-sm max-w-sm mx-auto">
|
|
<%= t(".setup_description") %>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="mx-auto max-w-lg">
|
|
<%= styled_form_with model: @budget, class: "space-y-3", data: { controller: "budget-form" } do |f| %>
|
|
<%= f.money_field :budgeted_spending, label: t(".budgeted_spending"), required: true, disable_currency: true %>
|
|
<%= f.money_field :expected_income, label: t(".expected_income"), required: true, disable_currency: true %>
|
|
|
|
<% if @budget.estimated_income && @budget.estimated_spending %>
|
|
<div class="border border-tertiary rounded-lg p-3 flex">
|
|
<%= icon "sparkles" %>
|
|
<div class="ml-2 space-y-1 text-sm">
|
|
<h4 class="text-primary"><%= t(".autosuggest_title") %></h4>
|
|
<p class="text-secondary">
|
|
<%= t(".autosuggest_description") %>
|
|
</p>
|
|
</div>
|
|
|
|
<%= render DS::Toggle.new(
|
|
id: "auto_fill",
|
|
data: {
|
|
action: "change->budget-form#toggleAutoFill",
|
|
budget_form_income_param: { key: "budget_expected_income", value: sprintf("%.2f", @budget.estimated_income) },
|
|
budget_form_spending_param: { key: "budget_budgeted_spending", value: sprintf("%.2f", @budget.estimated_spending) }
|
|
}
|
|
) %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= f.submit t(".continue") %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|