[Koha-patches] BUG 4499: Javascript error messages not translatable

Katrin Fischer Katrin.Fischer.83 at web.de
Thu May 13 23:43:41 CEST 2010


 From 14f8a691aa0d9bce95ffded43c1639132a8a03e4 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83 at web.de>
Date: Thu, 13 May 2010 23:30:22 +0200
Subject: BUG 4499: Javascript error messages not translatable
Content-Type: text/plain; charset="utf-8"

- Administration > Patron categories > New Category (category.tmpl)
- Circulation > Checkouts > Toolbar (all tabs except Check out) 
(members-toolbar.inc)
---
  .../prog/en/includes/members-toolbar.inc           |    8 ++++----
  .../prog/en/modules/admin/categorie.tmpl           |   12 ++++++------
  2 files changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
index 7e5bb6c..5015289 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -1,15 +1,15 @@
-<div id="toolbar">
+<div id="toolbar">
<script type="text/javascript">
      //<![CDATA[

  function confirm_deletion() {
-    var is_confirmed = window.confirm('Are you sure you want to delete 
this patron? This cannot be undone.');
+    var is_confirmed = window.confirm(_('Are you sure you want to 
delete this patron? This cannot be undone.'));
      if (is_confirmed) {
              
window.location='/cgi-bin/koha/members/deletemem.pl?member=<!-- TMPL_VAR 
NAME="borrowernumber" -->';
      }
  }
  function confirm_updatechild() {
-    var is_confirmed = window.confirm('Are you sure you want to update 
this child to an Adult category?  This cannot be undone.');
+    var is_confirmed = window.confirm(_('Are you sure you want to 
update this child to an Adult category?  This cannot be undone.'));

      if (is_confirmed) {
              
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=<!-- 
TMPL_VAR NAME="borrowernumber" -->&catcode=<!-- TMPL_VAR NAME="catcode" 
-->&catcode_multi=<!-- TMPL_VAR NAME="CATCODE_MULTI" -->';
@@ -17,7 +17,7 @@ function confirm_updatechild() {
  }

  function confirm_reregistration() {
-    var is_confirmed = window.confirm('Are you sure you want to renew 
this patron\'s registration?');
+    var is_confirmed = window.confirm(_('Are you sure you want to renew 
this patron\'s registration?'));
      if (is_confirmed) {
      
window.location='/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=<!-- 
TMPL_VAR NAME="borrowernumber" -->';
      }
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
index faacf1b..2c1f022 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
@@ -41,23 +41,23 @@
      // to check if the data are correctly entered.
      function Check(ff) {
          var ok=0;
-        var _alertString="Form not submitted because of the following 
problem(s)\n";
-        _alertString 
+="-------------------------------------------------------------------\n\n";
+        var _alertString=_("Form not submitted because of the following 
problem(s)");
+        _alertString 
+="\n-------------------------------------------------------------------\n\n";
          if (ff.categorycode.value.length==0) {
              ok=1;
-            _alertString += "- categorycode missing\n";
+            _alertString += _("- categorycode missing") + "\n";
          }
          if (!(ff.category_type.value)){
              ok=1;
-            _alertString += "- category type missing\n";
+            _alertString += _("- category type missing") + "\n";
          }
          if (!(isNotNull(ff.description,1))) {
              ok=1;
-            _alertString += "- description missing\n";
+            _alertString += _("- description missing") + "\n";
          }
          if (!isNum(ff.upperagelimit,0) && ff.category_type.value=='C') {
              ok=1;
-              _alertString += "- upperagelimit is not a number\n";
+            _alertString += _("- upperagelimit is not a number") + "\n";

          }
          if(ff.enrolmentperioddate.value && ff.enrolmentperiod.value){
-- 
1.6.3.3

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-BUG-4499-Javascript-error-messages-not-translatable.patch
URL: </pipermail/koha-patches/attachments/20100513/c98740ca/attachment-0002.txt>


More information about the Koha-patches mailing list