From: dbs Date: Tue, 5 Feb 2008 03:44:01 +0000 (+0000) Subject: Correct common.error vs. common.exception mistake, plus a bit more i18n X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1b052844589451c330d34d0e5b30641f0ca79bc4;p=Evergreen.git Correct common.error vs. common.exception mistake, plus a bit more i18n git-svn-id: svn://svn.open-ils.org/ILS/trunk@8625 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.js b/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.js index 1892e1e20a..a877f0c695 100644 --- a/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.js +++ b/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.js @@ -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 diff --git a/Open-ILS/xul/staff_client/chrome/content/main/main.js b/Open-ILS/xul/staff_client/chrome/content/main/main.js index 35a141c02f..4cb92ab1fb 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.js @@ -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); } diff --git a/Open-ILS/xul/staff_client/chrome/content/main/simple_auth.xul b/Open-ILS/xul/staff_client/chrome/content/main/simple_auth.xul index 96681b9878..3e58946dca 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/simple_auth.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/simple_auth.xul @@ -1,6 +1,9 @@ + @@ -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); }