Message Translation: Disable translation for changelog (#2861)
This commit is contained in:
parent
aa1cd0a3b9
commit
6176ef1a98
@ -25,8 +25,16 @@ import {
|
|||||||
selectStickerSet,
|
selectStickerSet,
|
||||||
} from '../../../global/selectors';
|
} from '../../../global/selectors';
|
||||||
import {
|
import {
|
||||||
isActionMessage, isChatChannel,
|
isActionMessage,
|
||||||
isChatGroup, isOwnMessage, areReactionsEmpty, isUserId, isMessageLocal, getMessageVideo, getChatMessageLink,
|
isChatChannel,
|
||||||
|
isChatGroup,
|
||||||
|
isOwnMessage,
|
||||||
|
areReactionsEmpty,
|
||||||
|
isUserId,
|
||||||
|
isMessageLocal,
|
||||||
|
getMessageVideo,
|
||||||
|
getChatMessageLink,
|
||||||
|
isServiceNotificationMessage,
|
||||||
} from '../../../global/helpers';
|
} from '../../../global/helpers';
|
||||||
import { SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';
|
import { SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';
|
||||||
import { IS_TRANSLATION_SUPPORTED } from '../../../util/windowEnvironment';
|
import { IS_TRANSLATION_SUPPORTED } from '../../../util/windowEnvironment';
|
||||||
@ -572,6 +580,7 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
const isScheduled = messageListType === 'scheduled';
|
const isScheduled = messageListType === 'scheduled';
|
||||||
const isChannel = chat && isChatChannel(chat);
|
const isChannel = chat && isChatChannel(chat);
|
||||||
const isLocal = isMessageLocal(message);
|
const isLocal = isMessageLocal(message);
|
||||||
|
const isServiceNotification = isServiceNotificationMessage(message);
|
||||||
const canShowSeenBy = Boolean(chat
|
const canShowSeenBy = Boolean(chat
|
||||||
&& seenByMaxChatMembers
|
&& seenByMaxChatMembers
|
||||||
&& seenByExpiresAt
|
&& seenByExpiresAt
|
||||||
@ -603,7 +612,8 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
|
|
||||||
const canTranslateLanguage = !detectedLanguage || !doNotTranslate.includes(detectedLanguage);
|
const canTranslateLanguage = !detectedLanguage || !doNotTranslate.includes(detectedLanguage);
|
||||||
const canTranslate = IS_TRANSLATION_SUPPORTED && isTranslationEnabled && message.content.text
|
const canTranslate = IS_TRANSLATION_SUPPORTED && isTranslationEnabled && message.content.text
|
||||||
&& canTranslateLanguage && !isLocal && !isScheduled && !isAction && !hasTranslation && !message.emojiOnlyCount;
|
&& canTranslateLanguage && !isLocal && !isServiceNotification && !isScheduled && !isAction && !hasTranslation
|
||||||
|
&& !message.emojiOnlyCount;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
availableReactions: global.availableReactions,
|
availableReactions: global.availableReactions,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user