Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #271 from Shopify/i18n-js-strings
Browse files Browse the repository at this point in the history
Make sure strings are escaped properly
  • Loading branch information
cshold committed Nov 11, 2014
2 parents 85bc5e5 + 551eafd commit 76b72f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/shop.js.liquid
Expand Up @@ -127,12 +127,12 @@ timber.productPage = function (options) {
if (variant.available) {
// Available, enable the submit button, change text, show quantity elements
$addToCart.removeClass('disabled').prop('disabled', false);
$addToCartText.text({{ 'products.product.add_to_cart' | t | json }});
$addToCartText.html({{ 'products.product.add_to_cart' | t | json }});
$quantityElements.show();
} else {
// Sold out, disable the submit button, change text, hide quantity elements
$addToCart.addClass('disabled').prop('disabled', true);
$addToCartText.text({{ 'products.product.sold_out' | t | json }});
$addToCartText.html({{ 'products.product.sold_out' | t | json }});
$quantityElements.hide();
}

Expand All @@ -154,7 +154,7 @@ timber.productPage = function (options) {
// To only show available variants, implement linked product options:
// - http://docs.shopify.com/manual/configuration/store-customization/advanced-navigation/linked-product-options
$addToCart.addClass('disabled').prop('disabled', true);
$addToCartText.text({{ 'products.product.unavailable' | t | json }});
$addToCartText.html({{ 'products.product.unavailable' | t | json }});
$quantityElements.hide();
}
};
Expand Down

0 comments on commit 76b72f0

Please sign in to comment.