fix translations on Mac

This commit is contained in:
Damien Elmes 2017-07-31 13:59:10 +10:00
parent 8503ab29ab
commit 96c737f24f

View File

@ -76,8 +76,12 @@ def ngettext(single, plural, n):
return localTranslation().ngettext(single, plural, n)
def langDir():
dir = os.path.join(os.path.dirname(
os.path.abspath(__file__)), "locale")
from anki.utils import isMac
filedir = os.path.dirname(os.path.abspath(__file__))
if isMac:
dir = os.path.abspath(filedir + "/../../Resources/locale")
else:
dir = os.path.join(filedir, "locale")
if not os.path.isdir(dir):
dir = os.path.join(os.path.dirname(sys.argv[0]), "locale")
if not os.path.isdir(dir):