[open-ils-commits] r9130 - trunk/Open-ILS/xul/staff_client/server/cat

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 24 20:40:32 EDT 2008


Author: dbs
Date: 2008-03-24 20:05:26 -0400 (Mon, 24 Mar 2008)
New Revision: 9130

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
Hmm. xulplanet.com appears to have better xul docs than mozilla.org
Basic locale preferences for MARC editor tooltips are now working


Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2008-03-24 20:38:59 UTC (rev 9129)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2008-03-25 00:05:26 UTC (rev 9130)
@@ -116,15 +116,14 @@
 		// Set a default locale in case preferences fail us
 		var locale = "en-US";
 
-		// Try to get the locale from our preferences - not working
+		// Try to get the locale from our preferences
 		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
         try {
-            var Cc = Components.classes;
-            var Ci = Components.interfaces;
-            locale =
-                Cc["@mozilla.org/preferences-service;1"].
-                getService(Ci.nsIPrefService).getBranch("general.useragent").
-                getCharPref("locale");
+            const Cc = Components.classes;
+            const Ci = Components.interfaces;
+            locale = Cc["@mozilla.org/preferences-service;1"].
+				getService(Ci.nsIPrefBranch).
+				getCharPref("general.useragent.locale");
         }
 		catch (e) { }
 



More information about the open-ils-commits mailing list