Skip to content

Add Turkish language support (i18n) - #36

Open
muminkoykiran wants to merge 1 commit into
usernein:masterfrom
muminkoykiran:feature/turkish-language-support
Open

Add Turkish language support (i18n)#36
muminkoykiran wants to merge 1 commit into
usernein:masterfrom
muminkoykiran:feature/turkish-language-support

Conversation

@muminkoykiran

Copy link
Copy Markdown
  • Add embedded translations system for Turkish (tr) and English (en)
  • Translate editor labels: name, entity, remote, theme, etc.
  • Translate button tooltips: power, volume, navigation, media controls
  • Auto-detect user language from Home Assistant settings
  • Fallback to English when translation not available
  • Add translations directory with JSON files for future extensibility

Copilot AI review requested due to automatic review settings December 4, 2025 23:52

Copilot AI left a comment

Copy link
Copy Markdown

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 adds internationalization (i18n) support with Turkish and English translations to a Home Assistant TV card component. The implementation uses embedded translation objects for reliability and includes both JavaScript files and JSON translation files for future extensibility.

Key Changes:

  • Embedded translation system with auto-detection based on Home Assistant user language settings
  • Translation coverage for editor labels (name, entity, remote, theme) and button tooltips (power, volume, navigation, media controls)
  • Fallback mechanism to English when translations are unavailable

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 33 comments.

File Description
tv-card.js Adds embedded translations object, helper functions (getLanguage, t), and applies translations to button tooltips
tv-card-editor.js Adds editor-specific translations object, helper functions (getEditorLanguage, te), and applies translations to form labels
translations/tr.json Turkish translation file containing all translated strings for future reference
translations/en.json English translation file containing all English strings for future reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread translations/tr.json Outdated
Comment thread tv-card.js Outdated
Comment thread tv-card-editor.js Outdated
Comment thread tv-card-editor.js Outdated
Comment thread tv-card-editor.js Outdated
Comment thread tv-card.js Outdated
Comment thread tv-card.js Outdated
Comment thread tv-card.js Outdated
Comment thread tv-card.js Outdated
Comment thread tv-card-editor.js Outdated
- Add embedded translations system for Turkish (tr) and English (en)
- Translate editor labels: name, entity, remote, theme, etc.
- Translate button tooltips: power, volume, navigation, media controls
- Auto-detect user language from Home Assistant settings
- Fallback to English when translation not available
- Add translations directory with JSON files for future extensibility
- Use proper Turkish characters (ğ, ü, ş, ı, ö, ç, İ)
@muminkoykiran
muminkoykiran force-pushed the feature/turkish-language-support branch from b5255c8 to b89c6ca Compare December 5, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants