feat: localization (en/es/fr/de) — supersedes #11#32
Merged
Conversation
Spanish/French/German strings contributed by @b0rv3g4r4 on PR #11. Translations are embedded as a const rather than fetched at runtime to avoid first-render latency and HACS dist-directory restructuring.
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.
Closes #10. Supersedes PR #11.
Summary
Adds embedded localization for the card UI in English, Spanish, French, and German.
Spanish, French, and German translations were originally contributed by @b0rv3g4r4 on PR #11. PR #11 went stale (last activity 2026-03-06) and conflicts with main; this PR carries that work forward, addresses the four review comments left on the original PR, and rebases against the current code.
Changes vs. PR #11
What's translated
Not yet translated (will land in a follow-up so this PR stays scoped):
HA-native approach
YAML example
```yaml
type: custom:air-quality-card
co2_entity: sensor.air_quality_co2
language: es # or 'en' / 'fr' / 'de' / 'auto' (default)
```
Test plan
Contributor credit
Spanish/French/German translations: @b0rv3g4r4 (PR #11). I'll @-mention them when merging so they're credited on the release.
Notes for maintainer