summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar root <root@raspberrypi.(none)> 2015-04-03 16:27:52 +0200
committerGravatar root <root@raspberrypi.(none)> 2015-04-03 16:27:52 +0200
commitd55f8011f6853bffa13f903b8c5c8e9365366ec3 (patch)
tree62c0f9dc3a4b4a782f95431c333381e4696763bd
parentMerge branch 'pr/n1156_ItachiSan' into 0.4.10 (diff)
downloadpyload-d55f8011f6853bffa13f903b8c5c8e9365366ec3.tar.xz
some fixes
-rwxr-xr-x[-rw-r--r--]pyload.py0
-rwxr-xr-x[-rw-r--r--]pyload/Core.py0
-rw-r--r--pyload/__init__.py2
-rw-r--r--pyload/config/Setup.py8
-rw-r--r--pyload/utils/__init__.py10
-rwxr-xr-x[-rw-r--r--]setup.py0
6 files changed, 12 insertions, 8 deletions
diff --git a/pyload.py b/pyload.py
index dc1957928..dc1957928 100644..100755
--- a/pyload.py
+++ b/pyload.py
diff --git a/pyload/Core.py b/pyload/Core.py
index 9588c9485..9588c9485 100644..100755
--- a/pyload/Core.py
+++ b/pyload/Core.py
diff --git a/pyload/__init__.py b/pyload/__init__.py
index e29c81ad7..c89e55a3c 100644
--- a/pyload/__init__.py
+++ b/pyload/__init__.py
@@ -84,7 +84,7 @@ try:
except IOError:
if os.name == "posix":
- configdir = os.path.join(homedir, ".pyload")
+ configdir = os.path.join(homedir, ".pyload-beta")
else:
configdir = os.path.join(homedir, "pyload")
diff --git a/pyload/config/Setup.py b/pyload/config/Setup.py
index d2bcef9e5..7f5c0b0ed 100644
--- a/pyload/config/Setup.py
+++ b/pyload/config/Setup.py
@@ -457,13 +457,13 @@ class SetupAssistant(object):
def print_dep(self, name, value, false="MISSING", true="OK"):
""" Print Status of dependency """
if value and isinstance(value, basestring):
- msg = "%(dep)-12s %(bool)s (%(info)s)"
+ info = ", ".join(value)
else:
- msg = "%(dep)-12s %(bool)s"
+ info = ""
- print msg % {'dep': name + ':',
+ print "%(dep)-12s %(bool)s (%(info)s)" % {'dep': name + ':',
'bool': _(true if value else false).upper(),
- 'info': ", ".join(value)}
+ 'info': info}
def check_module(self, module):
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py
index bfcc48621..46b375e7a 100644
--- a/pyload/utils/__init__.py
+++ b/pyload/utils/__init__.py
@@ -8,7 +8,8 @@ import re
import sys
import time
-from gettext import gettext
+#from gettext import gettext
+import pylgettext as gettext
from htmlentitydefs import name2codepoint
from os.path import join
from string import maketrans
@@ -252,11 +253,14 @@ def versiontuple(v): #: By kindall (http://stackoverflow.com/a/11887825)
def load_translation(name, locale, default="en"):
""" Load language and return its translation object or None """
+ from traceback import print_exc
+ from os.path import join
try:
- gettext.setpaths([path.join(os.sep, "usr", "share", "pyload", "locale"), None])
- translation = gettext.translation(name, self.path("locale"),
+ gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None])
+ translation = gettext.translation(name, join(pypath, "locale"),
languages=[locale, default], fallback=True)
except Exception:
+ print_exc()
return None
else:
translation.install(True)
diff --git a/setup.py b/setup.py
index 5b1e186c6..5b1e186c6 100644..100755
--- a/setup.py
+++ b/setup.py