From 61defdb4c1b19ac60319c627c07fc907c77bb27b Mon Sep 17 00:00:00 2001 From: mh4ckt3mh4ckt1c4s Date: Fri, 10 Nov 2023 20:58:37 +0100 Subject: [PATCH] Fix backup error message if archive already exists --- locales/en.json | 2 +- locales/fr.json | 2 +- src/backup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/en.json b/locales/en.json index e7deb9e95..7755147cc 100644 --- a/locales/en.json +++ b/locales/en.json @@ -105,7 +105,7 @@ "backup_archive_broken_link": "Could not access the backup archive (broken link to {path})", "backup_archive_cant_retrieve_info_json": "Could not load info for archive '{archive}'... The info.json file cannot be retrieved (or is not a valid json).", "backup_archive_corrupted": "It looks like the backup archive '{archive}' is corrupted : {error}", - "backup_archive_name_exists": "A backup archive with this name already exists.", + "backup_archive_name_exists": "A backup archive with the name '{name}' already exists.", "backup_archive_name_unknown": "Unknown local backup archive named '{name}'", "backup_archive_open_failed": "Could not open the backup archive", "backup_archive_system_part_not_available": "System part '{part}' unavailable in this backup", diff --git a/locales/fr.json b/locales/fr.json index d439516de..190788ff1 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -23,7 +23,7 @@ "ask_password": "Mot de passe", "backup_app_failed": "Impossible de sauvegarder {app}", "backup_archive_app_not_found": "{app} n'a pas été trouvée dans l'archive de la sauvegarde", - "backup_archive_name_exists": "Une archive de sauvegarde avec ce nom existe déjà.", + "backup_archive_name_exists": "Une archive de sauvegarde avec le nom '{name}' existe déjà.", "backup_archive_name_unknown": "L'archive locale de sauvegarde nommée '{name}' est inconnue", "backup_archive_open_failed": "Impossible d'ouvrir l'archive de la sauvegarde", "backup_cleaning_failed": "Impossible de nettoyer le dossier temporaire de sauvegarde", diff --git a/src/backup.py b/src/backup.py index 7dffce321..3b66cec97 100644 --- a/src/backup.py +++ b/src/backup.py @@ -2208,7 +2208,7 @@ def backup_create( # Validate there is no archive with the same name if name and name in backup_list()["archives"]: - raise YunohostValidationError("backup_archive_name_exists") + raise YunohostValidationError("backup_archive_name_exists", name=name) # By default we backup using the tar method if not methods: