[UI] Fix translation setup in console

Console was incorrectly setting up pygtk translation
This commit is contained in:
bendikro 2016-05-24 14:43:40 +02:00 committed by Calum Lind
parent 4751b33d0c
commit 2a8388d262
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class Console(UI):
cmd_description = """Console or command-line user interface"""
def __init__(self, *args, **kwargs):
super(Console, self).__init__(*args, **kwargs)
super(Console, self).__init__("console", *args, **kwargs)
group = self.parser.add_argument_group(_("Console Options"), "These daemon connect options will be "
"used for commands, or if console ui autoconnect is enabled.")

View File

@ -31,10 +31,10 @@ class UI(object):
"""
cmd_description = """Override with command description"""
def __init__(self, name="gtk", **kwargs):
def __init__(self, name, **kwargs):
self.__name = name
self.ui_args = kwargs.pop("ui_args", None)
lang.setup_translations(setup_pygtk=(name == "gtk"))
lang.setup_translations()
self.__parser = BaseArgParser(**kwargs)
def parse_args(self, parser, args=None):