[open-ils-commits] r8591 - in trunk/Open-ILS/xul/staff_client/chrome: content/cat locale/en-US

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Feb 4 01:24:39 EST 2008


Author: dbs
Date: 2008-02-04 00:56:31 -0500 (Mon, 04 Feb 2008)
New Revision: 8591

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Log:
Complete i18n of chrome/cat/opac.js


Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2008-02-04 05:43:50 UTC (rev 8590)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2008-02-04 05:56:31 UTC (rev 8591)
@@ -5,7 +5,7 @@
 function my_init() {
 	try {
 		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-		if (typeof JSAN == 'undefined') { throw(document.getElementById('commonStrings').getString('common.jsan.missing')); }
+		if (typeof JSAN == 'undefined') { throw(document.getElementById('offlineStrings').getString('common.jsan.missing')); }
 		JSAN.errorLevel = "die"; // none, warn, or die
 		JSAN.addRepository('..');
 		JSAN.use('util.error'); g.error = new util.error();
@@ -28,7 +28,7 @@
 		set_opac();
 
 	} catch(E) {
-		var err_msg = document.getElementById("commonStrings").getFormattedString("common.exception", ["cat/opac.xul", E]);
+		var err_msg = document.getElementById("offlineStrings").getFormattedString("common.exception", ["cat/opac.xul", E]);
 		try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
 		alert(err_msg);
 	}
@@ -231,12 +231,19 @@
 }
 
 function delete_record() {
-	if (g.error.yns_alert('Are you sure you want to delete title record #' + docid + ' from the catalog?','Delete Record','Delete','Cancel',null,'Check here to confirm this action.') == 0) {
+	if (g.error.yns_alert(
+		document.getElementById('offlineStrings').getFormattedString('cat.opac.delete_record.confirm', [docid]),
+		document.getElementById('offlineStrings').getString('cat.opac.delete_record'),
+		document.getElementById('offlineStrings').getString('cat.opac.delete'),
+		document.getElementById('offlineStrings').getString('cat.opac.cancel'),
+		null,
+		document.getElementById('offlineStrings').getString('cat.opac.record_deleted.confirm')) == 0) {
 		var robj = g.network.simple_request('FM_BRE_DELETE',[ses(),docid]);
 		if (typeof robj.ilsevent != 'undefined') {
-			alert('Error deleting Record #' + docid + ' : ' + robj.textcode + ' : ' + robj.desc + '\n');
+			alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_deleted.error',  [docid, robj.textcode, robj.desc]) + '\n');
 		} else {
-			alert('Record deleted.'); refresh_display(docid,true);
+			alert(document.getElementById('offlineStrings').getString('cat.opac.record_deleted'));
+			refresh_display(docid,true);
 		}
 	}
 }

Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2008-02-04 05:43:50 UTC (rev 8590)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2008-02-04 05:56:31 UTC (rev 8591)
@@ -12,6 +12,14 @@
 common.barcode.status.warning.unknown=with an unknown code: %1$s
 common.date.invalid=Invalid Date
 cat.bib_record=Bib Record: %1$s
+cat.opac.delete_record.confirm=Are you sure you want to delete title record #%1$s from the catalog?
+cat.opac.delete_record=Delete Record
+cat.opac.delete=Delete
+cat.opac.cancel=Cancel
+cat.opac.record_deleted=Record deleted.
+cat.opac.record_deleted.confirm=Check here to confirm this action.
+# variables: document ID, error code, error description
+cat.opac.record_delete.error=Error deleting record #%1$s : %2$s : %3$s
 cat.save_record=Save Record
 cat.save.success=Record successfully saved.
 cat.save.failure=Record not likely updated.



More information about the open-ils-commits mailing list