1
0
Fork 1
mirror of https://example.com synced 2024-11-22 12:56:39 +09:00

fix: unable to translate texts into English

Language code 'en' is deprecated in the DeepL API
This commit is contained in:
naskya 2024-01-03 07:14:37 +09:00
parent 23ab5567dd
commit 27aeca9c2d
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -78,7 +78,7 @@ export default async function (
const result = await deeplTranslator.translateText(
text,
source as deepl.SourceLanguageCode | null,
target as deepl.TargetLanguageCode,
(target === "en" ? to : target) as deepl.TargetLanguageCode,
);
return {