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 #309 from Shopify/afshing-i18n-ajaxify
Browse files Browse the repository at this point in the history
i18n ajaxify cart strings
  • Loading branch information
cshold committed Jan 7, 2015
2 parents 3f70d3b + 1f6a9ef commit 181edd3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions assets/ajaxify.js.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ var ajaxifyShopify = (function(module, $) {
$addToCart.addClass('flip__front').wrap('<div class="flip"></div>');

// Write a (hidden) Checkout button, a loader, and the extra view cart button
var checkoutBtn = $('<a href="/cart" class="flip__back" style="background-color: #C00; color: #fff;" class="flip__checkout">Checkout</a>').addClass($btnClass),
var checkoutBtn = $('<a href="/cart" class="flip__back" style="background-color: #C00; color: #fff;" class="flip__checkout">{{ 'cart.general.checkout' | t | json }} </a>').addClass($btnClass),
flipLoader = $('<span class="ajaxcart__flip-loader"></span>'),
flipExtra = $('<div class="flip__extra"><a href="#" class="flip__cart">View Cart (<span></span>)</a></div>');
flipExtra = $('<div class="flip__extra"><a href="#" class="flip__cart">{{ 'cart.general.view_cart' | t | json }} (<span></span>)</a></div>');

// Append checkout button and loader
checkoutBtn.insertAfter($addToCart);
Expand Down Expand Up @@ -445,7 +445,7 @@ var ajaxifyShopify = (function(module, $) {
$modalOverlay.on('click', hideModal);

// Create a close modal button
$modalContainer.prepend('<button type="button" class="ajaxcart__close" title="Close Cart">Close Cart</button>');
$modalContainer.prepend('<button type="button" class="ajaxcart__close" title="{{ 'cart.general.close_cart' | t | json }}">{{ 'cart.general.close_cart' | t | json }}</button>');
$closeCart = $('.ajaxcart__close');
$closeCart.on('click', hideModal);

Expand Down Expand Up @@ -878,7 +878,7 @@ var ajaxifyShopify = (function(module, $) {
sizeDrawer(true);
}
// Create a close drawer button
$cartContainer.prepend('<button type="button" class="ajaxcart__close" title="Close Cart">Close Cart</button>');
$cartContainer.prepend('<button type="button" class="ajaxcart__close" title="{{ 'cart.general.close_cart' | t | json }} ">{{ 'cart.general.close_cart' | t | json }} </button>');
$closeCart = $('.ajaxcart__close');
$closeCart.on('click', hideDrawer);
break;
Expand Down
4 changes: 3 additions & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Einkaufswagen aktualisieren",
"checkout": "Zur Kasse",
"empty": "Ihr Einkaufswagen ist im Moment leer.",
"continue_browsing_html": "Mit der Suche <a href=\"/collections/all\">hier</a> fortfahren."
"continue_browsing_html": "Mit der Suche <a href=\"/collections/all\">hier</a> fortfahren.",
"view_cart": "Einkaufswagen ansehen",
"close_cart": "Einkaufswagen schließen"
},
"label": {
"product": "Artikel",
Expand Down
4 changes: 3 additions & 1 deletion locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Update Cart",
"checkout": "Check Out",
"empty": "Your cart is currently empty.",
"continue_browsing_html": "Continue browsing <a href=\"/collections/all\">here</a>."
"continue_browsing_html": "Continue browsing <a href=\"/collections/all\">here</a>.",
"view_cart": "View Cart",
"close_cart": "Close Cart"
},
"label": {
"product": "Product",
Expand Down
4 changes: 3 additions & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Actualizar carrito",
"checkout": "Finalizar pedido",
"empty": "Su carrito actualmente está vacío.",
"continue_browsing_html": "Continúe explorando <a href=\"/collections/all\">aquí</a>."
"continue_browsing_html": "Continúe explorando <a href=\"/collections/all\">aquí</a>.",
"view_cart": "Ver carrito",
"close_cart": "Cerrar carrito"
},
"label": {
"product": "Producto",
Expand Down
4 changes: 3 additions & 1 deletion locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Mettre à jour",
"checkout": "Procéder au paiement",
"empty": "Votre panier est vide.",
"continue_browsing_html": "<a href=\"/collections/all\">Retourner au magasinage</a>."
"continue_browsing_html": "<a href=\"/collections/all\">Retourner au magasinage</a>.",
"view_cart": "Voir le panier",
"close_cart": "Fermer le panier"
},
"label": {
"product": "Produit",
Expand Down
4 changes: 3 additions & 1 deletion locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Atualizar Carrinho",
"checkout": "Fechar pedido",
"empty": "Seu carrinho está vazio no momento.",
"continue_browsing_html": "Continue navegando <a href=\"/collections/all\">aqui</a>."
"continue_browsing_html": "Continue navegando <a href=\"/collections/all\">aqui</a>.",
"view_cart": "Ver carrinho",
"close_cart": "Fechar carrinho"
},
"label": {
"product": "Produto",
Expand Down
4 changes: 3 additions & 1 deletion locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"update": "Atualizar Carrinho de Compras",
"checkout": "Check-Out",
"empty": "O seu carrinho de compras está neste momento vazio.",
"continue_browsing_html": "Continue a ver <a href=\"/collections/all\">aqui</a>."
"continue_browsing_html": "Continue a ver <a href=\"/collections/all\">aqui</a>.",
"view_cart": "Ver Carrinho de Compras",
"close_cart": "Fechar Carrinho de Compras"
},
"label": {
"product": "Produto",
Expand Down

0 comments on commit 181edd3

Please sign in to comment.