BUG 4499: Javascript error messages not translatable
authorKatrin Fischer <katrin.fischer.83@web.de>
Thu, 13 May 2010 21:30:22 +0000 (23:30 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 16 May 2010 20:36:26 +0000 (08:36 +1200)
- Administration > Patron categories > New Category (category.tmpl)
- Circulation > Checkouts > Toolbar (all tabs except Check out) (members-toolbar.inc)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl

index 7e5bb6c..5015289 100644 (file)
@@ -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" -->';
     }
index faacf1b..2c1f022 100644 (file)
        // 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){