Energyflow UI: standardize battery forecast wording (#30197)

This commit is contained in:
andig 2026-05-26 08:21:37 +02:00 • committed by GitHub
parent 933a57b2ac
commit 5e1bd2025c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 13 deletions

View file

@ -19,7 +19,11 @@ export default defineComponent({
computed: {
label(): string {
if (this.point.limit) {
return this.$t("main.energyflow.forecast");
return this.$t(
this.high
? "main.energyflow.batteryForecastFull"
: "main.energyflow.batteryForecastEmpty"
);
}
return this.$t(
this.high
@ -30,10 +34,7 @@ export default defineComponent({
message(): string {
const time = this.fmtAbsoluteDate(new Date(this.point.time));
if (this.point.limit) {
const key = this.high
? "main.energyflow.batteryForecastFull"
: "main.energyflow.batteryForecastEmpty";
return this.$t(key, { time });
return time;
}
const soc = this.fmtPercentage(this.point.soc);
return `${time} (${soc})`;

View file

@ -1156,10 +1156,10 @@
"battery": "Batterie",
"batteryCharge": "Batterie laden",
"batteryDischarge": "Batterie entladen",
"batteryForecastEmpty": "Leer ab {time}",
"batteryForecastFull": "Voll ab {time}",
"batteryForecastNextHigh": "Nächstes Hoch",
"batteryForecastNextLow": "Nächstes Tief",
"batteryForecastEmpty": "Leer",
"batteryForecastFull": "Voll",
"batteryForecastNextHigh": "Hoch",
"batteryForecastNextLow": "Tief",
"batteryGridChargeActive": "Netzladen: aktiv",
"batteryGridChargeLimit": "Netzladen: wenn",
"batteryHold": "Batterie (gesperrt)",

View file

@ -1156,10 +1156,10 @@
"battery": "Battery",
"batteryCharge": "Battery charging",
"batteryDischarge": "Battery discharging",
"batteryForecastEmpty": "Empty from {time}",
"batteryForecastFull": "Full from {time}",
"batteryForecastNextHigh": "Next high",
"batteryForecastNextLow": "Next low",
"batteryForecastEmpty": "Empty",
"batteryForecastFull": "Full",
"batteryForecastNextHigh": "High",
"batteryForecastNextLow": "Low",
"batteryGridChargeActive": "Grid charging: active",
"batteryGridChargeLimit": "Grid charging: when",
"batteryHold": "Battery (locked)",