50 Public method to activate the translator. |
50 Public method to activate the translator. |
51 """ |
51 """ |
52 from .TranslatorWidget import TranslatorWidget |
52 from .TranslatorWidget import TranslatorWidget |
53 |
53 |
54 self.__widget = TranslatorWidget(self.__plugin, self) |
54 self.__widget = TranslatorWidget(self.__plugin, self) |
55 if self.__ui.getLayoutType() == "Sidebars": |
55 iconName = ( |
56 iconName = "sbTranslator96" |
56 "sbTranslator96" |
57 else: |
57 if self.__ui.getLayoutType() == "Sidebars" else |
58 iconName = "flag-{0}".format(self.__iconSuffix) |
58 "flag-{0}".format(self.__iconSuffix) |
|
59 ) |
59 self.__ui.addSideWidget( |
60 self.__ui.addSideWidget( |
60 self.__ui.BottomSide, self.__widget, |
61 self.__ui.BottomSide, self.__widget, |
61 UI.PixmapCache.getIcon( |
62 UI.PixmapCache.getIcon( |
62 os.path.join(os.path.dirname(__file__), "icons", iconName)), |
63 os.path.join(os.path.dirname(__file__), "icons", iconName)), |
63 self.tr("Translator")) |
64 self.tr("Translator")) |