From 91733933af7de14223e7ce1e77d5343042b9471c Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 4 Feb 2008 18:17:10 +0000 Subject: [PATCH] Bring i18n to JSAN error messages 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 | 6 +++--- Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/main/JSAN.js b/Open-ILS/xul/staff_client/chrome/content/main/JSAN.js index 9d778fcbcd..e75030b6c0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/JSAN.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/JSAN.js @@ -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; } }; diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index 4dba3852f7..94b21b3d5e 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -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 -- 2.11.0