Skip to content

Commit 10e5741

Browse files
committed
fix: quoted message layout
1 parent 96872fd commit 10e5741

14 files changed

Lines changed: 20 additions & 4 deletions

File tree

package/src/components/Message/MessageItemView/utils/renderText.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { PropsWithChildren, ReactNode, useCallback, useMemo } from 'react';
22
import {
33
GestureResponderEvent,
4+
I18nManager,
45
Linking,
56
Platform,
67
Text,
@@ -294,6 +295,7 @@ export const renderText = (params: RenderTextParams) => {
294295
...defaultMarkdownStyles.text,
295296
color: isMyMessage ? semantics.chatTextOutgoing : semantics.chatTextIncoming,
296297
...markdownStyles?.text,
298+
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
297299
},
298300
};
299301

package/src/components/Reply/Reply.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { checkQuotedMessageEquality } from '../../utils/utils';
2525
import { FileIcon } from '../Attachment/FileIcon';
2626
import { AttachmentRemoveControl } from '../MessageInput/components/AttachmentPreview/AttachmentRemoveControl';
2727
import { VideoPlayIndicator } from '../ui/VideoPlayIndicator';
28+
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
2829

2930
const messageComposerStateStoreSelector = (state: MessageComposerState) => ({
3031
quotedMessage: state.quotedMessage,
@@ -96,6 +97,7 @@ export type ReplyPropsWithContext = Pick<ChatContextValue, 'ImageComponent'> &
9697
};
9798

9899
export const ReplyWithContext = (props: ReplyPropsWithContext) => {
100+
const { t } = useTranslationContext();
99101
const {
100102
isMyMessage,
101103
ImageComponent,
@@ -122,12 +124,12 @@ export const ReplyWithContext = (props: ReplyPropsWithContext) => {
122124
const title = useMemo(
123125
() =>
124126
mode === 'edit'
125-
? 'Edit Message'
127+
? t('Edit Message')
126128
: isMyMessage
127-
? 'You'
129+
? t('You')
128130
: quotedMessage?.user?.name
129-
? `Reply to ${quotedMessage?.user?.name}`
130-
: 'Reply',
131+
? t('Reply to {{name}}', { name: quotedMessage?.user?.name })
132+
: t('Reply'),
131133
[mode, isMyMessage, quotedMessage?.user?.name],
132134
);
133135

package/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "Questions",
9494
"Reconnecting...": "Reconnecting...",
9595
"Reply": "Reply",
96+
"Reply to {{name}}": "Reply to {{name}}",
9697
"Reply to Message": "Reply to Message",
9798
"Resend": "Resend",
9899
"SEND": "SEND",

package/src/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "Preguntas",
9494
"Reconnecting...": "Reconectando...",
9595
"Reply": "Responder",
96+
"Reply to {{name}}": "Responder a {{name}}",
9697
"Reply to Message": "Responder al mensaje",
9798
"Resend": "Reenviar",
9899
"SEND": "ENVIAR",

package/src/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "Questions",
9494
"Reconnecting...": "Se Reconnecter...",
9595
"Reply": "Répondre",
96+
"Reply to {{name}}": "Répondre à {{name}}",
9697
"Reply to Message": "Répondre au message",
9798
"Resend": "Renvoyer",
9899
"SEND": "ENVOYER",

package/src/i18n/he.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "שאלות",
9494
"Reconnecting...": "מתחבר מחדש...",
9595
"Reply": "השב/י",
96+
"Reply to {{name}}": "השב/י ל-{{name}}",
9697
"Reply to Message": "השב/י להודעה",
9798
"Resend": "שלח/י שוב",
9899
"SEND": "שלח",

package/src/i18n/hi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "प्रश्न",
9494
"Reconnecting...": "पुनः कनेक्ट हो...",
9595
"Reply": "मैसेज को रिप्लाई करे",
96+
"Reply to {{name}}": "{{name}} को जवाब दें",
9697
"Reply to Message": "संदेश का जवाब दें",
9798
"Resend": "पुन: भेजें",
9899
"SEND": "भेजें",

package/src/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "Domande",
9494
"Reconnecting...": "Ricollegarsi...",
9595
"Reply": "Rispondi",
96+
"Reply to {{name}}": "Rispondi a {{name}}",
9697
"Reply to Message": "Rispondi al messaggio",
9798
"Resend": "Invia di nuovo",
9899
"SEND": "INVIA",

package/src/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "質問",
9494
"Reconnecting...": "再接続中。。。",
9595
"Reply": "返事",
96+
"Reply to {{name}}": "{{name}}に返信",
9697
"Reply to Message": "メッセージに返信",
9798
"Resend": "再送",
9899
"SEND": "送信",

package/src/i18n/ko.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"Questions": "질문",
9494
"Reconnecting...": "다시 연결 중...",
9595
"Reply": "답장",
96+
"Reply to {{name}}": "{{name}}님에게 답장",
9697
"Reply to Message": "메시지에 답장",
9798
"Resend": "재전송",
9899
"SEND": "보내기",

0 commit comments

Comments
 (0)