More i18n for chrome
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Feb 2008 04:30:59 +0000 (04:30 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Feb 2008 04:30:59 +0000 (04:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8626 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Open-ILS/xul/staff_client/chrome/content/OpenILS/util/fmall.js
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties

index e55d4a2..dae269d 100644 (file)
@@ -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]));
                }
        }
 
             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]));
         }
        }
 
                        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]));      
                }
        }
 
                        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]));
                }
        }
 
index 88fe4dc..2032b12 100644 (file)
@@ -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');
index 3ce057f..d603cf2 100644 (file)
@@ -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
+