77 Module function to prepare for an uninstallation. |
77 Module function to prepare for an uninstallation. |
78 """ |
78 """ |
79 Preferences.Prefs.settings.remove(TranslatorPlugin.PreferencesKey) |
79 Preferences.Prefs.settings.remove(TranslatorPlugin.PreferencesKey) |
80 |
80 |
81 |
81 |
82 # TODO: add support for IBM Watson translator |
|
83 # https://www.ibm.com/watson/developercloud/language-translator |
|
84 # https://www.ibm.com/watson/services/language-translator/ |
|
85 class TranslatorPlugin(QObject): |
82 class TranslatorPlugin(QObject): |
86 """ |
83 """ |
87 Class implementing the Translator plug-in. |
84 Class implementing the Translator plug-in. |
88 |
85 |
89 @signal updateLanguages() emitted to indicate a languages update |
86 @signal updateLanguages() emitted to indicate a languages update |
110 "ru", "tr", "zh-CN", "zh-TW"], |
107 "ru", "tr", "zh-CN", "zh-TW"], |
111 # service specific settings below |
108 # service specific settings below |
112 # Google |
109 # Google |
113 "GoogleEnableDictionary": False, |
110 "GoogleEnableDictionary": False, |
114 "GoogleV2Key": "", |
111 "GoogleV2Key": "", |
|
112 # IBM Watson Language Translator |
|
113 "IbmUrl": "", |
|
114 "IbmKey": "", |
115 # Microsoft |
115 # Microsoft |
116 "MsTranslatorKey": "", |
116 "MsTranslatorKey": "", |
117 "MsAuthToken": "", |
117 "MsAuthToken": "", |
118 "MsAuthTokenExpire": QDateTime(), |
118 "MsAuthTokenExpire": QDateTime(), |
119 # MyMemory |
119 # MyMemory |