Closed
Conversation
- Add optional language parameter to hacs/repository/info websocket command
- Implement async_get_info_file_contents_with_language method
- Support language-specific README files (README.{language}.md)
- Fallback to README.md if language-specific version not found
- Validate language codes (2-letter ISO 639-1)
- Fully backward compatible
rosch100
pushed a commit
to rosch100/frontend
that referenced
this pull request
Dec 1, 2025
- Add language code extraction from BCP47 format - Implement automatic language detection based on hass.language - Add backend support detection with intelligent caching - Update repository dashboard and download dialog to pass language - Add automatic reload when language changes - Fully backward compatible with graceful degradation - Add comprehensive documentation and testing guides Related backend PR: hacs/integration#4964
6 tasks
Author
|
Closed in favor of PR #4965 which uses a proper feature branch instead of main branch. |
ludeeus
requested changes
Dec 1, 2025
|
|
||
| return await self.get_documentation(filename=info_files[0], version=version) or "" | ||
|
|
||
| async def async_get_info_file_contents_with_language( |
Member
There was a problem hiding this comment.
If this is being added, supported languages needs to be declared in hacs.json
This then needs to be validated on repository registration and with the HACS action.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for multilingual README files in the HACS backend.
Changes
languageparameter forhacs/repository/infoasync_get_info_file_contents_with_languageREADME.de.md,README.fr.md)README.mdif language-specific version doesn't existFrontend Status
Supported File Formats
README.md- Standard (English or fallback)README.{language}.md- Language-specific (e.g.,README.de.md,README.fr.md)Testing
The implementation has been tested and is fully backward compatible. Old frontend versions without the
languageparameter continue to work.References
BACKEND_IMPLEMENTATION_GUIDE.md