-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Description
The description_placeholders dictionary is missing the message key in multiple locations where 2FA key invalid errors are raised. Some translation files (e.g., en.json, bg.json, sv.json) define the 2fa_key_invalid error as "{otp_secret} is invalid.\n{message}" which expects both otp_secret and message placeholders. This will cause a KeyError or rendering issue for those languages.
Suggested Fix
Add "message": "" to the description_placeholders dictionary to maintain compatibility with all translations.
Locations (3 occurrences)
- File:
custom_components/alexa_media/config_flow.py - Multiple locations where
2fa_key_invaliderror is raised with description_placeholders
Example Fix
description_placeholders={
"otp_secret": self.config.get(CONF_OTPSECRET, ""),
"message": "",
}References
- PR chore: release 2025-11-29 #3183
- Original suggestion by @copilot-pull-request-reviewer
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed