[open-ils-commits] r9649 - in trunk/Open-ILS/xul/staff_client/server: cat locale/en-US

svn at svn.open-ils.org svn at svn.open-ils.org
Tue May 20 23:42:36 EDT 2008


Author: dbs
Date: 2008-05-20 23:42:34 -0400 (Tue, 20 May 2008)
New Revision: 9649

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/opac.xul
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
Log:
Patch from Craig Ricciuto:

opac.xul changes:
  * Finished converting JavaScript strings

cat.properties changes:
  * Added the strings from opac.xul


Modified: trunk/Open-ILS/xul/staff_client/server/cat/opac.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/opac.xul	2008-05-21 03:06:51 UTC (rev 9648)
+++ trunk/Open-ILS/xul/staff_client/server/cat/opac.xul	2008-05-21 03:42:34 UTC (rev 9649)
@@ -32,6 +32,8 @@
 	<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
 	<script>
 	<![CDATA[
+		function $(id) { return document.getElementById(id); }
+		function $w(id,text) { if ($(id)) util.widgets.set_text($(id),text); }
 
 		var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame; 
 		var browser_frame; var browser_obj; var browser_win;
@@ -44,7 +46,7 @@
 		function my_init() {
 			try {
 				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+					if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
 				JSAN.errorLevel = "die"; // none, warn, or die
 				JSAN.addRepository('/xul/server/');
 				JSAN.use('util.error'); g.error = new util.error();
@@ -66,8 +68,7 @@
 				set_opac();
 
 			} catch(E) {
-				var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-					"system administrator or software developer the following:\ncat/opac.xul\n" + E + '\n';
+				var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/opac.xul', E]);
 				try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
 				alert(err_msg);
 			}
@@ -126,10 +127,10 @@
 									if (typeof r.ilsevent != 'undefined') {
 										throw(r);
 									} else {
-										alert('Record successfully saved.');
+										alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.alert') );
 									}
 								} catch(E) {
-										g.error.standard_unexpected_error_alert('Record not likely updated.',E);
+										g.error.standard_unexpected_error_alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.std_unexpected_error'), E );
 								}
 							}
 						},
@@ -320,10 +321,14 @@
 		}
 
 		function refresh() {
-			alert('Not yet implemented.  Work around: Choose Duplicate in New Tab option');
+			alert( $("catStrings").getString('staff.cat.opac.refresh.function_not_implemented.alert') );
 		}
 	]]>
 	</script>
+	
+	<messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+	<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+	<messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
 
 	<commandset><command id="cmd_forward"/><command id="cmd_back"/></commandset>
 

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties	2008-05-21 03:06:51 UTC (rev 9648)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties	2008-05-21 03:42:34 UTC (rev 9649)
@@ -193,3 +193,6 @@
 staff.cat.marc_new.retrieving.label=Retrieving title...
 staff.cat.marc_new.creating_record.error=Error creating MARC record.
 staff.cat.marc_new.loading_template.error=Error loading MARC template: %1$s
+staff.cat.opac.set_marc_edit.alert=Record successfully saved.
+staff.cat.opac.set_marc_edit.std_unexpected_error=Record not likely updated.
+staff.cat.opac.refresh.function_not_implemented.alert=Not yet implemented.  Work around: Choose Duplicate in New Tab option



More information about the open-ils-commits mailing list