Author: Andreas Bombe <aeb@debian.org>
Description: Set file paths to the installed locations
Currently there is only the locale files where the directory is simply set to
/usr/share/locale, the standard directory the locales are installed to.
Forwarded: not-needed
diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py
index 3f2089a..bbc17f6 100755
--- a/ankiqt/ui/main.py
+++ b/ankiqt/ui/main.py
@@ -2150,7 +2150,7 @@ it to your friends.
locale.setlocale(locale.LC_ALL, '')
except:
pass
- languageDir=os.path.join(ankiqt.modDir, "locale")
+ languageDir="/usr/share/locale"
self.languageTrans = gettext.translation('ankiqt', languageDir,
languages=[self.config["interfaceLang"]],
fallback=True)
diff --git a/libanki/anki/lang.py b/libanki/anki/lang.py
index ff24518..f3fb968 100644
--- a/libanki/anki/lang.py
+++ b/libanki/anki/lang.py
@@ -8,7 +8,6 @@ Internationalisation
"""
__docformat__ = 'restructuredtext'
-import os, sys
import gettext
import threading
@@ -32,11 +31,7 @@ def ngettext(single, plural, n):
return localTranslation().ungettext(single, plural, n)
def setLang(lang, local=True):
- base = os.path.dirname(os.path.abspath(__file__))
- localeDir = os.path.join(base, "locale")
- if not os.path.exists(localeDir):
- localeDir = os.path.join(
- os.path.dirname(sys.argv[0]), "locale")
+ localeDir = "/usr/share/locale"
trans = gettext.translation('libanki', localeDir,
languages=[lang],
fallback=True)