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>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
const e={name:"Deutsch",english:"German",script:"latin",plural:"one_other",clock:"24",checked:!1},t={},c={_meta:e,editor:t};export{e as _meta,c as default,t as editor};
|
||||
@@ -0,0 +1 @@
|
||||
const e={name:"English (UK)",english:"English (UK)",script:"latin",plural:"one_other",clock:"24",checked:!0},n={_meta:e};export{e as _meta,n as default};
|
||||
@@ -0,0 +1 @@
|
||||
const e={name:"Español",english:"Spanish",script:"latin",plural:"one_other",clock:"24",checked:!1},s={},t={_meta:e,editor:s};export{e as _meta,t as default,s as editor};
|
||||
@@ -0,0 +1 @@
|
||||
const e={name:"Français",english:"French",script:"latin",plural:"one_upto_1",clock:"24",checked:!1},t={},a={_meta:e,editor:t};export{e as _meta,a as default,t as editor};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
const t={name:"Italiano",english:"Italian",script:"latin",plural:"one_other",clock:"24",checked:!1},a={},e={_meta:t,editor:a};export{t as _meta,e as default,a as editor};
|
||||
@@ -0,0 +1 @@
|
||||
const e={name:"Nederlands",english:"Dutch",script:"latin",plural:"one_other",clock:"24",checked:!1},t={},c={_meta:e,editor:t};export{e as _meta,c as default,t as editor};
|
||||
@@ -0,0 +1 @@
|
||||
const l={name:"Polski",english:"Polish",script:"latin",plural:"slavic_pl",clock:"24",checked:!1},s={},c={_meta:l,editor:s};export{l as _meta,c as default,s as editor};
|
||||
@@ -0,0 +1 @@
|
||||
const t={name:"Português",english:"Portuguese",script:"latin",plural:"one_upto_1",clock:"24",checked:!1},e={},o={_meta:t,editor:e};export{t as _meta,o as default,e as editor};
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<title>ESP Screens</title>
|
||||
<script type="module" crossorigin src="./assets/index-CteHDGjl.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-CUv9rdNM.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-C6Sfd-UM.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user