mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01:00
Additional locale match check before showing Translate button
This commit is contained in:
parent
45e633de92
commit
fa27308132
1 changed files with 3 additions and 1 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue