Commit 7dce8a0e authored by Arnel A. Borja's avatar Arnel A. Borja

Load gettext on startup

Initialize gettext of C library and Python gettext module.
parent 14144e5c
......@@ -54,6 +54,7 @@ gnome-music:
-e s!\@libexecdir\@!$(libexecdir)! \
-e s!\@libdir\@!$(libdir)! \
-e s!\@pkglibdir\@!$(pkglibdir)! \
-e s!\@localedir\@!$(localedir)! \
-e s!\@pythondir\@!$(pythondir)! \
-e s!\@pyexecdir\@!$(pyexecdir)! \
-e s!\@PACKAGE\@!$(PACKAGE)! \
#!/usr/bin/env python3
import sys, signal, os
import sys, signal, os, locale, gettext
sys.path.insert(1, '@pyexecdir@')
from gi.repository import Gio, Gtk
import gnomemusic
srcdir = os.path.abspath(os.path.join(os.path.dirname(gnomemusic.__file__), '..'))
if os.path.exists(os.path.join(srcdir, 'gnome-music.doap')):
print('Running from source tree, using local files')
......@@ -40,6 +41,11 @@ def install_excepthook():
if __name__ == "__main__":
locale.bindtextdomain('gnome-music', localedir)
gettext.bindtextdomain('gnome-music', localedir)
resource = Gio.resource_load(os.path.join(pkgdatadir, 'gnome-music.gresource'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment