@@ -40,13 +73,23 @@ const Preview = ({ subject, body, attachments }: PreviewProps) => {
- {attachments?.map((attachment) => (
-
-
- {attachment}
-
+ {attachments && attachments.length > 0 && (
+
+ {attachments.map((attachment) => (
+
+
+
{attachment.name}
+
{bytesToString({ size: attachment.size })}
+
onDownload(attachment)}
+ />
+
+ ))}
- ))}
+ )}
);
};
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index b90cbb0..f5dd620 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -118,6 +118,9 @@
"bcc": "BCC",
"decrypting": "Decrypting message…",
"decryptFailed": "Could not decrypt this message",
+ "errors": {
+ "downloadAttachmentFailed": "Could not download the attachment"
+ },
"emptyEmail": {
"unreadEmails": {
"title": "Unread messages",
@@ -197,7 +200,13 @@
"encryptedBadge": "End-to-end encrypted",
"cleartextBadge": "Not encrypted",
"errors": {
+ "noRecipients": "Add at least one recipient before sending",
+ "sendFailed": "Could not send the email",
+ "keyLookupFailed": "Could not fetch recipient keys",
"attachmentsTooLarge": "Attachments exceed the {{maxSize}} limit"
+ },
+ "attachments": {
+ "totalSize": "{{used}} of {{max}}"
}
},
"preferences": {
@@ -238,4 +247,4 @@
"movedToFolder_many": "{{count}} conversations moved to \"{{folder}}\"",
"undo": "Undo"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json
index 30e6cd4..db06cf7 100644
--- a/src/i18n/locales/es.json
+++ b/src/i18n/locales/es.json
@@ -120,6 +120,9 @@
"bcc": "CCO",
"decrypting": "Descifrando mensaje…",
"decryptFailed": "No se pudo descifrar este mensaje",
+ "errors": {
+ "downloadAttachmentFailed": "No se pudo descargar el adjunto"
+ },
"emptyEmail": {
"unreadEmails": {
"title": "Mensajes sin leer",
@@ -199,7 +202,13 @@
"encryptedBadge": "Cifrado de extremo a extremo",
"cleartextBadge": "Sin cifrar",
"errors": {
- "attachmentsTooLarge": "Los archivos adjuntos superan el límite de {{maxSize}}"
+ "noRecipients": "Agrega al menos un destinatario antes de enviar",
+ "sendFailed": "No se pudo enviar el correo",
+ "keyLookupFailed": "No se pudieron obtener las claves del destinatario",
+ "attachmentsTooLarge": "Los adjuntos superan el límite de {{maxSize}}"
+ },
+ "attachments": {
+ "totalSize": "{{used}} de {{max}}"
}
},
"preferences": {
@@ -240,4 +249,4 @@
"movedToFolder_many": "{{count}} conversaciones movidas a \"{{folder}}\"",
"undo": "Deshacer"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json
index 573b4aa..a54298d 100644
--- a/src/i18n/locales/fr.json
+++ b/src/i18n/locales/fr.json
@@ -120,6 +120,9 @@
"bcc": "CCI",
"decrypting": "Déchiffrement du message…",
"decryptFailed": "Impossible de déchiffrer ce message",
+ "errors": {
+ "downloadAttachmentFailed": "Impossible de télécharger la pièce jointe"
+ },
"emptyEmail": {
"unreadEmails": {
"title": "Messages non lus",
@@ -199,7 +202,13 @@
"encryptedBadge": "Chiffré de bout en bout",
"cleartextBadge": "Non chiffré",
"errors": {
+ "noRecipients": "Ajoutez au moins un destinataire avant d'envoyer",
+ "sendFailed": "Impossible d'envoyer le courriel",
+ "keyLookupFailed": "Impossible de récupérer les clés du destinataire",
"attachmentsTooLarge": "Les pièces jointes dépassent la limite de {{maxSize}}"
+ },
+ "attachments": {
+ "totalSize": "{{used}} sur {{max}}"
}
},
"preferences": {
@@ -240,4 +249,4 @@
"movedToFolder_many": "{{count}} conversations déplacées vers « {{folder}} »",
"undo": "Annuler"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json
index 591b679..4c80896 100644
--- a/src/i18n/locales/it.json
+++ b/src/i18n/locales/it.json
@@ -120,6 +120,9 @@
"bcc": "CCN",
"decrypting": "Decrittazione del messaggio…",
"decryptFailed": "Impossibile decrittare questo messaggio",
+ "errors": {
+ "downloadAttachmentFailed": "Impossibile scaricare l'allegato"
+ },
"emptyEmail": {
"unreadEmails": {
"title": "Messaggi non letti",
@@ -199,7 +202,13 @@
"encryptedBadge": "Crittografia end-to-end",
"cleartextBadge": "Non crittografato",
"errors": {
+ "noRecipients": "Aggiungi almeno un destinatario prima di inviare",
+ "sendFailed": "Impossibile inviare l'email",
+ "keyLookupFailed": "Impossibile recuperare le chiavi del destinatario",
"attachmentsTooLarge": "Gli allegati superano il limite di {{maxSize}}"
+ },
+ "attachments": {
+ "totalSize": "{{used}} di {{max}}"
}
},
"preferences": {
@@ -240,4 +249,4 @@
"movedToFolder_many": "{{count}} conversazioni spostate in \"{{folder}}\"",
"undo": "Annulla"
}
-}
\ No newline at end of file
+}