[open-ils-commits] r7662 - trunk/Open-ILS/xul/staff_client/chrome/content/main

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 14 12:47:50 EDT 2007


Author: phasefx
Date: 2007-08-14 12:44:03 -0400 (Tue, 14 Aug 2007)
New Revision: 7662

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
Log:
tweaks to make this other implementation work; but need to re-test the original in light of the /server/xul/ <-> /xul/server/ mixup

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml	2007-08-14 16:31:30 UTC (rev 7661)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml	2007-08-14 16:44:03 UTC (rev 7662)
@@ -49,6 +49,9 @@
 						for (var i in props) {
 							this._props[i] = props[i];
 						}
+					} else {
+						var msg = "messageCatalog: No text from " + this.src;
+						alert(msg); throw(msg);
 					}
 					]]>
 				</body>
@@ -88,7 +91,7 @@
 						} while ( cont == true );
 
 						props[k] = v;
-			        }
+			        	}
 
 					return props;
 					]]>
@@ -102,7 +105,7 @@
 						try {
 							return this._props[key];
 						} catch(e) {
-							dump("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
+							alert("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
 							throw(e);
 						}
 					]]>
@@ -115,11 +118,12 @@
 				<body>
 					<![CDATA[
 						try {
-							var str = this._props[key];
-							var val = this.sprintf.apply(this,[ str ].concat(params));
+							var str = this._props[key]; if (!str) throw("messageCatalog: Failed to get string " + key + " in bundle.");
+							var these = [ str ].concat(params);
+							var val = this.sprintf.apply(this,these);
 							return val;
 						} catch(e) {
-							dump("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
+							alert("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
 							throw(e);
 						}
 					]]>
@@ -201,7 +205,7 @@
 							}
 
 							var a = arguments, i = 0, format = a[i++];
-							return format.replace(sprintf.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
+							return format.replace(this.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
 								if (substring == '%%') return '%';
 
 								// parse flags



More information about the open-ils-commits mailing list