From 0c3489c1b3a15f2e12aa8e18280652a8e3f1e623 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 2 Jan 2025 13:29:46 +0100 Subject: [PATCH] Adjust language in backup integration (#134440) * Adjust language in backup integration * Update tests --- homeassistant/components/backup/manager.py | 2 +- homeassistant/components/backup/strings.json | 4 ++-- tests/components/backup/snapshots/test_websocket.ambr | 6 +++--- tests/components/backup/test_manager.py | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/backup/manager.py b/homeassistant/components/backup/manager.py index 9515ab89cd2..dad5b038459 100644 --- a/homeassistant/components/backup/manager.py +++ b/homeassistant/components/backup/manager.py @@ -728,7 +728,7 @@ class BackupManager: backup_name = ( name - or f"{"Automatic" if with_automatic_settings else "Custom"} {HAVERSION}" + or f"{"Automatic" if with_automatic_settings else "Custom"} backup {HAVERSION}" ) new_backup, self._backup_task = await self._reader_writer.async_create_backup( agent_ids=agent_ids, diff --git a/homeassistant/components/backup/strings.json b/homeassistant/components/backup/strings.json index d9de2bff861..43ae57cc781 100644 --- a/homeassistant/components/backup/strings.json +++ b/homeassistant/components/backup/strings.json @@ -5,8 +5,8 @@ "description": "The automatic backup could not be created. Please check the logs for more information. Another attempt will be made at the next scheduled time if a backup schedule is configured." }, "automatic_backup_failed_upload_agents": { - "title": "Automatic backup could not be uploaded to agents", - "description": "The automatic backup could not be uploaded to agents {failed_agents}. Please check the logs for more information. Another attempt will be made at the next scheduled time if a backup schedule is configured." + "title": "Automatic backup could not be uploaded to the configured locations", + "description": "The automatic backup could not be uploaded to the configured locations {failed_agents}. Please check the logs for more information. Another attempt will be made at the next scheduled time if a backup schedule is configured." } }, "services": { diff --git a/tests/components/backup/snapshots/test_websocket.ambr b/tests/components/backup/snapshots/test_websocket.ambr index 16640a95ddb..98b2f764d43 100644 --- a/tests/components/backup/snapshots/test_websocket.ambr +++ b/tests/components/backup/snapshots/test_websocket.ambr @@ -2574,7 +2574,7 @@ dict({ 'id': 2, 'result': dict({ - 'backup_job_id': 'fceef4e6', + 'backup_job_id': '64331d85', }), 'success': True, 'type': 'result', @@ -2645,7 +2645,7 @@ dict({ 'id': 2, 'result': dict({ - 'backup_job_id': 'fceef4e6', + 'backup_job_id': '64331d85', }), 'success': True, 'type': 'result', @@ -2716,7 +2716,7 @@ dict({ 'id': 2, 'result': dict({ - 'backup_job_id': 'fceef4e6', + 'backup_job_id': '64331d85', }), 'success': True, 'type': 'result', diff --git a/tests/components/backup/test_manager.py b/tests/components/backup/test_manager.py index 9b652edb087..7ddd4ec97e1 100644 --- a/tests/components/backup/test_manager.py +++ b/tests/components/backup/test_manager.py @@ -121,7 +121,7 @@ async def test_async_create_backup( assert create_backup.called assert create_backup.call_args == call( agent_ids=["backup.local"], - backup_name="Custom 2025.1.0", + backup_name="Custom backup 2025.1.0", extra_metadata={ "instance_id": hass.data["core.uuid"], "with_automatic_settings": False, @@ -254,7 +254,7 @@ async def test_async_initiate_backup( ws_client = await hass_ws_client(hass) include_database = params.get("include_database", True) - name = params.get("name", "Custom 2025.1.0") + name = params.get("name", "Custom backup 2025.1.0") password = params.get("password") path_glob.return_value = [] @@ -502,7 +502,7 @@ async def test_async_initiate_backup_with_agent_error( "folders": [], "homeassistant_included": True, "homeassistant_version": "2025.1.0", - "name": "Custom 2025.1.0", + "name": "Custom backup 2025.1.0", "protected": False, "size": 123, "with_automatic_settings": False,