Add exception translations (#120937)

This commit is contained in:
Aidan Timson
2024-07-01 16:39:01 +01:00
committed by GitHub
parent 788d1999ff
commit 52b743e88a
2 changed files with 8 additions and 2 deletions

View File

@@ -78,8 +78,9 @@ class AzureDevOpsDataUpdateCoordinator(DataUpdateCoordinator[AzureDevOpsData]):
) )
if not self.client.authorized: if not self.client.authorized:
raise ConfigEntryAuthFailed( raise ConfigEntryAuthFailed(
"Could not authorize with Azure DevOps. You will need to update your" translation_domain=DOMAIN,
" token" translation_key="authentication_failed",
translation_placeholders={"title": self.title},
) )
return True return True

View File

@@ -62,5 +62,10 @@
"name": "{definition_name} latest build url" "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."
}
} }
} }