From 29a032f105c0e9366475555d37146042a3f508dd Mon Sep 17 00:00:00 2001 From: Ashwin Agarwal Date: Tue, 3 Oct 2023 13:35:08 -0400 Subject: [PATCH] Hide the Translate Post button if no translation API endpoint has been defined --- composables/masto/translate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/masto/translate.ts b/composables/masto/translate.ts index b57d0d7961..cd7eeba78e 100644 --- a/composables/masto/translate.ts +++ b/composables/masto/translate.ts @@ -103,7 +103,7 @@ export function useTranslation(status: mastodon.v1.Status | mastodon.v1.StatusEd && supportedTranslationCodes.includes(to as any) && supportedTranslationCodes.includes(status.language as any) && !userSettings.value.disabledTranslationLanguages.includes(status.language) - const enabled = /*! !useRuntimeConfig().public.translateApi && */ shouldTranslate + const enabled = !!useRuntimeConfig().public.translateApi && shouldTranslate async function toggle() { if (!shouldTranslate)