diff --git a/frontend/src/components/DownloadCenter.tsx b/frontend/src/components/DownloadCenter.tsx index 0980baaa..08e41265 100644 --- a/frontend/src/components/DownloadCenter.tsx +++ b/frontend/src/components/DownloadCenter.tsx @@ -109,8 +109,10 @@ export default function DownloadCenter() { meta: { failTitle: "errors.writeFailed.removeShared" }, }); - const confirmThen = async (title: string, body: string, fn: () => void) => { - if (await confirm({ title, message: body, confirmLabel: title, danger: true })) fn(); + // The confirm button names the ACTION ("Remove"), never the dialog's question: labelled with the title + // it read "Re-download this file?", and the cancel dialog's own "Cancel" would sit beside "Cancel". + const confirmThen = async (title: string, body: string, action: string, fn: () => void) => { + if (await confirm({ title, message: body, confirmLabel: action, danger: true })) fn(); }; // One-click share (E7 S3 · D2-A): ensure a downloadable link, copy it, toast with "open in new tab" @@ -254,6 +256,7 @@ export default function DownloadCenter() { confirmThen( t("downloads.confirm.cancelTitle"), t("downloads.confirm.cancelBody"), + t("downloads.confirm.cancelAction"), () => act.mutate({ id: job.id, op: "cancel" }), ) } @@ -327,6 +330,7 @@ export default function DownloadCenter() { confirmThen( t("downloads.confirm.redownloadTitle"), t("downloads.confirm.redownloadBody"), + t("downloads.confirm.redownloadAction"), () => act.mutate({ id: job.id, op: "redownload" }), ) } @@ -340,6 +344,7 @@ export default function DownloadCenter() { confirmThen( t("downloads.confirm.deleteTitle"), t("downloads.confirm.deleteBody"), + t("downloads.actions.delete"), () => act.mutate({ id: job.id, op: "delete" }), ) } @@ -394,6 +399,7 @@ export default function DownloadCenter() { confirmThen( t("downloads.confirm.removeSharedTitle"), t("downloads.confirm.removeSharedBody"), + t("downloads.actions.removeShared"), () => removeShared.mutate(job.id), ) } diff --git a/frontend/src/i18n/locales/en/downloads.json b/frontend/src/i18n/locales/en/downloads.json index 7f0a8242..fb73b553 100644 --- a/frontend/src/i18n/locales/en/downloads.json +++ b/frontend/src/i18n/locales/en/downloads.json @@ -152,12 +152,14 @@ "confirm": { "cancelTitle": "Cancel download?", "cancelBody": "This stops the download and removes it from your queue.", + "cancelAction": "Stop download", "deleteTitle": "Remove download?", "deleteBody": "This removes it from your list. The file may stay cached for other users until it expires.", "removeSharedTitle": "Remove from your list?", "removeSharedBody": "This removes it from your shared list only — it won't delete the owner's file.", "redownloadTitle": "Re-download this file?", - "redownloadBody": "The current file is deleted and downloaded again under the latest format and naming rules. Any share links you've sent keep working and will point to the new file (a failed re-download leaves the link broken)." + "redownloadBody": "The current file is deleted and downloaded again under the latest format and naming rules. Any share links you've sent keep working and will point to the new file (a failed re-download leaves the link broken).", + "redownloadAction": "Re-download" }, "profiles": { "manage": "Manage formats", diff --git a/frontend/src/i18n/locales/hu/downloads.json b/frontend/src/i18n/locales/hu/downloads.json index 57c3b775..1c2685fe 100644 --- a/frontend/src/i18n/locales/hu/downloads.json +++ b/frontend/src/i18n/locales/hu/downloads.json @@ -152,12 +152,14 @@ "confirm": { "cancelTitle": "Megszakítod a letöltést?", "cancelBody": "Ez leállítja a letöltést és eltávolítja a sorból.", + "cancelAction": "Letöltés leállítása", "deleteTitle": "Eltávolítod a letöltést?", "deleteBody": "Ez eltávolítja a listádról. A fájl a lejáratáig még a gyorsítótárban maradhat mások számára.", "removeSharedTitle": "Eltávolítod a listádból?", "removeSharedBody": "Csak a te megosztott listádból tűnik el — a tulajdonos fájlját nem törli.", "redownloadTitle": "Újratöltöd ezt a fájlt?", - "redownloadBody": "A jelenlegi fájl törlődik és újra letöltődik a legfrissebb formátum- és elnevezési szabályokkal. A már elküldött megosztási linkek működnek tovább, és az új fájlra fognak mutatni (sikertelen újratöltés esetén a link törötten marad)." + "redownloadBody": "A jelenlegi fájl törlődik és újra letöltődik a legfrissebb formátum- és elnevezési szabályokkal. A már elküldött megosztási linkek működnek tovább, és az új fájlra fognak mutatni (sikertelen újratöltés esetén a link törötten marad).", + "redownloadAction": "Újratöltés" }, "profiles": { "manage": "Formátumok kezelése",