Translations - dckiller51/astrion-custom-dashboard GitHub Wiki

Astrion is available in English, French, Italian and Spanish. Adding a language mostly means translating text files, no programming. Thanks to everyone who helps! 🌍

What there is to translate

Part File Notes
The app on the remote (Settings, labels, messages) src/main/res/values-xx/strings.xml Standard Android format. English: values/strings.xml
Home Assistant states shown on cards (heat_cool, clear-night, docked…) src/main/assets/ha_labels/xx.json Grouped by kind: hvac_mode, fan_mode, swing_mode, cover_state, vacuum_state, vacuum_fan_speed, weather_condition
The builder and the remote's web page src/main/assets/docs/i18n/xx.json About 1,000 strings. Also contains the HA state labels for the builder's preview
This wiki (optional) wiki pages The dashboard.json guide already exists in EN, FR, DE, IT, ES

xx is the language code: de, nl, pt, pl…

English is the fallback: anything not translated yet simply shows in English. A partial translation is fine and can be completed later.

How to translate

  1. Copy the English file and rename it with your language code:

    • values/strings.xml → values-de/strings.xml
    • ha_labels/en.json → ha_labels/de.json
    • docs/i18n/en.json → docs/i18n/de.json
  2. Translate only the values, never the keys:

    "web_card_light_hint": "Tap toggles the light…"      ← key: keep · value: translate
    <string name="settings_title">Settings</string>     ← name: keep · text: translate
  3. Keep the placeholders exactly as they are, in any order your language needs:

    • %1$s, %2$d… ("Connected to %1$s" → "Verbunden mit %1$s")
    • HTML tags like <code>…</code>, <strong>…</strong>, <a …>…</a>
    • \n (new line), and \' / \" in strings.xml
  4. Keep technical words as they are: entity ids (media_player.tv), JSON keys ("track": true), file paths, Home Assistant, Harmony, Apple TV.

  5. Open a pull request with your files, or send them on Discord if git isn't your thing.

Two small code changes (done by the maintainer)

  • The builder loads only the languages it knows: the code is added to SUPPORTED in docs/js/i18n.js.
  • The remote's language picker (Settings › Language) lists known languages: the code is added in AppLanguage.kt. With System, Android picks your translation by itself as soon as values-xx exists.

Just mention your language in the pull request and it will be wired in.

Tips

  • Keep it short: the remote's screen is small. Buttons and labels should be about as long as the English ones.
  • Use the words your own Home Assistant and phone use in your language (e.g. "Scene", "Automation").
  • Test it: install a beta build with your files, set the browser or remote language to yours, and look around.

Credits

The builder's translation system was started by Rob Johnston (@ClemsonJeeper). The French, Italian and Spanish texts come from the community and the maintainer. Your name goes in the release notes.

⚠️ **GitHub.com Fallback** ⚠️