Skip to content

Commit

Permalink
chore: make unloaded reply message translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Dec 19, 2024
1 parent 1668f99 commit 9a341fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion i18n/strings/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"message_box_dm": "Message @{{name}}",
"message_box_saved_notes": "Save to your notes",
"no_messages": "No messages",
"no_messages_body": "Get the conversation started."
"no_messages_body": "Get the conversation started.",
"reply_not_loaded": "Message not loaded"
},
"modals": {
"confirm_deletion": {
Expand Down
4 changes: 3 additions & 1 deletion src/components/common/messaging/ReplyMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet, View} from 'react-native';
import { useTranslation } from 'react-i18next';

import {Message} from 'revolt.js';

Expand All @@ -13,6 +14,7 @@ type ReplyProps = {
};

export const ReplyMessage = (props: ReplyProps) => {
const {t} = useTranslation();
if (!props.message?.system) {
return (
<View style={{alignItems: 'center', flexDirection: 'row'}}>
Expand Down Expand Up @@ -47,7 +49,7 @@ export const ReplyMessage = (props: ReplyProps) => {
) : null
) : (
<Text style={localStyles.messageContentReply}>
Message not loaded
{t('app.messaging.reply_not_loaded')}
</Text>
)}
</View>
Expand Down

0 comments on commit 9a341fd

Please sign in to comment.