Changeset b8ca22ed14cc…
Parent e4a543f6009c…
by
Changes to 2 files · Browse files at b8ca22ed14cc Showing diff from parent e4a543f6009c Diff from another changeset...
@@ -8,7 +8,7 @@
import gettext
from gettext import gettext as _
+import paths
-# TODO: get proper path from somewheres
-gettext.bindtextdomain("thg", "c:/path/to/locale")
+gettext.bindtextdomain("thg", paths.get_locale_path())
gettext.textdomain("thg")
|
@@ -7,9 +7,9 @@ """
try:
- from __paths__ import icon_path, bin_path, license_path
+ from __paths__ import icon_path, bin_path, license_path, locale_path
except ImportError:
- icon_path, bin_path, license_path = None, None, None
+ icon_path, bin_path, license_path, locale_path = None, None, None, None
import os
@@ -39,6 +39,10 @@ global license_path
return license_path or os.path.join(get_prog_root(), 'COPYING.txt')
+def get_locale_path():
+ global locale_path
+ return locale_path or os.path.join(get_prog_root(), 'locale')
+
if os.name == 'nt':
import _winreg
import win32net
|
Loading...