Skip to content

Commit 05ec453

Browse files
committed
refactor: change translation dueTimeElapsed to timeLeft
1 parent b9ba8f9 commit 05ec453

15 files changed

Lines changed: 52 additions & 16 deletions

File tree

src/components/Message/ReminderNotification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const ReminderNotification = ({ reminder }: ReminderNotificationProps) =>
3838
timestamp: reminder.remindAt,
3939
}),
4040
})
41-
: t<string>(`Due {{ dueTimeElapsed }}`, {
42-
dueTimeElapsed: t<string>('duration/Message reminder', {
41+
: t<string>(`Due {{ timeLeft }}`, {
42+
timeLeft: t<string>('duration/Message reminder', {
4343
milliseconds: timeLeftMs,
4444
}),
4545
})}

src/components/Message/__tests__/ReminderNotification.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('ReminderNotification', () => {
2929
const { container } = await renderComponent({ client, reminder });
3030
expect(container).toMatchSnapshot();
3131
});
32-
it('displays text for bookmark notifications and time due in case of timed reminders', async () => {
32+
it('displays text for time due in case of timed reminders', async () => {
3333
const client = await getTestClientWithUser(user);
3434
const reminderResponse = generateReminderResponse({
3535
scheduleOffsetMs: 60 * 1000,
@@ -41,7 +41,7 @@ describe('ReminderNotification', () => {
4141
const { container } = await renderComponent({ client, reminder });
4242
expect(container).toMatchSnapshot();
4343
});
44-
it('displays text for bookmark notifications and reminder deadline if trespassed the refresh boundary', async () => {
44+
it('displays text for reminder deadline if trespassed the refresh boundary', async () => {
4545
const client = await getTestClientWithUser(user);
4646
const reminderResponse = generateReminderResponse({
4747
data: { remind_at: new Date(0).toISOString() },

src/components/Message/__tests__/__snapshots__/ReminderNotification.test.js.snap

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,39 @@ exports[`ReminderNotification displays text for bookmark notifications and time
4747
</p>
4848
</div>
4949
`;
50+
51+
exports[`ReminderNotification displays text for reminder deadline if trespassed the refresh boundary 1`] = `
52+
<div>
53+
<p
54+
class="str-chat__message-reminder"
55+
>
56+
<span>
57+
Saved for later
58+
</span>
59+
<span>
60+
|
61+
</span>
62+
<span>
63+
Due 55 years ago
64+
</span>
65+
</p>
66+
</div>
67+
`;
68+
69+
exports[`ReminderNotification displays text for time due in case of timed reminders 1`] = `
70+
<div>
71+
<p
72+
class="str-chat__message-reminder"
73+
>
74+
<span>
75+
Saved for later
76+
</span>
77+
<span>
78+
|
79+
</span>
80+
<span>
81+
Due in a minute
82+
</span>
83+
</p>
84+
</div>
85+
`;

src/i18n/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "Ziehen Sie Ihre Dateien hierher",
2929
"Drag your files here to add to your post": "Ziehen Sie Ihre Dateien hierher, um sie Ihrem Beitrag hinzuzufügen",
3030
"Due since {{ dueSince }}": "Fällig seit {{ dueSince }}",
31-
"Due {{ dueTimeElapsed }}": "Fällig {{ dueTimeElapsed }}",
31+
"Due {{ timeLeft }}": "Fällig {{ timeLeft }}",
3232
"Edit Message": "Nachricht bearbeiten",
3333
"Edit message request failed": "Anfrage zum Bearbeiten der Nachricht fehlgeschlagen",
3434
"Edited": "Bearbeitet",

src/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "Drag your files here",
2929
"Drag your files here to add to your post": "Drag your files here to add to your post",
3030
"Due since {{ dueSince }}": "Due since {{ dueSince }}",
31-
"Due {{ dueTimeElapsed }}": "Due {{ dueTimeElapsed }}",
31+
"Due {{ timeLeft }}": "Due {{ timeLeft }}",
3232
"Edit Message": "Edit Message",
3333
"Edit message request failed": "Edit message request failed",
3434
"Edited": "Edited",

src/i18n/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "Arrastra tus archivos aquí",
2929
"Drag your files here to add to your post": "Arrastra tus archivos aquí para agregarlos a tu publicación",
3030
"Due since {{ dueSince }}": "Vencido desde {{ dueSince }}",
31-
"Due {{ dueTimeElapsed }}": "Vencido {{ dueTimeElapsed }}",
31+
"Due {{ timeLeft }}": "Vence en {{ timeLeft }}",
3232
"Edit Message": "Editar mensaje",
3333
"Edit message request failed": "Error al editar la solicitud de mensaje",
3434
"Edited": "Editado",

src/i18n/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "Glissez vos fichiers ici",
2929
"Drag your files here to add to your post": "Glissez vos fichiers ici pour les ajouter à votre publication",
3030
"Due since {{ dueSince }}": "Échéance depuis {{ dueSince }}",
31-
"Due {{ dueTimeElapsed }}": "Échéance {{ dueTimeElapsed }}",
31+
"Due {{ timeLeft }}": "Échéance dans {{ timeLeft }}",
3232
"Edit Message": "Éditer un message",
3333
"Edit message request failed": "Échec de la demande de modification du message",
3434
"Edited": "Modifié",

src/i18n/hi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "अपनी फ़ाइलें यहाँ खींचें",
2929
"Drag your files here to add to your post": "अपनी फ़ाइलें यहाँ खींचें और अपने पोस्ट में जोड़ने के लिए",
3030
"Due since {{ dueSince }}": "{{ dueSince }} से देय",
31-
"Due {{ dueTimeElapsed }}": "{{ dueTimeElapsed }} में देय",
31+
"Due {{ timeLeft }}": "{{ timeLeft }} में देय",
3232
"Edit Message": "मैसेज में बदलाव करे",
3333
"Edit message request failed": "संदेश संपादित करने का अनुरोध विफल रहा",
3434
"Edited": "संपादित",

src/i18n/it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "Trascina i tuoi file qui",
2929
"Drag your files here to add to your post": "Trascina i tuoi file qui per aggiungerli al tuo post",
3030
"Due since {{ dueSince }}": "Scaduto dal {{ dueSince }}",
31-
"Due {{ dueTimeElapsed }}": "Scadenza {{ dueTimeElapsed }}",
31+
"Due {{ timeLeft }}": "Scadenza tra {{ timeLeft }}",
3232
"Edit Message": "Modifica messaggio",
3333
"Edit message request failed": "Richiesta di modifica del messaggio non riuscita",
3434
"Edited": "Modificato",

src/i18n/ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Drag your files here": "ここにファイルをドラッグ",
2929
"Drag your files here to add to your post": "投稿に追加するためにここにファイルをドラッグ",
3030
"Due since {{ dueSince }}": "{{ dueSince }}から期限切れ",
31-
"Due {{ dueTimeElapsed }}": "{{ dueTimeElapsed }}に期限切れ",
31+
"Due {{ timeLeft }}": "{{ timeLeft }}に期限切れ",
3232
"Edit Message": "メッセージを編集",
3333
"Edit message request failed": "メッセージの編集要求が失敗しました",
3434
"Edited": "編集済み",

0 commit comments

Comments
 (0)