Skip to content
Snippets Groups Projects
Commit ae18a849 authored by André's avatar André Committed by Philipp Hörist
Browse files

Search also in user data dir for translations

Translation wasn't available if Gajim is installed in a user's home
directory only."
parent 3b702000
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
import gettext
import unicodedata
from pathlib import Path
from gi.repository import GLib
DOMAIN = 'gajim'
LANG = 'en'
......@@ -45,10 +46,8 @@ def get_locale_dirs():
# Check if we run as flatpak
return [Path('/app/share/')]
data_dirs = os.getenv('XDG_DATA_DIRS')
if data_dirs:
return list(map(Path, data_dirs.split(':')))
return [Path('/usr/local/share/'), Path('/usr/share/')]
data_dirs = [GLib.get_user_data_dir()] + GLib.get_system_data_dirs()
return [Path(dir_) for dir_ in data_dirs]
def iter_locale_dirs():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment