diff --git a/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js b/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
index 2e9b58c659..62ec70064b 100644
--- a/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
+++ b/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
@@ -3,7 +3,7 @@
class GoogleTranslateOption {
getName () {return "GoogleTranslateOption";}
- getVersion () {return "1.7.7";}
+ getVersion () {return "1.7.8";}
getAuthor () {return "DevilBro";}
@@ -11,12 +11,12 @@ class GoogleTranslateOption {
constructor () {
this.changelog = {
- "improved":[["Right Click","Fixed issue where right click would not quick enable/disable translating"]]
+ "fixed":[["Google API","Google ultimately removed their free Google Translate Endpoint, killing any chances of using a free translation API that doesn't have a requests per month limit. I switched to emulating the translate webpage in an invisible browserwindow, sadly this is far slower than the old method, but at least it still works"],["New Chatbar still broken","the plugin still fails to translate outgoing messages if your client is using the new WYSIWYG chatinput, this bug will be fixed at a later date"]]
};
this.patchedModules = {
after: {
- ChannelTextArea: ["componentDidMount","render"],
+ ChannelTextArea: ["render", "componentDidMount"],
Message: "componentDidMount",
MessageContent: "componentDidMount"
}
@@ -193,7 +193,7 @@ class GoogleTranslateOption {
};
if (foundtranslation && foundinput && foundoutput) {
if (document.querySelector(".googletranslate-tooltip")) {
- BDFDB.ContextMenuUtils.close(menu);
+ BDFDB.ContextMenuUtils.close(e.instance);
BDFDB.DiscordUtils.openLink(this.getGoogleTranslatePageURL(foundinput.id, foundoutput.id, text), BDFDB.DataUtils.get(this, "settings", "useChromium"));
}
else createTooltip();
@@ -368,7 +368,7 @@ class GoogleTranslateOption {
menuPlacement: inPopout ? BDFDB.LibraryComponents.Select.MenuPlacements.TOP : BDFDB.LibraryComponents.Select.MenuPlacements.BOTTOM,
value: this.getLanguageChoice(key),
id: key,
- options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(isOutput ? BDFDB.ObjectUtils.filter(this.languages, lang => lang.id != "auto") : this.languages, (lang, id) => {return {value:id, label:lang.name}})),
+ options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(isOutput ? BDFDB.ObjectUtils.filter(this.languages, lang => lang.id != "auto") : this.languages, (lang, id) => {return {value:id, label:this.getLanguageName(lang)}})),
searchable: true,
optionRenderer: lang => {
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
@@ -455,7 +455,7 @@ class GoogleTranslateOption {
embeddescription.insertBefore(BDFDB.DOMUtils.create(``), embeddescription.firstChild);
}
BDFDB.ListenerUtils.addToChildren(messagediv, "mouseenter", BDFDB.dotCN.messageedited + ".GTO-translated", e => {
- BDFDB.TooltipUtils.create(e.currentTarget, `