mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 10:27:03 -04:00
Revert "Language Blacklist for MessageTranslate"
This reverts commit b10429e0ae
.
This commit is contained in:
parent
b10429e0ae
commit
6b4e0d54a9
1 changed files with 0 additions and 7 deletions
|
@ -22,16 +22,9 @@ const settings = definePluginSettings(
|
||||||
default: "0.8",
|
default: "0.8",
|
||||||
restartNeeded: true
|
restartNeeded: true
|
||||||
},
|
},
|
||||||
languageBlacklist: {
|
|
||||||
type: OptionType.STRING,
|
|
||||||
description: "Language codes to disable functionality in (separate with comma)",
|
|
||||||
default: "",
|
|
||||||
restartNeeded: true
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function translateAPI(sourceLang: string, targetLang: string, text: string): Promise<any> {
|
async function translateAPI(sourceLang: string, targetLang: string, text: string): Promise<any> {
|
||||||
if (settings.store.languageBlacklist.includes(sourceLang)) return;
|
|
||||||
|
|
||||||
const url = `https://translate.googleapis.com/translate_a/single?client=gtx&sl=${sourceLang}&tl=${targetLang}&dt=t&dj=1&q=${encodeURIComponent(text)}`;
|
const url = `https://translate.googleapis.com/translate_a/single?client=gtx&sl=${sourceLang}&tl=${targetLang}&dt=t&dj=1&q=${encodeURIComponent(text)}`;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue