diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue
index c60151d8..61e89400 100644
--- a/components/status/StatusActions.vue
+++ b/components/status/StatusActions.vue
@@ -175,16 +175,6 @@ function mention() {
/>
-
-
-
-
+
+
+ Translate post
+
+
+ Show original post
+
+
+
(config.public.translateApi, {
method: 'POST',
body: {
q: text,
- source: 'auto',
- target: navigator.language.replace(/-.*$/, ''),
+ source: from ?? 'auto',
+ target: to ?? languageCode,
format: 'html',
api_key: '',
},
@@ -34,7 +35,7 @@ export function useTranslation(status: Status) {
async function toggle() {
if (!translation.text)
- translation.text = await translateText(status.content)
+ translation.text = await translateText(status.content, status.language)
translation.visible = !translation.visible
}
@@ -45,3 +46,4 @@ export function useTranslation(status: Status) {
translation,
}
}
+