Additional locale match check before showing Translate button

This commit is contained in:
Lim Chee Aun 2023-03-24 10:05:23 +08:00
parent 45e633de92
commit fa27308132

View file

@ -1,5 +1,6 @@
import './status.css';
import { match } from '@formatjs/intl-localematcher';
import '@justinribeiro/lite-youtube';
import {
ControlledMenu,
@ -905,7 +906,8 @@ function Status({
{((enableTranslate &&
!!content.trim() &&
language &&
language !== targetLanguage) ||
language !== targetLanguage &&
!match([language], [targetLanguage])) ||
forceTranslate) && (
<TranslationBlock
forceTranslate={forceTranslate}