Translate: Add DeepL support (#2721)

Co-authored-by: v <vendicated@riseup.net>
This commit is contained in:
Ashton 2024-08-01 07:10:27 -05:00 committed by GitHub
parent 2382294e8b
commit f8b01c1a31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 277 additions and 37 deletions

View file

@ -19,7 +19,6 @@
import { Parser, useEffect, useState } from "@webpack/common";
import { Message } from "discord-types/general";
import { Languages } from "./languages";
import { TranslateIcon } from "./TranslateIcon";
import { cl, TranslationValue } from "./utils";
@ -59,7 +58,7 @@ export function TranslationAccessory({ message }: { message: Message; }) {
<TranslateIcon width={16} height={16} />
{Parser.parse(translation.text)}
{" "}
(translated from {Languages[translation.src] ?? translation.src} - <Dismiss onDismiss={() => setTranslation(undefined)} />)
(translated from {translation.sourceLanguage} - <Dismiss onDismiss={() => setTranslation(undefined)} />)
</span>
);
}