[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters aqbookfund.tmpl,1.21,1.22 aqbudget.tmpl,1.22,1.23 categorie.tmpl,1.16,1.17 categoryitem.tmpl,1.9,1.10 currency.tmpl,1.9,1.10 itemtypes.tmpl,1.15,1.16 marctagstructure.tmpl,1.21,1.22 printers.tmpl,1.10,1.11 stopwords.tmpl,1.12,1.13 systempreferences.tmpl,1.22,1.23 z3950servers.tmpl,1.13,1.14

Ambrose C. LI acli at users.sourceforge.net
Wed Mar 10 08:38:08 CET 2004


Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24207/parameters

Modified Files:
	aqbookfund.tmpl aqbudget.tmpl categorie.tmpl categoryitem.tmpl 
	currency.tmpl itemtypes.tmpl marctagstructure.tmpl 
	printers.tmpl stopwords.tmpl systempreferences.tmpl 
	z3950servers.tmpl 
Log Message:
JavaScript changes to make tmpl_process3 recognize translatable strings.
Note: This may break things!


Index: aqbookfund.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/aqbookfund.tmpl,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** aqbookfund.tmpl	20 Feb 2004 03:01:21 -0000	1.21
--- aqbookfund.tmpl	10 Mar 2004 07:38:05 -0000	1.22
***************
*** 49,52 ****
--- 49,53 ----
  <!-- TMPL_IF name="add_form" -->
  <script>
+ 	function _(s) { return s } // dummy function for gettext
  	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  	function isNotNull(f,noalert) {
***************
*** 86,99 ****
  		var alertString2;
  		if (f.bookfundid.value.length==0) {
! 			_alertString += "- bookfundid missing\n";
  		}
  		if (f.bookfundname.value.length==0) {
! 			_alertString += "- bookfundname missing\n";
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2 = "Form not submitted because of the following problem(s)\n";
! 			alertString2 += "------------------------------------------------------------------------------------\n\n";
  			alertString2 += _alertString;
  			alert(alertString2);
--- 87,100 ----
  		var alertString2;
  		if (f.bookfundid.value.length==0) {
! 			_alertString += "\n- " + _("bookfundid missing";
  		}
  		if (f.bookfundname.value.length==0) {
! 			_alertString += "\n- " + _("bookfundname missing");
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2  = _("Form not submitted because of the following problem(s)");
! 			alertString2 += "\n------------------------------------------------------------------------------------\n";
  			alertString2 += _alertString;
  			alert(alertString2);

Index: aqbudget.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/aqbudget.tmpl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** aqbudget.tmpl	20 Feb 2004 03:01:21 -0000	1.22
--- aqbudget.tmpl	10 Mar 2004 07:38:05 -0000	1.23
***************
*** 28,31 ****
--- 28,32 ----
  <!-- TMPL_IF name="add_form" -->
  <script>
+ 	function _(s) { return s } // dummy function for gettext
  	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  	function isNotNull(f,noalert) {
***************
*** 65,75 ****
  		var alertString2;
  		if (!(isNotNull(window.document.Aform.budgetamount,1))) {
! 			_alertString += "- Budget missing\n";
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2 = "Form not submitted because of the following problem(s)\n";
! 			alertString2 += "------------------------------------------------------------------------------------\n\n";
  			alertString2 += _alertString;
  			alert(alertString2);
--- 66,76 ----
  		var alertString2;
  		if (!(isNotNull(window.document.Aform.budgetamount,1))) {
! 			_alertString += "\n- " + _("Budget missing");
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2  = _("Form not submitted because of the following problem(s)");
! 			alertString2 += "\n------------------------------------------------------------------------------------\n";
  			alertString2 += _alertString;
  			alert(alertString2);

Index: categorie.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/categorie.tmpl,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** categorie.tmpl	11 Feb 2004 09:02:55 -0000	1.16
--- categorie.tmpl	10 Mar 2004 07:38:05 -0000	1.17
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
  	<script>
+ 	function _(s) { return s } // dummy function for gettext
  	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  	function isNotNull(f,noalert) {
***************
*** 40,57 ****
  		var alertString2;
  		if (f.categorycode.value.length==0) {
! 			_alertString += "- categorycode missing\n";
  		}
  //		alert(window.document.Aform.description.value);
  		if (!(isNotNull(window.document.Aform.description,1))) {
! 			_alertString += "- description missing\n";
  		}
  		if (!isNum(f.upperagelimit,0)) {
! 			_alertString += "- upperagelimit is not a number\n";
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2 = "Form not submitted because of the following problem(s)\n";
! 			alertString2 += "------------------------------------------------------------------------------------\n\n";
  			alertString2 += _alertString;
  			alert(alertString2);
--- 41,58 ----
  		var alertString2;
  		if (f.categorycode.value.length==0) {
! 			_alertString += "\n- " + _("categorycode missing");
  		}
  //		alert(window.document.Aform.description.value);
  		if (!(isNotNull(window.document.Aform.description,1))) {
! 			_alertString += "\n- " + _("description missing");
  		}
  		if (!isNum(f.upperagelimit,0)) {
! 			_alertString += "\n- " + _("upperagelimit is not a number");
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2  = _("Form not submitted because of the following problem(s)");
! 			alertString2 += "\n------------------------------------------------------------------------------------\n";
  			alertString2 += _alertString;
  			alert(alertString2);

Index: categoryitem.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/categoryitem.tmpl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** categoryitem.tmpl	20 Feb 2004 02:49:27 -0000	1.9
--- categoryitem.tmpl	10 Mar 2004 07:38:05 -0000	1.10
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
          <script>
+ 	function _(s) { return s } // dummy function for gettext
          /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
          function isNotNull(f,noalert) {
***************
*** 40,57 ****
                  var alertString2;
                  if (f.categorycode.value.length==0) {
!                         _alertString += "- categorycode missing\n";
                  }
  //              alert(window.document.Aform.description.value);
                  if (!(isNotNull(window.document.Aform.description,1))) {
!                         _alertString += "- description missing\n";
                  }
                  if (!isNum(f.upperagelimit,0)) {
!                         _alertString += "- upperagelimit is not a number\n";
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2 = "Form not submitted because of the following problem(s)\n";
!                         alertString2 += "------------------------------------------------------------------------------------\n\n";
                          alertString2 += _alertString;
                  }
--- 41,58 ----
                  var alertString2;
                  if (f.categorycode.value.length==0) {
!                         _alertString += "\n- " + _("categorycode missing");
                  }
  //              alert(window.document.Aform.description.value);
                  if (!(isNotNull(window.document.Aform.description,1))) {
!                         _alertString += "\n- " + _("description missing");
                  }
                  if (!isNum(f.upperagelimit,0)) {
!                         _alertString += "\n- " + _("upperagelimit is not a number");
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2  = _("Form not submitted because of the following problem(s)");
!                         alertString2 += "\n------------------------------------------------------------------------------------\n";
                          alertString2 += _alertString;
                  }

Index: currency.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/currency.tmpl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** currency.tmpl	25 Feb 2004 19:49:01 -0000	1.9
--- currency.tmpl	10 Mar 2004 07:38:05 -0000	1.10
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
          <script>
+ 	function _(s) { return s } // dummy function for gettext
          /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
          function isNotNull(f,noalert) {
***************
*** 40,53 ****
                  var alertString2;
                  if (f.currency.value.length==0) {
!                         _alertString += "- Currency name missing\\n";
                  }
                  if (f.rate.value.length==0) {
!                         _alertString += "- Rate missing\\n";
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2 = "Form not submitted because of the following problem(s)\\n";
!                         alertString2 += "------------------------------------------------------------------------------------\\n\\n";
                          alertString2 += _alertString;
                          alert(alertString2);
--- 41,54 ----
                  var alertString2;
                  if (f.currency.value.length==0) {
!                         _alertString += "\n- " + _("Currency name missing");
                  }
                  if (f.rate.value.length==0) {
!                         _alertString += "\n- " + _("Rate missing");
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2  = _("Form not submitted because of the following problem(s)");
!                         alertString2 += "\n------------------------------------------------------------------------------------\n";
                          alertString2 += _alertString;
                          alert(alertString2);

Index: itemtypes.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/itemtypes.tmpl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** itemtypes.tmpl	11 Feb 2004 09:02:55 -0000	1.15
--- itemtypes.tmpl	10 Mar 2004 07:38:05 -0000	1.16
***************
*** 2,5 ****
--- 2,6 ----
  
  <script>
+ function _(s) { return s } // dummy function for gettext
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  function isNotNull(f,noalert) {
***************
*** 39,58 ****
  	var alertString2;
  	if (f.itemtype.value.length==0) {
! 		_alertString += "- Itemtype missing\n";
  	}
  	if (!(isNotNull(window.document.Aform.description,1))) {
! 		_alertString += "- Description missing\n";
  	}
  	if ((!isNum(f.loanlength,0)) && f.loanlength.value.length > 0) {
! 		_alertString += "- Loan length is not a number\n";
  	}
  	if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
! 		_alertString += "- Rental charge is not a number\n";
  	}
  	if (_alertString.length==0) {
  		document.Aform.submit();
  	} else {
! 		alertString2 = "Form not submitted because of the following problem(s)\n";
! 		alertString2 += "------------------------------------------------------------------------------------\n\n";
  		alertString2 += _alertString;
  		alert(alertString2);
--- 40,59 ----
  	var alertString2;
  	if (f.itemtype.value.length==0) {
! 		_alertString += "\n- " + _("Itemtype missing");
  	}
  	if (!(isNotNull(window.document.Aform.description,1))) {
! 		_alertString += "\n- " + _("Description missing");
  	}
  	if ((!isNum(f.loanlength,0)) && f.loanlength.value.length > 0) {
! 		_alertString += "\n- " + _("Loan length is not a number");
  	}
  	if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
! 		_alertString += "\n- " + _("Rental charge is not a number");
  	}
  	if (_alertString.length==0) {
  		document.Aform.submit();
  	} else {
! 		alertString2  = _("Form not submitted because of the following problem(s)");
! 		alertString2 += "\n------------------------------------------------------------------------------------\n";
  		alertString2 += _alertString;
  		alert(alertString2);

Index: marctagstructure.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** marctagstructure.tmpl	20 Feb 2004 02:49:28 -0000	1.21
--- marctagstructure.tmpl	10 Mar 2004 07:38:05 -0000	1.22
***************
*** 2,5 ****
--- 2,6 ----
  
  <script>
+ 	function _(s) { return s } // dummy function for gettext
  	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  	function isNotNull(f,noalert) {
***************
*** 39,49 ****
  		var alertString2;
  		if (f.tagfield.value.length==0) {
! 			_alertString += "- tag number missing\n";
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2 = "Form not submitted because of the following problem(s)\n";
! 			alertString2 += "------------------------------------------------------------------------------------\n\n";
  			alertString2 += _alertString;
  			alert(alertString2);
--- 40,50 ----
  		var alertString2;
  		if (f.tagfield.value.length==0) {
! 			_alertString += "\n- " + _("tag number missing");
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2  = _("Form not submitted because of the following problem(s)");
! 			alertString2 += "\n------------------------------------------------------------------------------------\n";
  			alertString2 += _alertString;
  			alert(alertString2);

Index: printers.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/printers.tmpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** printers.tmpl	25 Feb 2004 19:49:46 -0000	1.10
--- printers.tmpl	10 Mar 2004 07:38:05 -0000	1.11
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
          <script>
+ 	function _(s) { return s } // dummy function for gettext
          /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
          function isNotNull(f,noalert) {
***************
*** 40,53 ****
                  var alertString2;
                  if (f.printername.value.length==0) {
!                         _alertString += "- printer name missing\n";
                  }
                  if (f.printqueue.value.length==0) {
!                         _alertString += "- Queue missing\n";
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2 = "Form not submitted because of the following problem(s)\n";
!                         alertString2 += "------------------------------------------------------------------------------------\n\n";
                          alertString2 += _alertString;
                          alert(alertString2);
--- 41,54 ----
                  var alertString2;
                  if (f.printername.value.length==0) {
!                         _alertString += "\n- " + _("printer name missing");
                  }
                  if (f.printqueue.value.length==0) {
!                         _alertString += "\n- " + _("Queue missing");
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2  = _("Form not submitted because of the following problem(s)");
!                         alertString2 += "\n------------------------------------------------------------------------------------\n";
                          alertString2 += _alertString;
                          alert(alertString2);

Index: stopwords.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/stopwords.tmpl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** stopwords.tmpl	25 Feb 2004 19:50:23 -0000	1.12
--- stopwords.tmpl	10 Mar 2004 07:38:05 -0000	1.13
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
          <script>
+ 	function _(s) { return s } // dummy function for gettext
          /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
          function isNotNull(f,noalert) {
***************
*** 40,50 ****
                  var alertString2;
                  if (f.word.value.length==0) {
!                         _alertString += "- word missing\n";
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2 = "Form not submitted because of the following problem(s)\n";
!                         alertString2 += "------------------------------------------------------------------------------------\n\n";
                          alertString2 += _alertString;
                          alert(alertString2);
--- 41,51 ----
                  var alertString2;
                  if (f.word.value.length==0) {
!                         _alertString += "\n- " + _("word missing");
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2  = _("Form not submitted because of the following problem(s)");
!                         alertString2 += "\n------------------------------------------------------------------------------------\n";
                          alertString2 += _alertString;
                          alert(alertString2);

Index: systempreferences.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/systempreferences.tmpl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** systempreferences.tmpl	11 Feb 2004 09:02:55 -0000	1.22
--- systempreferences.tmpl	10 Mar 2004 07:38:05 -0000	1.23
***************
*** 2,5 ****
--- 2,6 ----
  
  <script>
+  	function _(s) { return s } // dummy function for gettext
  	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  	function isNotNull(f,noalert) {
***************
*** 39,52 ****
  		var alertString2;
  		if (f.variable.value.length==0) {
! 			_alertString += "- variable missing\n";
  		}
  		if (f.value.value.length==0) {
! 			_alertString += "- value missing\n";
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2 = "Form not submitted because of the following problem(s)\n";
! 			alertString2 += "------------------------------------------------------------------------------------\n\n";
  			alertString2 += _alertString;
  			alert(alertString2);
--- 40,53 ----
  		var alertString2;
  		if (f.variable.value.length==0) {
! 			_alertString += "\n- " + _("variable missing");
  		}
  		if (f.value.value.length==0) {
! 			_alertString += "\n- " + _("value missing");
  		}
  		if (_alertString.length==0) {
  			document.Aform.submit();
  		} else {
! 			alertString2  = _("Form not submitted because of the following problem(s)");
! 			alertString2 += "\n------------------------------------------------------------------------------------\n";
  			alertString2 += _alertString;
  			alert(alertString2);

Index: z3950servers.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/z3950servers.tmpl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** z3950servers.tmpl	25 Feb 2004 19:51:08 -0000	1.13
--- z3950servers.tmpl	10 Mar 2004 07:38:05 -0000	1.14
***************
*** 3,6 ****
--- 3,7 ----
  <!-- TMPL_IF NAME=add_form -->
          <script>
+ 	function _(s) { return s } // dummy function for gettext
          /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
          function isNotNull(f,noalert) {
***************
*** 40,68 ****
                  var alertString2;
                  if (f.searchfield.value.length==0) {
!                         _alertString += "- site name missing\n";
                  }
                  if (f.host.value.length==0) {
!                         _alertString += "- host missing\n";
                  }
                  if (f.port.value.length==0) {
!                         _alertString += "- port missing\n";
                  }
                  if (f.db.value.length==0) {
!                         _alertString += "- database missing\n";
                  }
                  if (isNaN(f.port.value)) {
!                         _alertString += "- port must be a number\n";
                  }
                  if (isNaN(f.rank.value)) {
!                         _alertString += "- rank must be a number\n";
                  }
                  if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
!                         _alertString += "- checked must be 0 or 1\n";
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2 = "Form not submitted because of the following problem(s)\n";
!                         alertString2 += "------------------------------------------------------------------------------------\n\n";
                          alertString2 += _alertString;
                          alert(alertString2);
--- 41,69 ----
                  var alertString2;
                  if (f.searchfield.value.length==0) {
!                         _alertString += "\n- " + _("site name missing");
                  }
                  if (f.host.value.length==0) {
!                         _alertString += "\n- " + _("host missing");
                  }
                  if (f.port.value.length==0) {
!                         _alertString += "\n- " + _("port missing");
                  }
                  if (f.db.value.length==0) {
!                         _alertString += "\n- " + _("database missing");
                  }
                  if (isNaN(f.port.value)) {
!                         _alertString += "\n- " + _("port must be a number");
                  }
                  if (isNaN(f.rank.value)) {
!                         _alertString += "\n- " + _("rank must be a number");
                  }
                  if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
!                         _alertString += "\n- " + _("checked must be 0 or 1");
                  }
                  if (_alertString.length==0) {
                          document.Aform.submit();
                  } else {
!                         alertString2  = _("Form not submitted because of the following problem(s)");
!                         alertString2 += "\n------------------------------------------------------------------------------------\n";
                          alertString2 += _alertString;
                          alert(alertString2);





More information about the Koha-cvs mailing list