mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
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:
parent
4143d5fb5b
commit
a879f6348d
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue