diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index e10d612da..176161e2c 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -202,6 +202,7 @@
"expirationType": "Expiration Type",
"expirationDuration": "Expiration Duration",
"disappears": "Disappears",
+ "messageWillDisappear": "Messages will disappear in $countAndUnit$",
"followSetting": "Follow Setting",
"followSettingDisabled": "Messages you send will no longer disappear. Are you sure you want to turn off disappearing messages?",
"followSettingTimeAndType": "Set your messages to disappear $time$ after they have been $type$?",
diff --git a/ts/components/conversation/message/message-content/MessageReactBar.tsx b/ts/components/conversation/message/message-content/MessageReactBar.tsx
index c4f0e1be2..2d7d0cad6 100644
--- a/ts/components/conversation/message/message-content/MessageReactBar.tsx
+++ b/ts/components/conversation/message/message-content/MessageReactBar.tsx
@@ -101,25 +101,23 @@ function formatTimeLeft({ timeLeftMs }: { timeLeftMs: number }) {
return `0s`;
}
- const prefix = 'Message will expire in';
-
if (timeLeft.isBefore(moment.utc(0).add(1, 'minute'))) {
- return `${prefix} ${timeLeft.seconds()}s`;
+ return window.i18n('messageWillDisappear', [`${timeLeft.seconds()}s`]);
}
if (timeLeft.isBefore(moment.utc(0).add(1, 'hour'))) {
const extraUnit = timeLeft.seconds() ? ` ${timeLeft.seconds()}s` : '';
- return `${prefix} ${timeLeft.minutes()}m${extraUnit}`;
+ return window.i18n('messageWillDisappear', [`${timeLeft.minutes()}m${extraUnit}`]);
}
if (timeLeft.isBefore(moment.utc(0).add(1, 'day'))) {
const extraUnit = timeLeft.minutes() ? ` ${timeLeft.minutes()}m` : '';
- return `${prefix} ${timeLeft.hours()}h${extraUnit}`;
+ return window.i18n('messageWillDisappear', [`${timeLeft.hours()}h${extraUnit}`]);
}
if (timeLeft.isBefore(moment.utc(0).add(7, 'day'))) {
const extraUnit = timeLeft.hours() ? ` ${timeLeft.hours()}h` : '';
- return `${prefix} ${timeLeft.dayOfYear() - 1}d${extraUnit}`;
+ return window.i18n('messageWillDisappear', [`${timeLeft.dayOfYear() - 1}d${extraUnit}`]);
}
if (timeLeft.isBefore(moment.utc(0).add(31, 'day'))) {
@@ -127,7 +125,7 @@ function formatTimeLeft({ timeLeftMs }: { timeLeftMs: number }) {
const weeks = Math.floor(days / 7);
const daysLeft = days % 7;
const extraUnit = daysLeft ? ` ${daysLeft}d` : '';
- return `${prefix} ${weeks}w${extraUnit}`;
+ return window.i18n('messageWillDisappear', [`${weeks}w${extraUnit}`]);
}
return '...';
diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts
index abbdadb23..3b31283ed 100644
--- a/ts/types/LocalizerKeys.ts
+++ b/ts/types/LocalizerKeys.ts
@@ -306,6 +306,7 @@ export type LocalizerKeys =
| 'messageRequestAcceptedOursNoName'
| 'messageRequestPending'
| 'messageRequests'
+ | 'messageWillDisappear'
| 'messagesHeader'
| 'moreInformation'
| 'multipleJoinedTheGroup'