diff --git a/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee b/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee index 3c51f86c2f..9a849029b4 100644 --- a/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee @@ -15,7 +15,7 @@ Darkswarm.directive "ofnOnHand", -> ngModel.$parsers.push (viewValue) -> on_hand = parseInt(attr.ofnOnHand) if parseInt(viewValue) > on_hand - alert t('insufficient_stock', {on_hand: on_hand}) + alert t("js.insufficient_stock", {on_hand: on_hand}) viewValue = on_hand ngModel.$setViewValue viewValue ngModel.$render() diff --git a/app/views/spree/orders/_line_item.html.haml b/app/views/spree/orders/_line_item.html.haml index c81399130f..3f761472f8 100644 --- a/app/views/spree/orders/_line_item.html.haml +++ b/app/views/spree/orders/_line_item.html.haml @@ -19,7 +19,7 @@ - if @insufficient_stock_lines.andand.include? line_item %span.out-of-stock - = variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock) + = variant.in_stock? ? t(".insufficient_stock", :on_hand => variant.on_hand) : t(".out_of_stock") %br/ %td.text-right.cart-item-price{"data-hook" => "cart_item_price"} diff --git a/config/locales/en.yml b/config/locales/en.yml index 1b21352146..03fde52f8a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2590,6 +2590,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using sending: "Resend..." done: "Resend done ✓" failed: "Resend failed ✗" + insufficient_stock: "Insufficient stock available, only %{on_hand} remaining" out_of_stock: reduced_stock_available: Reduced stock available out_of_stock_text: > @@ -2819,6 +2820,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using login_to_view_order: "Please log in to view your order." bought: item: "Already ordered in this order cycle" + line_item: + insufficient_stock: "Insufficient stock available, only %{on_hand} remaining" + out_of_stock: "Out of Stock" shipment_states: backorder: backorder partial: partial