Skip to content

Fix HACS translation validation: use description placeholders for URLs#44

Merged
krissen merged 3 commits intomasterfrom
dev
Feb 25, 2026
Merged

Fix HACS translation validation: use description placeholders for URLs#44
krissen merged 3 commits intomasterfrom
dev

Conversation

@krissen
Copy link
Owner

@krissen krissen commented Feb 18, 2026

Summary

  • Replace inline URLs in all 16 translation files with {api_key_url} placeholder
  • Pass the actual URL via description_placeholders in config_flow.py
  • Fixes HACS CI error: "the string should not contain URLs, please use description placeholders instead"

Test plan

  • Verify HACS validation CI passes
  • Confirm the API key URL still renders correctly in the config flow UI

HACS validation requires URLs to use description_placeholders
instead of being inline in translation strings.
@krissen krissen requested a review from Copilot February 24, 2026 08:42
@krissen krissen added the bug Something isn't working label Feb 24, 2026
@krissen krissen self-assigned this Feb 24, 2026
Copy link

Copilot AI left a 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 fixes a HACS translation validation error by replacing inline URLs with description placeholders across all 16 translation files and the config flow. The HACS validator requires that translation strings should not contain URLs directly, but instead use placeholders with the actual URL passed via description_placeholders.

Changes:

  • Replaced hardcoded URL https://www.polleninformation.at/en/data-interface/request-an-api-key with placeholder {api_key_url} in all 16 translation files
  • Updated config_flow.py to pass the API key URL via description_placeholders parameter
  • Ensures HACS CI validation will pass

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
custom_components/polleninformation/translations/en.json Replaced inline URL with {api_key_url} placeholder in config step description
custom_components/polleninformation/translations/de.json Replaced inline URL with {api_key_url} placeholder (German translation)
custom_components/polleninformation/translations/es.json Replaced inline URL with {api_key_url} placeholder (Spanish translation)
custom_components/polleninformation/translations/fi.json Replaced inline URL with {api_key_url} placeholder (Finnish translation)
custom_components/polleninformation/translations/fr.json Replaced inline URL with {api_key_url} placeholder (French translation)
custom_components/polleninformation/translations/hu.json Replaced inline URL with {api_key_url} placeholder (Hungarian translation)
custom_components/polleninformation/translations/it.json Replaced inline URL with {api_key_url} placeholder (Italian translation)
custom_components/polleninformation/translations/lt.json Replaced inline URL with {api_key_url} placeholder (Lithuanian translation)
custom_components/polleninformation/translations/lv.json Replaced inline URL with {api_key_url} placeholder (Latvian translation)
custom_components/polleninformation/translations/pl.json Replaced inline URL with {api_key_url} placeholder (Polish translation)
custom_components/polleninformation/translations/pt.json Replaced inline URL with {api_key_url} placeholder (Portuguese translation)
custom_components/polleninformation/translations/ru.json Replaced inline URL with {api_key_url} placeholder (Russian translation)
custom_components/polleninformation/translations/sk.json Replaced inline URL with {api_key_url} placeholder (Slovak translation)
custom_components/polleninformation/translations/sv.json Replaced inline URL with {api_key_url} placeholder (Swedish translation)
custom_components/polleninformation/translations/tr.json Replaced inline URL with {api_key_url} placeholder (Turkish translation)
custom_components/polleninformation/translations/uk.json Replaced inline URL with {api_key_url} placeholder (Ukrainian translation)
custom_components/polleninformation/config_flow.py Added description_placeholders parameter with the API key URL to async_show_form call

Both config_flow and options_flow now import from const.py
instead of hardcoding the URL.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

@krissen krissen merged commit 2a0b35d into master Feb 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants