Author: Andreas Bombe <aeb@debian.org>
Description: Set file paths to the installed locations
 Currently only the locale files are diverted from the upstream location. The
 directory for the gettext files is simply set to /usr/share/locale, the
 directory for the Qt .qm files is kept as /usr/share/anki/locale.
 are installed to. 
Forwarded: not-needed

Index: git_anki/anki/lang.py
===================================================================
--- git_anki.orig/anki/lang.py	2013-11-04 22:32:03.867086600 +0100
+++ git_anki/anki/lang.py	2013-11-04 22:32:03.862086592 +0100
@@ -2,7 +2,7 @@
 # Copyright: Damien Elmes <anki@ichi2.net>
 # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
 
-import os, sys, re
+import re
 import gettext
 import threading
 
@@ -71,13 +71,7 @@
     return localTranslation().ungettext(single, plural, n)
 
 def langDir():
-    dir = os.path.join(os.path.dirname(
-        os.path.abspath(__file__)), "locale")
-    if not os.path.isdir(dir):
-        dir = os.path.join(os.path.dirname(sys.argv[0]), "locale")
-    if not os.path.isdir(dir):
-        dir = "/usr/share/anki/locale"
-    return dir
+    return "/usr/share/locale"
 
 def setLang(lang, local=True):
     trans = gettext.translation(
Index: git_anki/oldanki/lang.py
===================================================================
--- git_anki.orig/oldanki/lang.py	2013-11-04 22:32:03.867086600 +0100
+++ git_anki/oldanki/lang.py	2013-11-04 22:32:03.862086592 +0100
@@ -8,7 +8,6 @@
 """
 __docformat__ = 'restructuredtext'
 
-import os, sys
 import gettext
 import threading
 
@@ -32,11 +31,7 @@
     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)
Index: git_anki/aqt/__init__.py
===================================================================
--- git_anki.orig/aqt/__init__.py	2013-11-04 22:32:03.867086600 +0100
+++ git_anki/aqt/__init__.py	2013-11-04 22:32:03.863086594 +0100
@@ -107,7 +107,7 @@
         app.setLayoutDirection(Qt.LeftToRight)
     # qt
     _qtrans = QTranslator()
-    if _qtrans.load("qt_" + lang, dir):
+    if _qtrans.load("qt_" + lang, "/usr/share/qt4/translations"):
         app.installTranslator(_qtrans)
 
 # App initialisation
