Fix bindtextdomain not available on MacOS
This commit is contained in:
parent
f234722456
commit
1f0cc2b665
|
@ -76,7 +76,10 @@ else:
|
||||||
if base is None or base[0] != '/':
|
if base is None or base[0] != '/':
|
||||||
base = os.path.expanduser('~/.local/share')
|
base = os.path.expanduser('~/.local/share')
|
||||||
localedir = os.path.join(base, "locale")
|
localedir = os.path.join(base, "locale")
|
||||||
locale.bindtextdomain(APP, localedir)
|
|
||||||
|
if hasattr(locale, 'bindtextdomain'):
|
||||||
|
locale.bindtextdomain(APP, localedir)
|
||||||
|
|
||||||
gettext.install(APP, localedir)
|
gettext.install(APP, localedir)
|
||||||
|
|
||||||
if gettext._translations:
|
if gettext._translations:
|
||||||
|
|
Loading…
Reference in New Issue