[open-ils-commits] r11007 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/cat xul/staff_client/server/locale/en-US xul/staff_client/server/patron

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Oct 31 07:42:40 EDT 2008


Author: dbs
Date: 2008-10-31 07:42:39 -0400 (Fri, 31 Oct 2008)
New Revision: 11007

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul
   trunk/Open-ILS/xul/staff_client/server/cat/marc_new.xul
   trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
   trunk/Open-ILS/xul/staff_client/server/cat/volume_editor.xul
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
   trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
   trunk/Open-ILS/xul/staff_client/server/patron/bill_check_info.xul
   trunk/Open-ILS/xul/staff_client/server/patron/hold_notices.xul
   trunk/Open-ILS/xul/staff_client/server/patron/user_buckets.xul
Log:
Convert a few strings to entities or JS properties that had hitherto escaped our notice

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2008-10-31 11:42:39 UTC (rev 11007)
@@ -1889,6 +1889,7 @@
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_transfer_to_volume.label "Transfer to Specific Volume">
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_batch_copy_edit.label "Edit Item Attributes">
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_batch_copy_delete.label "Delete All from Catalog">
+<!ENTITY staff.cat.copy_buckets_quick.title "Add to Bucket">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.label "Item Buckets">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.add_to_bucket.label "Add to Selected Bucket">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.add_to_bucket.accesskey "A">
@@ -1968,6 +1969,7 @@
 <!ENTITY staff.cat.opac.menuitem.refreshinterfaces.label "Refresh All Interfaces">
 <!ENTITY staff.cat.opac.menuitem.dupnewtab.label "Duplicate in New Tab">
 <!ENTITY staff.cat.opac.menuitem.removeframe.label "Remove this Frame">
+<!ENTITY staff.cat.record_buckets.title "Record Buckets">
 <!ENTITY staff.cat.record_buckets_overlay.record_query_tab.label "Record Query">
 <!ENTITY staff.cat.record_buckets_overlay.record_query_tab.accesskey "Q">
 <!ENTITY staff.cat.record_buckets_overlay.pending_records_tab.label "Pending Records">
@@ -2067,6 +2069,7 @@
 <!ENTITY staff.cat.volume_copy_creator.create.accesskey "C">
 <!ENTITY staff.cat.volume_copy_creator.library_label.value "Library">
 <!ENTITY staff.cat.volume_copy_creator.num_of_volumes_label.value "# of volumes">
+<!ENTITY staff.cat.volume_editor.title "Volumes">
 <!ENTITY staff.cat.volume_editor.caption.label "Volume Editor">
 <!ENTITY staff.cat.volume_editor.modify.label "Modify">
 <!ENTITY staff.cat.volume_editor.cancel.label "Cancel">
@@ -2108,6 +2111,7 @@
 <!ENTITY staff.pat.barcode_entry.submit_btn.label "Submit">
 <!ENTITY staff.pat.barcode_entry.submit_btn.accesskey "S">
 <!ENTITY staff.pat.barcode_entry.retrieving.label "Retrieving...">
+<!ENTITY staff.patron.bill_cc_info.title "Credit Card Information">
 <!ENTITY staff.patron.bill_cc_info.visa.label "Visa">
 <!ENTITY staff.patron.bill_cc_info.mastercard.label "Mastercard">
 <!ENTITY staff.patron.bill_cc_info.american_express.label "American Express">
@@ -2125,6 +2129,8 @@
 <!ENTITY staff.patron.bill_cc_info.info.label "Credit Card Info">
 <!ENTITY staff.patron.bill_cc_info.type.label "Credit Card Type">
 <!-- "Check" is used here to indicate a payment by check, not "Verify" -->
+<!ENTITY staff.patron.bill_check_info.title "Check Info">
+<!-- "Check" is used here to indicate a payment by check, not "Verify" -->
 <!ENTITY staff.patron.bill_check_info.check_info.label "Check Information">
 <!-- "Check" is used here to indicate a payment by check, not "Verify" -->
 <!ENTITY staff.patron.bill_check_info.check_number.value "Check Number">
@@ -2232,6 +2238,7 @@
 <!ENTITY staff.patron.bills_overlay.unselected.value "Un-Selected:">
 <!ENTITY staff.patron.bills_overlay.voided.value "Voided:">
 <!ENTITY staff.patron.bills_overlay.auto_print.label "Auto-Print">
