From 077b655c442ec9287e8201ac173548c5a8853aee Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 26 Sep 2023 16:23:41 +0800 Subject: [PATCH] Don't translate posts with only custom emojis --- src/components/status.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/status.jsx b/src/components/status.jsx index 8061550b..ffc736c0 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -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) && (