From 52b743e88a9f2a90f328d95bd24a7928f705116f Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Mon, 1 Jul 2024 16:39:01 +0100 Subject: [PATCH] Add exception translations (#120937) --- homeassistant/components/azure_devops/coordinator.py | 5 +++-- homeassistant/components/azure_devops/strings.json | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/azure_devops/coordinator.py b/homeassistant/components/azure_devops/coordinator.py index d7531c130e9..22dbe32c103 100644 --- a/homeassistant/components/azure_devops/coordinator.py +++ b/homeassistant/components/azure_devops/coordinator.py @@ -78,8 +78,9 @@ class AzureDevOpsDataUpdateCoordinator(DataUpdateCoordinator[AzureDevOpsData]): ) if not self.client.authorized: raise ConfigEntryAuthFailed( - "Could not authorize with Azure DevOps. You will need to update your" - " token" + translation_domain=DOMAIN, + translation_key="authentication_failed", + translation_placeholders={"title": self.title}, ) return True diff --git a/homeassistant/components/azure_devops/strings.json b/homeassistant/components/azure_devops/strings.json index 7bd6d8af561..8a17169fb6b 100644 --- a/homeassistant/components/azure_devops/strings.json +++ b/homeassistant/components/azure_devops/strings.json @@ -62,5 +62,10 @@ "name": "{definition_name} latest build url" } } + }, + "exceptions": { + "authentication_failed": { + "message": "Could not authorize with Azure DevOps for {title}. You will need to update your personal access token." + } } }