Consistently format battery tooltip soc (#6568)
This commit is contained in:
parent
669f7593cc
commit
13724829ef
13 changed files with 19 additions and 14 deletions
|
|
@ -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 },
|
||||
]"
|
||||
/>
|
||||
</Variant>
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ vehicles = "Паркування"
|
|||
battery = "Батарея"
|
||||
batteryCharge = "Зарядження батареї"
|
||||
batteryDischarge = "Розрядження батареї"
|
||||
batteryTooltip = "{energy} із {total} ({soc}%)"
|
||||
batteryTooltip = "{energy} із {total} ({soc})"
|
||||
gridImport = "Використання мережі"
|
||||
homePower = "Споживання"
|
||||
loadpoints = "Зарядний пристрій| Зарядний пристрій | {count} зарядні пристрої"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue