@@ -317,10 +331,11 @@ function BookDownloadCard({ book, status, onDelete, onRetry }: BookDownloadCardP
•
{status.status === "downloading"
- ? `${Math.floor((status.progress * book.media.pagesCount) / 100)}/${
- book.media.pagesCount
- } pages`
- : `${book.media.pagesCount} pages`}
+ ? t("downloads.info.pages", {
+ current: Math.floor((status.progress * book.media.pagesCount) / 100),
+ total: book.media.pagesCount,
+ })
+ : t("downloads.info.totalPages", { count: book.media.pagesCount })}
@@ -342,7 +357,7 @@ function BookDownloadCard({ book, status, onDelete, onRetry }: BookDownloadCardP
variant="ghost"
size="icon"
onClick={onRetry}
- title="Réessayer"
+ title={t("downloads.actions.retry")}
className="h-8 w-8 p-0 rounded-br-lg rounded-tl-lg"
>
@@ -354,7 +369,7 @@ function BookDownloadCard({ book, status, onDelete, onRetry }: BookDownloadCardP
variant="ghost"
size="icon"
onClick={onDelete}
- title="Supprimer"
+ title={t("downloads.actions.delete")}
className="h-8 w-8 p-0 rounded-br-lg rounded-tl-lg"
>
diff --git a/src/components/layout/PageHeader.tsx b/src/components/layout/PageHeader.tsx
deleted file mode 100644
index 4f4c2d6..0000000
--- a/src/components/layout/PageHeader.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-interface PageHeaderProps {
- title: string;
- description?: string;
-}
-
-export function PageHeader({ title, description }: PageHeaderProps) {
- return (
-
-
{title}
- {description &&
{description}
}
-
- );
-}
diff --git a/src/i18n/messages/en/common.json b/src/i18n/messages/en/common.json
index d1df69c..c849e8b 100644
--- a/src/i18n/messages/en/common.json
+++ b/src/i18n/messages/en/common.json
@@ -174,5 +174,49 @@
"unread": "Unread"
},
"loading": "Loading..."
+ },
+ "downloads": {
+ "page": {
+ "title": "Downloads",
+ "description": "Manage your offline available books"
+ },
+ "tabs": {
+ "all": "All ({count})",
+ "downloading": "Downloading ({count})",
+ "available": "Available ({count})",
+ "error": "Errors ({count})"
+ },
+ "empty": {
+ "all": "No downloaded books",
+ "downloading": "No downloads in progress",
+ "available": "No books available offline",
+ "error": "No errors"
+ },
+ "actions": {
+ "retryAll": "Retry all",
+ "retry": "Retry",
+ "delete": "Delete"
+ },
+ "status": {
+ "downloading": "Downloading",
+ "available": "Available offline",
+ "error": "Download error",
+ "idle": "Not downloaded"
+ },
+ "toast": {
+ "deleted": "Book deleted",
+ "deletedDesc": "The book is no longer available offline",
+ "error": "Error",
+ "errorDesc": "An error occurred while deleting",
+ "retryAll": "Retrying downloads",
+ "retryAllDesc": "{count} download(s) restarted",
+ "retryDesc": "Download will start from the beginning",
+ "retry": "Download restarted"
+ },
+ "info": {
+ "size": "{size} MB",
+ "pages": "{current}/{total} pages",
+ "totalPages": "{count} pages"
+ }
}
}
diff --git a/src/i18n/messages/fr/common.json b/src/i18n/messages/fr/common.json
index 2562911..6febf4b 100644
--- a/src/i18n/messages/fr/common.json
+++ b/src/i18n/messages/fr/common.json
@@ -174,5 +174,49 @@
"unread": "À lire"
},
"loading": "Chargement..."
+ },
+ "downloads": {
+ "page": {
+ "title": "Téléchargements",
+ "description": "Gérez vos livres disponibles hors ligne"
+ },
+ "tabs": {
+ "all": "Tous ({count})",
+ "downloading": "En cours ({count})",
+ "available": "Disponibles ({count})",
+ "error": "Erreurs ({count})"
+ },
+ "empty": {
+ "all": "Aucun livre téléchargé",
+ "downloading": "Aucun téléchargement en cours",
+ "available": "Aucun livre disponible hors ligne",
+ "error": "Aucune erreur"
+ },
+ "actions": {
+ "retryAll": "Tout relancer",
+ "retry": "Réessayer",
+ "delete": "Supprimer"
+ },
+ "status": {
+ "downloading": "En cours de téléchargement",
+ "available": "Disponible hors ligne",
+ "error": "Erreur de téléchargement",
+ "idle": "Non téléchargé"
+ },
+ "toast": {
+ "deleted": "Livre supprimé",
+ "deletedDesc": "Le livre n'est plus disponible hors ligne",
+ "error": "Erreur",
+ "errorDesc": "Une erreur est survenue lors de la suppression",
+ "retryAll": "Relance des téléchargements",
+ "retryAllDesc": "{count} téléchargement(s) relancé(s)",
+ "retryDesc": "Le téléchargement va reprendre depuis le début",
+ "retry": "Téléchargement relancé"
+ },
+ "info": {
+ "size": "{size} Mo",
+ "pages": "{current}/{total} pages",
+ "totalPages": "{count} pages"
+ }
}
}