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>
This commit is contained in:
@@ -1236,72 +1236,8 @@
|
||||
"cleared": "The override will be empty after you save."
|
||||
},
|
||||
"mockup": {
|
||||
"date": {
|
||||
"weekdays_min": [
|
||||
"Su",
|
||||
"Mo",
|
||||
"Tu",
|
||||
"We",
|
||||
"Th",
|
||||
"Fr",
|
||||
"Sa"
|
||||
],
|
||||
"months_short": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"top_bar": "{weekday} {day} {month}"
|
||||
},
|
||||
"time": {
|
||||
"just_now": "Just now",
|
||||
"minutes_ago": "{n} min ago",
|
||||
"hours_ago": "1 hour ago | {n} hours ago",
|
||||
"yesterday": "Yesterday",
|
||||
"days_ago": "1 day ago | {n} days ago",
|
||||
"weeks_ago": "1 week ago | {n} weeks ago",
|
||||
"months_ago": "1 month ago | {n} months ago",
|
||||
"years_ago": "1 year ago | {n} years ago",
|
||||
"in_minutes": "In {n} min",
|
||||
"in_hours": "In 1 hour | In {n} hours",
|
||||
"tomorrow": "Tomorrow",
|
||||
"in_days": "In 1 day | In {n} days"
|
||||
},
|
||||
"home": "Home",
|
||||
"page_link": "Page {page} ›",
|
||||
"unknown": "Unknown",
|
||||
"unavailable": "Unavailable",
|
||||
"run": {
|
||||
"scene": "Activate",
|
||||
"script": "Run",
|
||||
"press": "Press"
|
||||
},
|
||||
"weather": {
|
||||
"clear_night": "Clear, night",
|
||||
"cloudy": "Cloudy",
|
||||
"exceptional": "Exceptional",
|
||||
"fog": "Fog",
|
||||
"hail": "Hail",
|
||||
"lightning": "Lightning",
|
||||
"lightning_rainy": "Lightning, rainy",
|
||||
"partlycloudy": "Partly cloudy",
|
||||
"pouring": "Pouring",
|
||||
"rainy": "Rainy",
|
||||
"snowy": "Snowy",
|
||||
"snowy_rainy": "Snowy, rainy",
|
||||
"sunny": "Sunny",
|
||||
"windy": "Windy",
|
||||
"windy_variant": "Windy"
|
||||
}
|
||||
"unknown": "Unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user