diff --git a/assets/js/components/Energyflow/Energyflow.story.vue b/assets/js/components/Energyflow/Energyflow.story.vue index 5d436d6ba..047c6ed32 100644 --- a/assets/js/components/Energyflow/Energyflow.story.vue +++ b/assets/js/components/Energyflow/Energyflow.story.vue @@ -29,8 +29,8 @@ import Energyflow from "./Energyflow.vue"; :batterySoc="77" siteTitle="Home" :battery="[ - { soc: 44, capacity: 13.3 }, - { soc: 82, capacity: 21 }, + { soc: 44.999, capacity: 13.3 }, + { soc: 82.3331, capacity: 21 }, ]" /> diff --git a/assets/js/components/Energyflow/Energyflow.vue b/assets/js/components/Energyflow/Energyflow.vue index 2d776335e..e1985984f 100644 --- a/assets/js/components/Energyflow/Energyflow.vue +++ b/assets/js/components/Energyflow/Energyflow.vue @@ -232,7 +232,12 @@ export default { return this.battery.map(({ soc, capacity }) => { const energy = this.fmtKWh((capacity / 100) * soc * 1e3, true, false, 1); const total = this.fmtKWh(capacity * 1e3, true, true, 1); - return this.$t("main.energyflow.batteryTooltip", { energy, total, soc }); + const formattedSoc = this.batteryFmt(soc); + return this.$t("main.energyflow.batteryTooltip", { + energy, + total, + soc: formattedSoc, + }); }); }, batteryFmt() { diff --git a/i18n/da.toml b/i18n/da.toml index a171ff199..918688f53 100644 --- a/i18n/da.toml +++ b/i18n/da.toml @@ -72,7 +72,7 @@ vehicles = "Parkering" battery = "Batteri" batteryCharge = "Battery opladning" batteryDischarge = "Batteriet aflades" -batteryTooltip = "{energi} af {total} ({soc}%)" +batteryTooltip = "{energi} af {total} ({soc})" gridImport = "Grid brug" homePower = "Forbrug" loadpoints = "Oplader| Oplader | {count} opladere" diff --git a/i18n/de.toml b/i18n/de.toml index e4437e836..064dd4065 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -72,7 +72,7 @@ vehicles = "Parkplatz" battery = "Batterie" batteryCharge = "Batterie laden" batteryDischarge = "Batterie entladen" -batteryTooltip = "{energy} von {total} ({soc}%)" +batteryTooltip = "{energy} von {total} ({soc})" gridImport = "Netzbezug" homePower = "Verbrauch" loadpoints = "Ladepunkt | Ladepunkt | {count} Ladepunkte" diff --git a/i18n/en.toml b/i18n/en.toml index 4d6c44e8e..538428e53 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -72,7 +72,7 @@ vehicles = "Parking" battery = "Battery" batteryCharge = "Battery charging" batteryDischarge = "Battery discharging" -batteryTooltip = "{energy} of {total} ({soc}%)" +batteryTooltip = "{energy} of {total} ({soc})" gridImport = "Grid use" homePower = "Consumption" loadpoints = "Charger| Charger | {count} chargers" diff --git a/i18n/es.toml b/i18n/es.toml index d595cbb1e..a41756778 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -77,7 +77,7 @@ vehicles = "Estacionamiento" battery = "Batería" batteryCharge = "Carga la batería" batteryDischarge = "Descargar la batería" -batteryTooltip = "{energy} de {total} ({soc}%)" +batteryTooltip = "{energy} de {total} ({soc})" gridImport = "Consumo de red" homePower = "Consumo" loadpoints = "Punto de carga | Punto de carga | {count} Puntos de carga" diff --git a/i18n/it.toml b/i18n/it.toml index a64f2b4b6..fedd72488 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -77,7 +77,7 @@ vehicles = "Parcheggio" battery = "Batteria" batteryCharge = "Carica della batteria" batteryDischarge = "Scarico della batteria" -batteryTooltip = "{energy} di {total} ({soc}%)" +batteryTooltip = "{energy} di {total} ({soc})" gridImport = "Uso della rete" homePower = "Consumo" loadpoints = "Caricabatterie| Caricabatterie | {count} caricabatterie" diff --git a/i18n/lt.toml b/i18n/lt.toml index 59c7487dc..6ccfe669f 100644 --- a/i18n/lt.toml +++ b/i18n/lt.toml @@ -77,7 +77,7 @@ vehicles = "Autoparkas" battery = "Kaupiklis" batteryCharge = "Kaupiklis įkraunamas" batteryDischarge = "Kaupiklis iškraunamas" -batteryTooltip = "{energy} iš {total} ({soc}%)" +batteryTooltip = "{energy} iš {total} ({soc})" gridImport = "Iš tinklo" homePower = "Namo suvartojimas" loadpoints = "Įkroviklis | Įkroviklis | {count} įkrovikliai" diff --git a/i18n/nl.toml b/i18n/nl.toml index 839d81087..83b6a12c3 100644 --- a/i18n/nl.toml +++ b/i18n/nl.toml @@ -77,7 +77,7 @@ vehicles = "Parking" battery = "Batterij" batteryCharge = "Batterij opladen" batteryDischarge = "Batterij ontladen" -batteryTooltip = "{energy} van {total} ({soc}%)" +batteryTooltip = "{energy} van {total} ({soc})" gridImport = "Grid gebruik" homePower = "Consumptie" loadpoints = "Lader| Lader | {count} laders" diff --git a/i18n/pl.toml b/i18n/pl.toml index cf3372c36..da3447855 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -77,7 +77,7 @@ vehicles = "Garaż" battery = "Bateria" batteryCharge = "Ładowanie baterii" batteryDischarge = "Rozładowanie baterii" -batteryTooltip = "{energy} z {total} ({soc}%)" +batteryTooltip = "{energy} z {total} ({soc})" gridImport = "Z sieci" homePower = "Zużycie" loadpoints = "Ładowarka | Ładowarka | {count} Ładowarki" diff --git a/i18n/pt.toml b/i18n/pt.toml index 2662aedf0..4d9e898a1 100644 --- a/i18n/pt.toml +++ b/i18n/pt.toml @@ -77,7 +77,7 @@ vehicles = "Estacionamento" battery = "Bateria" batteryCharge = "Carrego de bateria" batteryDischarge = "Descarrego de bateria" -batteryTooltip = "{energy} de {total} ({soc}%)" +batteryTooltip = "{energy} de {total} ({soc})" gridImport = "Consumo de rede" homePower = "Consumo" loadpoints = "Carregador | Carregador | {count} Carregadores" diff --git a/i18n/ro.toml b/i18n/ro.toml index 060d6e71b..ae0c7f0ef 100644 --- a/i18n/ro.toml +++ b/i18n/ro.toml @@ -72,7 +72,7 @@ vehicles = "Parcare" battery = "Baterie" batteryCharge = "Încărcare baterie" batteryDischarge = "Descărcare baterie" -batteryTooltip = "{energy} din {total} ({soc}%)" +batteryTooltip = "{energy} din {total} ({soc})" gridImport = "Folosirea rețelei" homePower = "Consum" loadpoints = "Încărcător| Încărcător | {count} încărcătoare" diff --git a/i18n/uk.toml b/i18n/uk.toml index 04068714d..e983ab32a 100644 --- a/i18n/uk.toml +++ b/i18n/uk.toml @@ -73,7 +73,7 @@ vehicles = "Паркування" battery = "Батарея" batteryCharge = "Зарядження батареї" batteryDischarge = "Розрядження батареї" -batteryTooltip = "{energy} із {total} ({soc}%)" +batteryTooltip = "{energy} із {total} ({soc})" gridImport = "Використання мережі" homePower = "Споживання" loadpoints = "Зарядний пристрій| Зарядний пристрій | {count} зарядні пристрої"