Bug 7599 - [SIGNED-OFF] Cart JavaScript contains untranslatable English strings
authorOwen Leonard <oleonard@myacpl.org>
Tue, 22 May 2012 18:42:42 +0000 (14:42 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 5 Jun 2012 13:32:50 +0000 (15:32 +0200)
To simplify the sentence structure for better translation flexibility
the message now reads:

"Item in your cart: " + number

Fixed in both OPAC and staff client, although I'm not sure
the message is actually triggered in the staff client.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Strings become translatable

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/js/basket.js
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/prog/en/js/basket.js

index 116d2e1..4d83a5b 100644 (file)
@@ -57,6 +57,7 @@
         var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
         var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
         var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
+        var MSG_IN_YOUR_CART = _("Items in your cart: ");
         var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved.");
     [% END %]
     //]]>
index 5b96c12..2043cd6 100644 (file)
@@ -378,10 +378,10 @@ function showLess() {
 function updateBasket(updated_value,target) {
        if(target){
        target.$('#basketcount').html(" <span>("+updated_value+")</span>");
-       target.$('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
+    target.$('#cartDetails').html(MSG_IN_YOUR_CART+updated_value);
        } else {
        $('#basketcount').html(" <span>("+updated_value+")</span>");
-       $('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
+    $('#cartDetails').html(MSG_IN_YOUR_CART+updated_value);
        }
        var basketcount = updated_value;
 }
index 3907f34..53a43c1 100644 (file)
@@ -56,6 +56,7 @@
     var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
     var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
     var MSG_ITEM_IN_CART = _("In your cart");
+    var MSG_IN_YOUR_CART = _("Items in your cart: ");
     var MSG_ITEM_NOT_IN_CART = _("Add to your cart");
        $("#cartDetails").ready(function(){ $("#cmspan").html("<a href=\"#\" id=\"cartmenulink\" class=\"\"><i><\/i><span><i><\/i><span><\/span><span id=\"carticon\"></span> "+_("Cart")+"<span id=\"basketcount\"><\/span><\/span><\/a>"); }); [% ELSE %][% IF ( virtualshelves ) %]
     var MSG_NO_RECORD_SELECTED = _("No item was selected");[% END %][% END %]
index 1872ff3..13a2c36 100644 (file)
@@ -400,10 +400,10 @@ function showLess() {
 function updateBasket(updated_value,target) {
        if(target){
        target.$('#basketcount').html("<span>"+updated_value+"</span>");
-       target.$('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
+    target.$('#cartDetails').html(MSG_IN_YOUR_CART+updated_value);
        } else {
        $('#basketcount').html("<span>"+updated_value+"</span>");
-       $('#cartDetails').html(_("Your cart contains ")+updated_value+_(" items"));
+    $('#cartDetails').html(MSG_IN_YOUR_CART+updated_value);
        }
        var basketcount = updated_value;
 }