diff --git a/plugins/dislate/src/api/GTranslate.ts b/plugins/dislate/src/api/GTranslate.ts index 2b30423..186ab0b 100644 --- a/plugins/dislate/src/api/GTranslate.ts +++ b/plugins/dislate/src/api/GTranslate.ts @@ -19,7 +19,9 @@ const translate = async (text: string, source_lang: string = "auto", target_lang console.log(data) - return { source_lang, text: data.sentences[0].trans } + return { + source_lang, + text: data.sentences.map(s => s.trans).join('') } } catch (e) { throw Error(`Failed to fetch from Google Translate: ${e}`) }