Bug 11304: fix display of detail page holdings tab in translated Bootstrap theme
authorFrédéric Demians <f.demians@tamil.fr>
Tue, 26 Nov 2013 10:26:54 +0000 (11:26 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 27 Nov 2013 16:52:02 +0000 (16:52 +0000)
Detail page tabs are not displayed properly because JavaScript is broken
in French. This is due to _(' JS string construction used in place of
_(".

This patch fixes:

  - opac-detail.tt page
  - xt/single_quotes to test bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested by applying the patch, running translate update, then translate
install. Saw no JavaScript error on the French detail page.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switches from single to double quotes for translatatable strings.
Unit tests for xt/single_quotes passes now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
xt/single_quotes.t

index 8b7cfdd..867cb74 100644 (file)
               }, function (data) {
 
                 if (data.auth_status != 'ok') {
-                  window.alert(_('Your CGI session cookie is not current. Please refresh the page and try again.'));
+                  window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again."));
                 } else {
                   $("#rating_value").val(data.rating_value);
 
                   if (data.rating_value) {
-                    $("#rating_value_text").text(_('your rating: ') + data.rating_value + ', ');
+                    $("#rating_value_text").text(_("your rating: ") + data.rating_value + ", ");
                   } else {
                     $("#rating_value_text").text('');
                   }
 
-                  $("#rating_text").text(_('average rating: ') + data.rating_avg_int + ' (' + data.rating_total + ' ' + _("votes") + ')');
+                  $("#rating_text").text(_("average rating: ") + data.rating_avg_int + " (" + data.rating_total + ' ' + _("votes") + ")");
 
                 }
               }, "json");
index b123a6d..89b539c 100755 (executable)
@@ -28,8 +28,11 @@ find(
         open my $fh, $_ or die "Could not open $_: $!";
         my @lines = sort grep /\_\(\'/, <$fh>;
         push @files, { name => "$_", lines => \@lines } if @lines;
-    },
-    ( "./koha-tmpl/opac-tmpl/prog/en", "./koha-tmpl/intranet-tmpl/prog/en" )
+    },qw#
+    ./koha-tmpl/opac-tmpl/prog/en
+    ./koha-tmpl/opac-tmpl/bootstrap/en
+    ./koha-tmpl/intranet-tmpl/prog/en
+    #
 );
 
 ok( !@files, "Files do not contain single quotes _(' " )