--- a/Plugins/UiExtensionPlugins/Translator/ConfigurationPage/TranslatorPage.py Fri Oct 05 19:02:37 2018 +0200 +++ b/Plugins/UiExtensionPlugins/Translator/ConfigurationPage/TranslatorPage.py Sat Oct 06 14:47:40 2018 +0200 @@ -39,6 +39,10 @@ self.__plugin = plugin self.__enableLanguageWarning = True + self.deeplLabel.setText(self.tr( + """<p>A key is <b>required</b> to use this service.""" + """ <a href="{0}">Get a commercial API key.</a></p>""").format( + TranslatorEngines.getKeyUrl("deepl"))) self.googlev2Label.setText(self.tr( """<p>A key is <b>required</b> to use this service.""" """ <a href="{0}">Get a commercial API key.</a></p>""").format( @@ -76,6 +80,9 @@ self.languagesList.addItem(itm) self.languagesList.sortItems() + # DeepL settings + self.deeplKeyEdit.setText( + self.__plugin.getPreferences("DeeplKey")) # Google settings self.dictionaryCheckBox.setChecked( self.__plugin.getPreferences("GoogleEnableDictionary")) @@ -109,6 +116,9 @@ self.__plugin.setPreferences( "EnabledLanguages", enabledLanguages) + # DeepL settings + self.__plugin.setPreferences( + "DeeplKey", self.deeplKeyEdit.text()) # Google settings self.__plugin.setPreferences( "GoogleEnableDictionary", self.dictionaryCheckBox.isChecked())