Correct common.error vs. common.exception mistake, plus a bit more i18n
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Feb 2008 03:44:01 +0000 (03:44 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Feb 2008 03:44:01 +0000 (03:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8625 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.js
Open-ILS/xul/staff_client/chrome/content/main/main.js
Open-ILS/xul/staff_client/chrome/content/main/simple_auth.xul

index 1892e1e..a877f0c 100644 (file)
@@ -1,5 +1,7 @@
+var offlineStrings;
 function my_init() {
        try {
+               offlineStrings = $('offlineStrings');
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
                JSAN.errorLevel = "die"; // none, warn, or die
index 35a141c..4cb92ab 100644 (file)
@@ -264,7 +264,7 @@ function main_init() {
                }
 
        } catch(E) {
-               var error = offlineStrings.getFormattedString('common.error', [E, '']);
+               var error = offlineStrings.getFormattedString('common.exception', [E, '']);
                try { G.error.sdump('D_ERROR',error); } catch(E) { dump(error); }
                alert(error);
        }
index 96681b9..3e58946 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version="1.0"?>
 <!-- Application: Evergreen Staff Client -->
 <!-- Screen: Example Template for remote xul -->
+<!--
+ vim:noet:sw=4:ts=4:
+-->
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- STYLESHEETS -->
@@ -35,7 +38,9 @@
                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( offlineStrings.getString('common.jsan.missing'));
+                               }
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
                                JSAN.use('util.error'); g.error = new util.error();
@@ -63,8 +68,7 @@
                                $('password').addEventListener('keypress',handle_keypress,false);
 
                        } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\nquick_auth.xul\n" + E + '\n';
+                               var err_msg =  offlineStrings.getFormattedString('common.exception', ['simple_auth.xul', E]);
                                try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
                                alert(err_msg);
                        }