Skip to content

Commit

Permalink
Backend: Add missing error translation
Browse files Browse the repository at this point in the history
We were missing a translation here, but never noticed, because we were
not testing for an actual human-understandable string.

This is broken in the v4.0, v4.1, v4.2 and v4.3 branches with a noisier
error message, because in those branches, `I18n.t("unavailable")` is
different from `t("unavailable")`.

(cherry picked from commit 506ddfc)
  • Loading branch information
mamhoff committed Dec 3, 2024
1 parent 20fe2da commit e5346a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def user

it "cannot be destroyed" do
is_expected.to be_forbidden
expect(subject.body).to eq I18n.t("spree.error_user_destroy_with_orders")
expect(subject.body).to eq("Cannot delete a user with orders")
end
end
end
Expand Down
1 change: 1 addition & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@ en:
end: End
ending_in: Ending in
error: error
error_user_destroy_with_orders: Cannot delete a user with orders
errors:
messages:
cannot_delete_finalized_stock_location: Stock Location cannot be destroyed if you have open stock transfers.
Expand Down

0 comments on commit e5346a1

Please sign in to comment.