Bring i18n to JSAN error messages
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Feb 2008 18:17:10 +0000 (18:17 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Feb 2008 18:17:10 +0000 (18:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8609 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/JSAN.js
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties

index 9d778fc..e75030b 100644 (file)
@@ -246,7 +246,7 @@ JSAN._createScript = function (js, pkg) {
     try {
         return JSAN._makeNamespace(js, pkg);
     } catch (e) {
-        JSAN._handleError("Could not create namespace[" + pkg + "]: " + e);
+        JSAN._handleError(document.getElementById('offlineStrings').getFormattedString('jsan.namespace.creation.error', [pkg, e]));
     }
     return null;
 }
@@ -276,11 +276,11 @@ JSAN.Request.prototype = {
             if (this._req.status == 200 || this._req.status == 0)
                 return this._req.responseText;
         } catch (e) {
-            JSAN._handleError("File not found: " + url);
+            JSAN._handleError(document.getElementById('offlineStrings').getFormattedString('jsan.file_not_found.error', [url]));
             return null;
         };
 
-        JSAN._handleError("File not found: " + url);
+        JSAN._handleError(document.getElementById('offlineStrings').getFormattedString('jsan.file_not_found.error', [url]));
         return null;
     }
 };
index 4dba385..94b21b3 100644 (file)
@@ -68,3 +68,5 @@ circ.offline_register.missing.profile.list=Missing profile list.
 circ.offline_register.missing.id.type.list=Missing identification type list.
 circ.offline_register.missing.required.surveys=Missing required surveys.
 circ.offline_register.missing.files.error=ERROR: Offline patron registration requires some server-generated files.  Please login periodically to retrieve these files.
+jsan.file_not_found.error=File not found: %1$s
+jsan.namespace.creation.error=Could not create namespace[%1$s]: %2$s