Skip to content

Commit

Permalink
Add exception translations (#120937)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed Jul 1, 2024
1 parent 788d199 commit 52b743e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions homeassistant/components/azure_devops/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ async def authorize(
)
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
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/azure_devops/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
}

0 comments on commit 52b743e

Please sign in to comment.