Merge pull request #3207 from luisramos0/2-0-insuf-stock-transl

[Spree Upgrade] Add missing spree translations related to insufficient stock
This commit is contained in:
Maikel
2018-12-14 12:05:06 +11:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -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()

View File

@@ -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"}

View File

@@ -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