[ocrfeeder] Install locale files under /usr/share/locale



commit 66c3acf4a0e0de7591c31b219b0f9adf31077c4f
Author: Alberto Garcia <agarcia igalia com>
Date:   Wed Mar 31 12:18:33 2010 +0200

    Install locale files under /usr/share/locale

 setup.py          |    3 ++-
 util/constants.py |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/setup.py b/setup.py
index d4875ec..2cc589e 100644
--- a/setup.py
+++ b/setup.py
@@ -7,9 +7,10 @@ import os
 
 def get_locale_files():
     files = glob.glob('locale/*/*/*.mo')
+    locale_dir = os.path.split(constants.LOCALE_DIR)[0]
     file_list = []
     for file in files:
-        file_list.append((os.path.dirname(os.path.join(constants.DEFAULT_SYSTEM_APP_DIR, file)), [file]))
+        file_list.append((os.path.dirname(os.path.join(locale_dir, file)), [file]))
     return file_list
 
 setup(name = 'ocrfeeder',
diff --git a/util/constants.py b/util/constants.py
index 23d576f..d552b43 100644
--- a/util/constants.py
+++ b/util/constants.py
@@ -59,7 +59,7 @@ if not os.path.exists(APP_DIR):
 # I18N
 DEFAULT_LANGUAGES = os.environ.get('LANGUAGE', '').split(':')
 DEFAULT_LANGUAGES += ['en_US', 'pt_PT']
-LOCALE_DIR = os.path.join(APP_DIR, 'locale')
+LOCALE_DIR = os.path.join(sys.prefix, 'share', 'locale')
 
 # CUSTOM ICONS
 DETECT_ICON = os.path.join(RESOURCES_DIR, 'icons', 'detect_icon.svg')



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