mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-17 06:07:13 -04:00
Simplify singular/plural translations
This commit is contained in:
@@ -110,11 +110,19 @@ const EmailsList: React.FC = () => {
|
||||
} else if (secondsAgo < 3600) {
|
||||
// Less than 1 hour ago
|
||||
const minutes = Math.floor(secondsAgo / 60);
|
||||
return t('emails.dateFormat.minutesAgo', { count: minutes });
|
||||
if (minutes === 1) {
|
||||
return t('emails.time.minutesAgo_single', { count: minutes });
|
||||
} else {
|
||||
return t('emails.time.minutesAgo_plural', { count: minutes });
|
||||
}
|
||||
} else if (secondsAgo < 86400) {
|
||||
// Less than 24 hours ago
|
||||
const hours = Math.floor(secondsAgo / 3600);
|
||||
return t('emails.dateFormat.hoursAgo', { count: hours });
|
||||
if (hours === 1) {
|
||||
return t('emails.time.hoursAgo_single', { count: hours });
|
||||
} else {
|
||||
return t('emails.time.hoursAgo_plural', { count: hours });
|
||||
}
|
||||
} else if (secondsAgo < 172800) {
|
||||
// Less than 48 hours ago
|
||||
return t('emails.dateFormat.yesterday');
|
||||
|
||||
@@ -285,10 +285,6 @@
|
||||
"noEmailsDescription": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"dateFormat": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo_one": "{{count}} min ago",
|
||||
"minutesAgo_other": "{{count}} mins ago",
|
||||
"hoursAgo_one": "{{count}} hr ago",
|
||||
"hoursAgo_other": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -285,10 +285,10 @@
|
||||
"noEmailsDescription": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"dateFormat": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo_one": "{{count}} min ago",
|
||||
"minutesAgo_other": "{{count}} mins ago",
|
||||
"hoursAgo_one": "{{count}} hr ago",
|
||||
"hoursAgo_other": "{{count}} hrs ago",
|
||||
"minutesAgo_single": "{{count}} min ago",
|
||||
"minutesAgo_plural": "{{count}} mins ago",
|
||||
"hoursAgo_single": "{{count}} hr ago",
|
||||
"hoursAgo_plural": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -285,10 +285,6 @@
|
||||
"noEmailsDescription": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"dateFormat": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo_one": "{{count}} min ago",
|
||||
"minutesAgo_other": "{{count}} mins ago",
|
||||
"hoursAgo_one": "{{count}} hr ago",
|
||||
"hoursAgo_other": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -285,10 +285,6 @@
|
||||
"noEmailsDescription": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"dateFormat": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo_one": "{{count}} min ago",
|
||||
"minutesAgo_other": "{{count}} mins ago",
|
||||
"hoursAgo_one": "{{count}} hr ago",
|
||||
"hoursAgo_other": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -285,10 +285,6 @@
|
||||
"noEmailsDescription": "Je hebt nog geen e-mails ontvangen op je privé e-mailadressen. Wanneer je een nieuwe e-mail ontvangt, zal deze hier verschijnen.",
|
||||
"dateFormat": {
|
||||
"justNow": "zojuist",
|
||||
"minutesAgo_one": "{{count}} min geleden",
|
||||
"minutesAgo_other": "{{count}} min. geleden",
|
||||
"hoursAgo_one": "{{count}} uur geleden",
|
||||
"hoursAgo_other": "{{count}} uur geleden",
|
||||
"yesterday": "gisteren"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -285,10 +285,6 @@
|
||||
"noEmailsDescription": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"dateFormat": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo_one": "{{count}} min ago",
|
||||
"minutesAgo_other": "{{count}} mins ago",
|
||||
"hoursAgo_one": "{{count}} hr ago",
|
||||
"hoursAgo_other": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -58,10 +58,18 @@ export function EmailCard({ email }: EmailCardProps) : React.ReactNode {
|
||||
return t('emails.time.justNow');
|
||||
} else if (secondsAgo < 3600) {
|
||||
const minutes = Math.floor(secondsAgo / 60);
|
||||
return t('emails.time.minutesAgo', { count: minutes });
|
||||
if (minutes === 1) {
|
||||
return t('emails.time.minutesAgo_single', { count: minutes });
|
||||
} else {
|
||||
return t('emails.time.minutesAgo_plural', { count: minutes });
|
||||
}
|
||||
} else if (secondsAgo < 86400) {
|
||||
const hours = Math.floor(secondsAgo / 3600);
|
||||
return t('emails.time.hoursAgo', { count: hours });
|
||||
if (hours === 1) {
|
||||
return t('emails.time.hoursAgo_single', { count: hours });
|
||||
} else {
|
||||
return t('emails.time.hoursAgo_plural', { count: hours });
|
||||
}
|
||||
} else if (secondsAgo < 172800) {
|
||||
return t('emails.time.yesterday');
|
||||
} else {
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
"emptyMessage": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"time": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {mins}}} ago",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {hr} other {hrs}}} ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -303,8 +303,10 @@
|
||||
"emptyMessage": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"time": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {mins}}} ago",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {hr} other {hrs}}} ago",
|
||||
"minutesAgo_single": "{{count}} min ago",
|
||||
"minutesAgo_plural": "{{count}} mins ago",
|
||||
"hoursAgo_single": "{{count}} hr ago",
|
||||
"hoursAgo_plural": "{{count}} hrs ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
"emptyMessage": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"time": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {mins}}} ago",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {hr} other {hrs}}} ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
"emptyMessage": "Vous n'avez pas encore reçu d'e-mails sur vos adresses e-mail privées. Quand vous recevez un nouvel e-mail, il apparaîtra ici.",
|
||||
"time": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {mins}}} ago",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {hr} other {hrs}}} ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
"emptyMessage": "Je hebt nog geen e-mails ontvangen op je privé e-mailadressen. Wanneer je een nieuwe e-mail ontvangt, zal deze hier verschijnen.",
|
||||
"time": {
|
||||
"justNow": "zojuist",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {min}}} geleden",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {uur} other {uur}}} geleden",
|
||||
"yesterday": "gisteren"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
"emptyMessage": "You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",
|
||||
"time": {
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "{{count}} {{count, plural, one {min} other {mins}}} ago",
|
||||
"hoursAgo": "{{count}} {{count, plural, one {hr} other {hrs}}} ago",
|
||||
"yesterday": "yesterday"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
Reference in New Issue
Block a user