fix i18n when /usr/bin/locale exists

This commit is contained in:
Damien Elmes 2012-12-21 18:47:51 +09:00
parent 1f1fa125f0
commit 395d80aa2f

View file

@ -71,9 +71,9 @@ def ngettext(single, plural, n):
def langDir():
dir = os.path.join(os.path.dirname(
os.path.abspath(__file__)), "locale")
if not os.path.exists(dir):
if not os.path.isdir(dir):
dir = os.path.join(os.path.dirname(sys.argv[0]), "locale")
if not os.path.exists(dir):
if not os.path.isdir(dir):
dir = "/usr/share/anki/locale"
return dir