Files
homeassistant_espscreen/web/package.json
T
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

31 lines
750 B
JSON

{
"name": "esp-screens-editor",
"private": true,
"version": "0.0.0",
"type": "module",
"devEngines": {
"runtime": { "name": "node", "version": "^20.19.0 || >=22.12.0", "onFail": "error" }
},
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && rm -rf ../screen_manager/app/static/assets && vite build",
"check": "vue-tsc --noEmit",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"vue": "^3.5.18",
"vue-i18n": "^11.4.12"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.1",
"@vue/test-utils": "^2.5.1",
"jsdom": "^26.1.0",
"typescript": "^5.9.2",
"vite": "^7.1.5",
"vitest": "^3.2.7",
"vue-tsc": "^3.0.6"
}
}