diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItem.kt index 0d19ac8f57..2076684be4 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItem.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItem.kt @@ -25,7 +25,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow -import com.infomaniak.core2.FORMAT_DATE_SIMPLE import com.infomaniak.core2.FORMAT_DATE_TITLE import com.infomaniak.core2.format import com.infomaniak.multiplatform_swisstransfer.common.interfaces.ui.FileUi @@ -48,23 +47,15 @@ import java.util.UUID fun TransferItem(transfer: TransferUi, onClick: () -> Unit) { val createdDate = Date(transfer.createdDateTimestamp).format(FORMAT_DATE_TITLE) - val expirationDate = Date(transfer.expirationDateTimestamp) val remainingDays = transfer.expiresInDays val remainingDownloads = transfer.downloadLeft val uploadedSize = HumanReadableSizeUtils.getHumanReadableSize(LocalContext.current, transfer.sizeUploaded) val files = transfer.files val filesCount = files.count() - val (expiryText, expiryColor) = when { - remainingDays < 0 -> { - stringResource(R.string.expiredThe, expirationDate.format(FORMAT_DATE_SIMPLE)) to - SwissTransferTheme.materialColors.error - } - remainingDownloads == 0 -> { - "Transfert expiré (TODO)" to SwissTransferTheme.materialColors.error - } - else -> { - stringResource(R.string.expiresIn, remainingDays) to SwissTransferTheme.colors.secondaryTextColor - } + val (expiryText, expiryColor) = if (remainingDays < 0 || remainingDownloads == 0) { + stringResource(R.string.transferExpired) to SwissTransferTheme.materialColors.error + } else { + stringResource(R.string.expiresIn, remainingDays) to SwissTransferTheme.colors.secondaryTextColor } Card( diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b87f5f157b..f5d2d50cb5 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -29,7 +29,6 @@ Datei entfernen Passwort anzeigen Neuer Transfer - Abgelaufen am %s Verfällt in %d Tagen %d Datei @@ -88,6 +87,7 @@ Link in die Zwischenablage kopiert Es wurde keine Anwendung gefunden, die diese Aktion bearbeitet (Fakultativ) + Transfer abgelaufen Aus dem Verlauf löschen Tut mir leid, diese Übertragung ist am %s abgelaufen. Du kannst die Dateien nicht mehr herunterladen oder ansehen. Entschuldigung, diese Übertragung hat die Grenze der %d möglichen Downloads erreicht. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 88aaa76777..e68db413fa 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -29,7 +29,6 @@ Eliminar archivo Mostrar contraseña Nueva transferencia - Expirado el %s Caduca en %d días %d archivo @@ -88,6 +87,7 @@ Enlace copiado en el portapapeles No se ha encontrado ninguna aplicación que gestione esta acción (Opcional) + Transferencia caducada Borrar del historial Lo sentimos, esta transferencia expiró el %s. Ya no puede descargar ni ver los archivos. Lo sentimos, esta transferencia ha alcanzado el límite de %d descargas posibles. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index c79aa2f9b8..ba40a11ecd 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -29,7 +29,6 @@ Supprimer le fichier Afficher le mot de passe Nouveau transfert - Expiré le %s Expire dans %d jours %d fichier @@ -89,6 +88,7 @@ Lien copié dans le presse-papiers Aucune application n’a été trouvée pour gérer cette action (Facultatif) + Transfert expiré Supprimer de l’historique Désolé, ce transfert a expiré le %s. Tu ne peux plus télécharger ni consulter les fichiers. Désolé, ce transfert a atteint la limite de %d téléchargements possibles. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 34080d7356..46af34ee9e 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -29,7 +29,6 @@ Rimuovi il file Mostra password Nuovo trasferimento - Scaduto il %s Scade tra %d giorni %d file @@ -88,6 +87,7 @@ Link copiato negli appunti Non è stata trovata alcuna applicazione in grado di gestire questa azione (Opzionale) + Trasferimento scaduto Cancellare dalla cronologia Spiacente, questo trasferimento è scaduto il %s. Non è più possibile scaricare o visualizzare i file. Spiacente, questo trasferimento ha raggiunto il limite di %d download possibili. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5810438af1..9ef0a355aa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,7 +34,6 @@ Remove file Show password New transfer - Expired on %s Expires in %d days %d file @@ -93,6 +92,7 @@ Link copied to clipboard No application has been found to handle this action (Optional) + Transfer expired Delete from history Sorry, this transfer expired on %s. You can no longer download or view the files. Sorry, this transfer has reached the limit of %d possible downloads.