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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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."
}
}
}