+<!ENTITY staff.patron.hold_notices.title "Hold Notices">
 <!ENTITY staff.patron.hold_notices.add_record_notification.label "Add Record of Notification">
 <!ENTITY staff.patron.hold_notices.add_record_notification.accesskey "A">
 <!ENTITY staff.patron.hold_notices.close_window.label "Close">

Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -22,7 +22,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="copy_buckets_win" title="Add to Bucket"
+<window id="copy_buckets_win" title="&staff.cat.copy_buckets_quick.title;"
 	onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" persist="height,width"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 

Modified: trunk/Open-ILS/xul/staff_client/server/cat/marc_new.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marc_new.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marc_new.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -35,14 +35,19 @@
 	<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
 	<script>
 	<![CDATA[
+		var catStrings;
 
 		function $(id) { return document.getElementById(id); }
 
 		function my_init() {
 			try {
 				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+				/* load translatable strings for cataloging interfaces */
+                catStrings = document.getElementById('catStrings');
+
 				if (typeof JSAN == 'undefined') { 
-					throw( document.getElementById('commonStrings').getString('common.jsan.missing') );
+					throw( $('commonStrings').getString('common.jsan.missing') );
 				}
 				JSAN.errorLevel = "die"; // none, warn, or die
 				JSAN.addRepository('/xul/server/');
@@ -50,7 +55,7 @@
 				g.error.sdump('D_TRACE','my_init() for example_template.xul');
 
 				if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-					try { window.xulG.set_tab_name('MARC Template'); } catch(E) { alert(E); }
+					try { window.xulG.set_tab_name(catStrings.getString('staff.cat.marc_new.tab_name')); } catch(E) { alert(E); }
 				}
 
 				JSAN.use('util.network'); g.network = new util.network();
@@ -87,15 +92,15 @@
 							var params = {
 								'record' : { 'marc' : marc },
 								'save' : {
-									'label' : $('catStrings').getString('staff.cat.marc_new.create_record.label'),
+									'label' : catStrings.getString('staff.cat.marc_new.create_record.label'),
 									'func' : function(new_marcxml) {
 										try {
 											var robj = g.network.simple_request(
 												'MARC_XML_RECORD_IMPORT',
-												[ ses(), new_marcxml, $('catStrings').getString('staff.cat.marc_new.system_local.label'), 1 ]
+												[ ses(), new_marcxml, catStrings.getString('staff.cat.marc_new.system_local.label'), 1 ]
 											);
 											if (typeof robj.ilsevent != 'undefined') throw(robj);
-											alert($('catStrings').getString('staff.cat.marc_new.record_created.label'));
+											alert(catStrings.getString('staff.cat.marc_new.record_created.label'));
 
 											/* Replace tab with OPAC-view of record */
 
@@ -107,13 +112,13 @@
 											};
 											xulG.set_tab(
 												xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
-												{'tab_name': $('catStrings').getString('staff.cat.marc_new.retrieving.label')},
+												{'tab_name': catStrings.getString('staff.cat.marc_new.retrieving.label')},
 												content_params
 											);
 
 										} catch(E) {
 											g.error.standard_unexpected_error_alert(
-												$('catStrings').getString('staff.cat.marc_new.creating_record.error'), E
+												catStrings.getString('staff.cat.marc_new.creating_record.error'), E
 											);
 										}
 									}
@@ -130,7 +135,7 @@
 
 						} catch(E) {
 							g.error.standard_unexpected_error_alert(
-								$('catStrings').getFormattedString('staff.cat.marc_new.loading_template.error', [template_name]), E
+								catStrings.getFormattedString('staff.cat.marc_new.loading_template.error', [template_name]), E
 							);
 						}
 

Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 <?xul-overlay href="/xul/server/cat/record_buckets_overlay.xul"?>
 
-<window id="record_buckets_win" title="Record Buckets"
+<window id="record_buckets_win" title="&staff.cat.record_buckets.title;"
 	onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" height="300" width="300" persist="height,width"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
@@ -41,9 +41,12 @@
 				/* ugly hack so we don't have to upgrade the chrome for quick buckets */
 				if (typeof xulG == 'undefined') location.href = String(location.href).replace(/record_buckets.xul/,'record_buckets_quick.xul');
 
+				/* load translatable strings into easily referenced variables */
                 catStrings = document.getElementById('catStrings');
-                if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
+                commonStrings = document.getElementById('commonStrings');
 
+                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();
@@ -68,11 +71,11 @@
 				);
 	
 				if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-					try { window.xulG.set_tab_name('Record Buckets'); } catch(E) { alert(E); }
+					try { window.xulG.set_tab_name(catStrings.getString('staff.cat.record_buckets.tab_name')); } catch(E) { alert(E); }
 				}
 
 			} catch(E) {
-				var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/record_buckets.xul', E]);
+				var err_msg = commonStrings.getFormattedString('common.exception', ['cat/record_buckets.xul', E]);
 				try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
 				alert(err_msg);
 			}

