-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Move URL out of Switcher strings.json #154240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey there @YogevBokobza, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Switcher integration's configuration flow to move a hardcoded documentation URL out of the translatable strings.json file and into a constant, making it non-translatable as intended.
- Extracts hardcoded URL from translatable string to a constant
- Uses placeholder interpolation to inject the URL into the description
- Applies the change to both credentials and reauth_confirm flow steps
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
homeassistant/components/switcher_kis/strings.json |
Replaces hardcoded URL with placeholder {prerequisites_url} |
homeassistant/components/switcher_kis/const.py |
Adds PREREQUISITES_URL constant for the documentation URL |
homeassistant/components/switcher_kis/config_flow.py |
Imports the constant and provides it via description_placeholders in both flow steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Thanks @thecode 👍
Proposed change
Move URL out of Switcher strings.json to avoid making it translatable
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: