Skip to content

Commit

Permalink
fix(storefront): BCTHEME-512 add translation for invalid quantity val…
Browse files Browse the repository at this point in the history
…ue error on cart (#2062)
  • Loading branch information
bc-alexsaiannyi authored May 24, 2021
1 parent d9a82a4 commit db80faf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Added translation for invalid quantity value error on Cart. [#2062](https://github.com/bigcommerce/cornerstone/pull/2062)
- Translation Gap: Delete from Cart confirmation popup. [#2065](https://github.com/bigcommerce/cornerstone/pull/2065)

## 5.5.0 (05-20-2021)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Cart extends PageManager {
invalidEntry = $el.val();
$el.val(oldQty);
return swal.fire({
text: `${invalidEntry} is not a valid entry`,
text: this.context.invalidEntryMessage.replace('[ENTRY]', invalidEntry),
icon: 'error',
});
} else if (newQty < minQty) {
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
},
"label": "Your Cart ({quantity, plural, one {# item} other {# items}})",
"is_empty": "Your cart is empty",
"invalid_entry_message": "[ENTRY] is not a valid entry",
"coupon_code": "Coupon Code",
"discount": "Discount",
"included_in_total": " Included in Total",
Expand Down
1 change: 1 addition & 0 deletions templates/pages/cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
---
{{inject 'cancelButtonText' (lang 'common.cancel')}}
{{#partial "page"}}
{{inject 'invalidEntryMessage' (lang 'cart.invalid_entry_message')}}
<div class="page">

<div class="page-content" data-cart>
Expand Down

0 comments on commit db80faf

Please sign in to comment.