Don't translate posts with only custom emojis

This commit is contained in:
Lim Chee Aun 2023-09-26 16:23:41 +08:00
parent eeb89212d2
commit 077b655c44

View file

@ -34,6 +34,7 @@ import Modal from '../components/modal';
import NameText from '../components/name-text';
import Poll from '../components/poll';
import { api } from '../utils/api';
import emojifyText from '../utils/emojify-text';
import enhanceContent from '../utils/enhance-content';
import getTranslateTargetLanguage from '../utils/get-translate-target-language';
import getHTMLText from '../utils/getHTMLText';
@ -1210,6 +1211,7 @@ function Status({
)}
{(((enableTranslate || inlineTranslate) &&
!!content.trim() &&
!!getHTMLText(emojifyText(content, emojis)) &&
differentLanguage) ||
forceTranslate) && (
<TranslationBlock