Commit Graph

15 Commits

Author SHA1 Message Date
Max Gramser 94d5c93356 The app's messages in German, French and Italian
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:39:34 +02:00
Max Gramser 89241dd47a The app's messages in Polish
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:38:03 +02:00
Max Gramser e2284de7f3 The editor in Spanish and Portuguese, and Portugal's plural rule for Portuguese
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:28:54 +02:00
Max Gramser bc9b6ae2cb The editor in Dutch, in Max's own words where the text existed before
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:28:28 +02:00
Max Gramser e326fc56e9 The editor in German, French, Italian and Polish, and three English texts that named things the way Home Assistant no longer does
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:27:57 +02:00
Max Gramser 1b23f7ec15 Merge branch 'i18n-addon' into i18n 2026-09-19 15:07:29 +02:00
Max Gramser 0e856a18fc Speak the app's own texts from the translations: its messages and labels in the editor's language, the words it sends the screens in theirs
Every error, delivery status, update result and label the editor shows is an `addon` text of en.json now, in the language
of the editor's request: its X-ESP-Screens-Language header, or ?language= for the live updates, which an EventSource sends
without headers. A text made in the background and read later (a delivery status, an update result in updates.json, why a
screen can't show an alert) is kept in English with its key (i18n.Text, i18n.english) and written in the editor's language
when it is shown (i18n.shown); updates.json keeps the English message next to the key, for an older app.

The words the app sends to the screens come in the screens' language (Settings -> Language & region): the names of the
built-in tiles, the top bar's words, dates and numbers, the history card's words, the vacuum chips, the forecast's day
names and the Identify card, and so does the notification of a stopped update round. The top bar and the history card
take a binary sensor's words from screen.ha.binary, as the tiles do, which makes test_binary_words pass again; three tests
follow Home Assistant's new words there (Detected, Clear).

What stays English: what Home Assistant gets as data (a tile event's answer, the layout sensors, entity names), the logs
and the firmware jobs' logs, the screens' protocol words, and the Claude skill, which is built from the English tables in
core.py and tile_icons.py; en.json repeats those and tests/test_addon_translations.py keeps both equal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 15:06:12 +02:00
Max Gramser 94b320074d Draw the mockup with the screens' own words, compile every text while building, and send the language with the live updates
- The page takes the screens' words its mockup draws from their own texts: screen.ha (Home Assistant's words, filled
  from Home Assistant), screen.time, screen.date, screen.number and screen.tile.page, per language next to _meta and
  editor. The copies under editor.mockup go; the rest of `screen` and all of `addon` stay out of the build.
- Numbers in the mockup follow the screens' language (screen.number, with its minimum grouping) or the chosen style,
  as the firmware writes them.
- @intlify/unplugin-vue-i18n compiles every text at build time, so the page runs vue-i18n's runtime-only build
  without the message compiler; every language's _meta comes with the page. Empty texts stay out while building.
- The live updates carry the editor's language (api/events?language=), as an EventSource sends no headers.
- web/ needs Node 22.13 or newer: vue-i18n 11.4, Vite 7 and the unplugin ask for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:59:02 +02:00
Max Gramser 1dc2eab0cf Speak the editor in each person's Home Assistant language: every text in the editor section of en.json, the mockup in the screens' language, and one Language & region card for all screens
- vue-i18n 11 with the Composition API: English comes with the page, any other language loads the first time it is
  needed from screen_manager/translations, and a text a language lacks shows in English. The build keeps only _meta
  and editor of each file (vite.config.ts), never the screens' or the add-on's texts.
- The editor follows the language of the user's Home Assistant profile (<html lang> of Home Assistant's page), else
  the browser's; plural forms follow the file's _meta.plural, with the screens' rules.
- Every request tells the add-on the editor's language (X-ESP-Screens-Language), so its own words can follow it.
- The mockup draws the screens' words (Unavailable, Page 2 ›, the date, "5 min ago") in the screens' language, with
  their clock and number format.
- Settings → Language & region: the screen language, time format and number format for every screen, with the user's
  own profile offered when it differs. The per-screen clock choice goes; the top bar points there. A screen that
  still needs the new language says so in its update badge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:48:12 +02:00
Max Gramser 7f1fe36b3e German, French, Italian, Spanish, Portuguese and Polish texts for the screens, and a check for the editor's special characters
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:44:13 +02:00
Max Gramser 851c1772e5 Take Unavailable and the Activate, Run and Press words from Home Assistant's frontend too
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:40:27 +02:00
Max Gramser 8fb39a52a6 Dutch texts for the screens
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:38:59 +02:00
Max Gramser 951dceebf9 Add Dutch, German, French, Italian, Spanish, Portuguese and Polish with their calendars and Home Assistant's own words
tools/i18n.py gets cldr (day and month names, date orders, numbers and the clock from Node's Intl), ha-words (the
words for states from Home Assistant's own translations, English included) and lint (English left in the firmware's
code). The screens write numbers from Home Assistant in the chosen format, and every text font carries the apostrophe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:35:37 +02:00
Max Gramser 378d0b3e61 Build each screen in one language: the screen texts from the translations, European letters in the fonts, and Language & region in the app
The firmware takes its texts from screen_manager/translations/<code>.json at build time (components/smart_display:
one table in main.cpp, keys in screen_text_keys.h), and the fonts carry every letter European languages write with.
The app keeps Settings -> Language & region (language, clock, numbers) for every screen, writes LANGUAGE into the
screens' YAML and sends the clock and the number format in the layout message; the per-screen 24-hour clock goes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:24:19 +02:00
Max Gramser 9362a5f1db Start the translations: one file per language, English as the source, and how to translate
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 13:52:29 +02:00