Draft
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
ludeeus
requested changes
Dec 1, 2025
- Add supported_languages field to HacsManifest class - Add _supported_languages_validator to validate ISO 639-1 language codes - Add supported_languages to HACS_MANIFEST_JSON_SCHEMA - Add validation in hacsjson.py to check if declared README files exist - Add runtime check in async_get_info_file_contents_with_language to only use declared languages - Fixes review comments from ludeeus
4f826be to
33e8da3
Compare
6 tasks
Author
|
All requested changes have been implemented: ✅ supported_languages field added to hacs.json schema
✅ Validation on repository registration and HACS action
✅ Formatting issues fixed
All changes have been committed and pushed. Ready for review. |
5 tasks
Author
|
Hi @hacs/maintainers, could you please add the |
added 2 commits
December 2, 2025 11:53
- Extract base language code from BCP47 format (e.g., 'de-DE' -> 'de') - Keep supported_languages runtime check as per ludeeus requirement - All language processing logic now in backend
- Fix case combination mismatch: validator now checks same 6 combinations as runtime - Add language code format validation in validator (2-letter alphabetic) - Fix filename vs full_path inconsistency: use full_path consistently - Normalize supported_languages to lowercase when loading from manifest - Remove unnecessary comments
Author
|
Hi @ludeeus, All requested changes have been implemented and pushed. The code is ready for re-review. |
added 2 commits
December 2, 2025 13:32
- Add _supported_languages_validator to validate language codes - Add supported_languages to HACS_MANIFEST_JSON_SCHEMA as optional field - Validator handles None values and normalizes to lowercase - Remove unnecessary comment in websocket handler
- Add language code validation for string values in validator - Fix filename vs full_path inconsistency in hacsjson validator - Use filename instead of full_path for README file matching (consistent with information.py)
added 3 commits
December 2, 2025 14:50
…o content_languages
- Add async_get_description_with_language() method to support multilingual descriptions
- Extend WebSocket handlers to use language parameter for descriptions
- Rename supported_languages to content_languages in manifest and validators
- Update validation to check content_languages for both README and description files
- Support DESCRIPTION.{language_code}.txt files with automatic language detection
- Remove async_get_description_with_language() method - Remove language parameter from hacs/repositories/list WebSocket command - Remove description language handling from hacs/repository/info - Update PR description to reflect README-only support
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add Multilingual README Support
Summary
This PR adds support for multilingual README files in HACS. Users will automatically see content in their Home Assistant language setting if available, with fallback to default English content.
Changes
Multilingual README Support
async_get_info_file_contents_with_language()methodREADME.{language_code}.mdfiles (e.g.,README.de.md,README.fr.md)README.mdManifest Updates
supported_languagestocontent_languagesinhacs.jsonmanifestcontent_languageskeyWebSocket Handler Updates
hacs/repository/infoto use language parameter for README contentRelated PRs
Checklist
Notes
README.{language_code}.md(e.g.,README.de.md,README.fr.md)de,fr,es)content_languageskey inhacs.jsoncan optionally declare supported languages for validation