[nanny] Add win32 paths



commit 1b0b9bac10d1ed0787ff2519d03d168eaed0ae92
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Sat Sep 18 12:29:31 2010 +0200

    Add win32 paths

 client/gnome/__init__.py.in |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/client/gnome/__init__.py.in b/client/gnome/__init__.py.in
index 5828bd7..b11d6db 100644
--- a/client/gnome/__init__.py.in
+++ b/client/gnome/__init__.py.in
@@ -30,7 +30,16 @@ import __builtin__
 __builtin__._ = gettext.gettext
 
 GETTEXT_DOMAIN = 'nanny'
-locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
+if os.name == "posix":
+    locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
+elif os.name == "nt":
+    file_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+    for x in range(7):
+        file_dir = os.path.dirname(file_dir)
+    
+    root_path = file_dir
+    locale_dir = os.path.join(root_path, "share" ,"locale")
+    print "LOCALE PATH = %s" % locale_dir
 
 gettext.bindtextdomain(GETTEXT_DOMAIN, locale_dir)
 gettext.textdomain(GETTEXT_DOMAIN)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]