--- a/eric6/Tools/TRPreviewer.py Thu Mar 04 17:44:41 2021 +0100 +++ b/eric6/Tools/TRPreviewer.py Thu Mar 04 17:48:09 2021 +0100 @@ -103,7 +103,7 @@ self.setCentralWidget(self.cw) - self.languageCombo.activated[str].connect(self.setTranslation) + self.languageCombo.activated[int].connect(self.__setTranslation) self.translations = TranslationsDict(self.languageCombo, self) self.translations.translationChanged.connect( @@ -403,12 +403,14 @@ self.__updateActions() - def setTranslation(self, name): + def __setTranslation(self, index): """ - Public slot to activate a translation. + Private slot to activate a translation. - @param name name (language) of the translation (string) + @param index index of the selected entry + @type int """ + name = self.languageCombo.itemText(index) self.translations.set(name) def __showWindowMenu(self):