From: dbs Date: Tue, 5 Feb 2008 04:30:59 +0000 (+0000) Subject: More i18n for chrome X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4dfa7b6fea1a1d93558937e3320b549a6492ddbc;p=Evergreen.git More i18n for chrome git-svn-id: svn://svn.open-ils.org/ILS/trunk@8626 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js index e55d4a27b5..dae269ded0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js @@ -27,7 +27,7 @@ removeCSSClass(document.documentElement,'ALL_FONTS_XX_LARGE'); addCSSClass(document.documentElement,data.global_font_adjust); } catch(E) { - alert("Error with adjusting the font size: " + E); + alert($('offlineStrings').getFormattedString('openils.global_util.font_size.error', [E])); } } @@ -42,16 +42,18 @@ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (frame && frame.contentWindow) { try { - if (typeof frame.contentWindow.wrappedJSObject != 'undefined') return frame.contentWindow.wrappedJSObject; + if (typeof frame.contentWindow.wrappedJSObject != 'undefined') { + return frame.contentWindow.wrappedJSObject; + } } catch(E) { - alert("Error with get_contentWindow("+frame+") and wrappedJSObject:" + E); + alert($('offlineStrings').getFormattedString('openils.global_util.content_window_jsobject.error', [frame, E])); } return frame.contentWindow; } else { return null; } } catch(E) { - alert("Error with get_contentWindow("+frame+"): " + E); + alert($('offlineStrings').getFormattedString('openils.global_util.content_window.error', [frame, E])); } } @@ -190,9 +192,9 @@ const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.interfaces.nsIClipboardHelper); gClipboardHelper.copyString(text); - alert('Copied "'+text+'" to clipboard.'); + alert($('offlineStrings').getFormattedString('openils.global_util.clipboard', [text])); } catch(E) { - alert('Clipboard action failed: ' + E); + alert($('offlineStrings').getFormattedString('openils.global_util.clipboard.error', [E])); } } @@ -204,7 +206,7 @@ cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK); cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY); } catch(E) { - alert('Problem clearing the cache: ' + E); + alert($('offlineStrings').getFormattedString('openils.global_util.clear_cache.error', [E])); } } diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/util/fmall.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/util/fmall.js index 88fe4dce07..2032b12336 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/util/fmall.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/util/fmall.js @@ -1,5 +1,7 @@ try { - if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } + if (typeof JSAN == 'undefined') { + throw(document.getElementById('offlineStrings').getString('common.jsan.missing')); + } JSAN.errorLevel = "die"; // none, warn, or die JSAN.addRepository('..'); JSAN.use('OpenILS.data'); 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 3ce057f36e..d603cf26c5 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 @@ -144,3 +144,10 @@ main.settings.migrate=This version of the staff client stores local settings in main.settings.migrate.failed=WARNING: Unable to migrate legacy settings. The settings and configuration files appear to exist in multiple locations. \nTo resolve this problem manually, please consider:\n\t%1$s\nwhich is in the directory where we want to store settings for the current operating system account, and:\n\t%2$s\nwhich is where we used to store such information.\n main.settings.migrate.confirm=Move the settings and configuration files from\n%1$s\nto\n%2$s? main.settings.migrate.error=Error trying to move %1$s to directory %2$s +openils.global_util.clear_cache.error=Problem clearing the cache: %1$s +openils.global_util.clipboard.error=Clipboard action failed: %1$s +openils.global_util.clipboard=Copied "%1$s" to clipboard. +openils.global_util.content_window_jsobject.error=Error with get_contentWindow(%1$s) and wrappedJSObject: %2$s +openils.global_util.content_window.error=Error with get_contentWindow(%1$s): %2$s +openils.global_util.font_size.error=Error adjusting the font size: %1$s +