diff --git a/app/views/goals/show.html.erb b/app/views/goals/show.html.erb index 602f546d8..4dd758b1c 100644 --- a/app/views/goals/show.html.erb +++ b/app/views/goals/show.html.erb @@ -62,6 +62,14 @@ <% menu.with_item(variant: "button", text: t(".resume"), icon: "play", href: resume_goal_path(@goal), method: :patch) %> <% end %> <% if @goal.may_complete? %> + <% complete_body = if @goal.progress_percent < 100 + t(".confirm_complete_body_short", + progress: @goal.progress_percent, + saved: @goal.current_balance_money.format(precision: 0), + target: @goal.target_amount_money.format(precision: 0)) + else + t(".confirm_complete_body") + end %> <% menu.with_item( variant: "button", text: t(".complete"), @@ -70,7 +78,7 @@ method: :patch, confirm: CustomConfirm.new( title: t(".confirm_complete_title"), - body: t(".confirm_complete_body"), + body: complete_body, btn_text: t(".confirm_complete_cta") ) ) %> diff --git a/config/locales/views/goals/en.yml b/config/locales/views/goals/en.yml index ef2db243c..345a5efd1 100644 --- a/config/locales/views/goals/en.yml +++ b/config/locales/views/goals/en.yml @@ -146,6 +146,7 @@ en: adjust_target_cta: Adjust target instead confirm_complete_title: Mark this goal complete? confirm_complete_body: It leaves the Ongoing list. You can still archive or restore it later. + confirm_complete_body_short: "You're at %{progress}% — %{saved} of %{target}. Marking complete records this as your achievement instead of the original target. Continue, or close this and adjust the target instead?" confirm_complete_cta: Mark complete confirm_archive_title: Archive this goal? confirm_archive_body: Archived goals disappear from the main list. You can restore them later.