Taking a shot at setting up i18n but I have no idea what I'm doing and quite frankly, I don't evn care about it

This commit is contained in:
Mathieu Comandon 2017-05-18 16:14:18 -07:00
parent 4143d5fb5b
commit a879f6348d
2 changed files with 8 additions and 0 deletions

View file

@ -15,6 +15,7 @@
import os
import sys
import locale
from os.path import realpath, dirname, normpath
LAUNCH_PATH = dirname(realpath(__file__))
@ -22,6 +23,8 @@ if LAUNCH_PATH != "/usr/bin":
SOURCE_PATH = normpath(os.path.join(LAUNCH_PATH, '..'))
sys.path.insert(0, SOURCE_PATH)
locale.setlocale(locale.LC_ALL, locale.getlocale())
from lutris.gui.application import Application
app = Application()

View file

@ -19,6 +19,7 @@ import json
import logging
import os
import signal
import gettext
from gettext import gettext as _
import gi
@ -46,6 +47,10 @@ class Application(Gtk.Application):
Gtk.Application.__init__(self, application_id='net.lutris.Lutris',
flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
gettext.bindtextdomain("lutris", "/usr/share/locale")
gettext.textdomain("lutris")
check_config()
migrate()
update_platforms()