mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
If translated text is same as original text, don't show it
This means language detection messed up
This commit is contained in:
parent
ac9962b051
commit
9869c9dc5b
1 changed files with 5 additions and 1 deletions
|
@ -105,7 +105,11 @@ function TranslationBlock({
|
|||
}, [forceTranslate]);
|
||||
|
||||
if (mini) {
|
||||
if (!!translatedContent && detectedLang !== targetLangText) {
|
||||
if (
|
||||
!!translatedContent &&
|
||||
translatedContent.trim() !== text.trim() &&
|
||||
detectedLang !== targetLangText
|
||||
) {
|
||||
return (
|
||||
<div class="status-translation-block-mini">
|
||||
<Icon
|
||||
|
|
Loading…
Reference in a new issue