Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9338c5d
Add multilingual README support
Dec 1, 2025
bea0e52
Fix race condition and language change detection bugs
Dec 1, 2025
cfc2527
Update PR description with bug fixes documentation
Dec 1, 2025
5a3af08
Fix: Remove language parameter from message when backend doesn't supp…
Dec 1, 2025
ae029a7
docs: Add bug fix #3 to pull request description
Dec 1, 2025
3180c9d
docs: Update backend PR reference to #4965
Dec 1, 2025
557f8e3
chore: Add debug files to .gitignore
Dec 1, 2025
b5cb425
Fix: Handle null cache after concurrent backend support check
Dec 1, 2025
64c5660
docs: Update PR description with bug fix #4
Dec 1, 2025
d0b8454
Fix: Prevent duplicate requests after concurrent backend support check
Dec 1, 2025
109ab87
docs: Add bug fix #5 to PR description
Dec 1, 2025
32ba636
Refactor: Move multilingual README logic to backend
Dec 2, 2025
169f214
Add multilingual README support
Dec 2, 2025
4183752
Update PULL_REQUEST.md with testing requirements and type of change
Dec 2, 2025
934de21
Clean up PULL_REQUEST.md: remove redundant text and improve clarity
Dec 2, 2025
1f9bca1
Remove bug fixes section from PR description
Dec 2, 2025
4c1c890
Simplify PULL_REQUEST.md: remove redundant sections
Dec 2, 2025
6ec25ba
Refactor: Move language processing logic to backend
Dec 2, 2025
d66de08
Simplify language parameter handling and clean up .gitignore
Dec 2, 2025
a918ec5
Update PR description: simplify and clarify implementation details
Dec 2, 2025
c1c09fe
Update PR description: Add multilingual description support
Dec 2, 2025
fb9d1b9
Refactor: Add multilingual README and description support
cursoragent Dec 2, 2025
05776dd
fix: Address review comments - remove PULL_REQUEST.md and fix updated…
Dec 2, 2025
93ffd45
refactor: Remove language parameter from getRepositories()
Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ yarn-error.log
.yarn/*
!.yarn/releases
!.yarn/releases/yarn-*.cjs

42 changes: 42 additions & 0 deletions PULL_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Add Multilingual README and Description Support

## Summary

This PR adds support for multilingual README files and repository descriptions in HACS. The frontend passes the user's Home Assistant language setting (`hass.language`) to the backend via the `hacs/repository/info` and `hacs/repositories/list` WebSocket commands. The backend handles all language processing, file selection, and fallback logic.

## Related Backend PR

This frontend implementation requires the corresponding backend changes:
- **Backend PR:** https://github.com/hacs/integration/pull/4965

## Changes

1. **Repository Information Fetching** (`src/data/repository.ts`)
- Added `language` parameter to `fetchRepositoryInformation()` function
- Always includes `language` field in WebSocket message (uses `hass.language` as fallback)

2. **Repository List** (`src/data/websocket.ts`)
- Added `language` parameter to `getRepositories()` function
- Passes language to backend for multilingual description support

3. **Repository Dashboard** (`src/dashboards/hacs-repository-dashboard.ts`)
- Passes `hass.language` when fetching repository information
- Detects language changes in `updated()` lifecycle hook and automatically refetches repository data

4. **Download Dialog** (`src/components/dialogs/hacs-download-dialog.ts`)
- Passes `hass.language` when fetching repository information

## Checklist

- [x] Code follows project style guidelines
- [x] Changes are backward compatible
- [x] Code tested locally
- [x] TypeScript types are correct
- [x] Works with backend PR #4965

## Notes

- This PR only implements the frontend changes. The backend must be updated separately (PR #4965).
- Repository maintainers can provide multilingual README files using the pattern `README.{language_code}.md` (e.g., `README.de.md`, `README.fr.md`). The default `README.md` is always used as fallback.
- Repository descriptions can also be multilingual using `DESCRIPTION.{language_code}.txt` files (e.g., `DESCRIPTION.de.txt`, `DESCRIPTION.fr.txt`). Falls back to GitHub repository description if not found.

15 changes: 0 additions & 15 deletions script/build

This file was deleted.

Loading