def __init__( self, iface ): """initialize the plugin""" global control try: control except NameError: control = TimeManagerControl(iface)
def __init__( self, iface ): """initialize the plugin""" global control try: control except NameError: try: lang=locale.getdefaultlocale()[0].split("_")[0] except: lang="en" # could not get locale, OSX may have this bug self.change_i18n(lang) control = TimeManagerControl(iface)
def __init__( self, iface ): """initialize the plugin""" global control try: control except NameError: try: overrideLocale = bool(QSettings().value("locale/overrideFlag", False)) if not overrideLocale: lang = QLocale.system().name().split("_")[0] else: lang = QSettings().value("locale/userLocale", "").split("_")[0] except: lang="en" # could not get locale, OSX may have this bug info("Plugin language loaded: {}".format(lang)) self.change_i18n(lang) control = TimeManagerControl(iface)
def __init__(self, iface): """initialize the plugin""" self.iface = iface self.control = TimeManagerControl(self.iface)