Modified: trunk/Open-ILS/xul/staff_client/server/cat/volume_editor.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/volume_editor.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/cat/volume_editor.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -20,7 +20,7 @@
 
 <window id="cat_volume_editor_win" 
 	onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
-	title="Volumes" height="400" width="300" persist="height,width"
+	title="&staff.cat.volume_editor.title;" height="400" width="300" persist="height,width"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 	<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

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-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties	2008-10-31 11:42:39 UTC (rev 11007)
@@ -229,6 +229,7 @@
 staff.cat.marcedit.not_authority_field.label=Not a controlled subfield
 staff.cat.marcedit.apply_selected.label=Apply Selected
 staff.cat.marcedit.no_authority_match.label=No matching authority records found
+staff.cat.marc_new.tab_name=MARC Template
 staff.cat.marc_new.create_record.label=Create Record
 staff.cat.marc_new.system_local.label=System Local
 staff.cat.marc_new.record_created.label=Record created.
@@ -239,6 +240,7 @@
 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
 staff.cat.opac.set_tab_name=Record: %1$s
+staff.cat.record_buckets.tab_name=Record Buckets
 staff.cat.record_buckets.save_file_as=Save File As
 staff.cat.record_buckets.export_records.alert=File not downloaded.
 staff.cat.record_buckets.export_records.std_unexpected_error=Records could not be exported.

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties	2008-10-31 11:42:39 UTC (rev 11007)
@@ -244,6 +244,7 @@
 staff.patron.ue.uEditInit.session_no_defined=User session is not defined
 staff.patron.ue.uEditSaveuser.error_creating_note=Error creating patron guardian or parent note
 staff.patron.ue.uEditShowSearch.search=Search would be:\n%1$s
+staff.patron.user_buckets.tab_name=User Buckets
 staff.patron.user_edit.save_user.depth_required=Depth is required on the %1$s permission.
 staff.patron.user_edit.save_user.user_modified_successfully=User %1$s [%2$s] successfully modified.\n%3$s permissions and %4$s work locations updated.
 staff.patron.user_edit.display_perm.select_one=-- Select One --

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -19,7 +19,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="patron_bill" title="CC Info"
+<window id="patron_bill" title="&staff.patron.bill_cc_info.title;"
 	orient="vertical" style="overflow: auto"
 	onload="try{info_init(); font_helper();}catch(E){alert(E);}"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_check_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_check_info.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_check_info.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -19,7 +19,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="patron_bill" title="Check Info"
+<window id="patron_bill" title="&staff.patron.bill_check_info.title;"
 	orient="vertical" style="overflow: auto"
 	onload="try{info_init(); font_helper();}catch(E){alert(E);}"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

Modified: trunk/Open-ILS/xul/staff_client/server/patron/hold_notices.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/hold_notices.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/patron/hold_notices.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="hold_notices_win" width="700" height="550" persist="sizemode width height"
-	onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }" title="Hold Notices"
+	onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }" title="&staff.patron.hold_notices.title;"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 	<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

Modified: trunk/Open-ILS/xul/staff_client/server/patron/user_buckets.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/user_buckets.xul	2008-10-31 02:41:57 UTC (rev 11006)
+++ trunk/Open-ILS/xul/staff_client/server/patron/user_buckets.xul	2008-10-31 11:42:39 UTC (rev 11007)
@@ -32,11 +32,17 @@
 	<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
 	<script>
 	<![CDATA[
+		var patronStrings;
+
 		function $(id) { return document.getElementById(id); }
 		
 		function my_init() {
 			try {
 				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+				/* load translatable strings for patron interfaces */
+                patronStrings = document.getElementById('patronStrings');
+
 				if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
 				JSAN.errorLevel = "die"; // none, warn, or die
 				JSAN.addRepository('/xul/server/');
@@ -44,7 +50,7 @@
 				g.error.sdump('D_TRACE','my_init() for patron/user_buckets.xul');
 
 				if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-					try { window.xulG.set_tab_name('User Buckets'); } catch(E) { alert(E); }
+					try { window.xulG.set_tab_name(patronStrings.getString('staff.patron.user_buckets.tab_name')); } catch(E) { alert(E); }
 				}
 
 			} catch(E) {



More information about the open-ils-commits mailing list