Bug 8232: Comments in OPAC contain untranslatable javascript messages
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 11 Jun 2012 14:09:00 +0000 (15:09 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 20 Jun 2012 09:08:02 +0000 (11:08 +0200)
To test:
- add a new comment to a record in the OPAC
- Your comment (preview, pending approval) is not translatable
- update po files by running 'perl translate update <language>'
- Open po file and check if strings are there, translate
- install language again by running 'perl translate install <language>'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt

index d140285..92bdc87 100644 (file)
@@ -9,7 +9,7 @@
                var inject_old = function(comment) {
                        [% IF ( reviewid ) %]
                        [% IF ( cgi_debug ) %]alert(_('injecting OLD comment: ')+comment);[% END %]
-            parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html("Your edited comment (preview, pending approval)");
+            parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html(_("Your edited comment (preview, pending approval)"));
                        parent.opener.$('#c[% reviewid %] p').html(comment);
                        parent.opener.$('#c[% reviewid %] p').append("<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber | uri %]&amp;reviewid=[% reviewid | uri%]\');\">Edit<\/a>");
                        [% END %]
@@ -19,7 +19,7 @@
                        [% IF ( cgi_debug ) %]alert(_("injecting NEW comment: ") +comment);[% END %]
                        parent.opener.$('#newcomment').attr("class","yours");
                        parent.opener.$('#newcomment').html(
-                "<h5>Your comment (preview, pending approval)<\/h5>" +
+                "<h5>" + _("Your comment (preview, pending approval)") + "<\/h5>" +
                                "<p>"+comment+"<\/p>" +
                                "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber |uri%]\');\">Edit<\/a><\/p>"
                        );