diff --git a/webapp/src/locales/index.ts b/webapp/src/locales/index.ts index 7ea42cf46..5edf8013f 100644 --- a/webapp/src/locales/index.ts +++ b/webapp/src/locales/index.ts @@ -35,12 +35,18 @@ LOCALES.forEach((locale) => { decimalNoDigits: { style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 0 }, + decimalOneDigit: { + style: 'decimal', minimumFractionDigits: 1, maximumFractionDigits: 1 + }, decimalTwoDigits: { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits: 2 }, percent: { style: 'percent', }, + percentOneDigit: { + style: 'percent', minimumFractionDigits: 1, maximumFractionDigits: 1 + }, byte: { style: 'unit', unit: 'byte', }, diff --git a/webapp/src/views/HomeView.vue b/webapp/src/views/HomeView.vue index 2dd9ef448..68c1e9a1e 100644 --- a/webapp/src/views/HomeView.vue +++ b/webapp/src/views/HomeView.vue @@ -49,7 +49,7 @@
{{ $t('home.CurrentLimit') }}{{ $n(inverter.limit_relative / 100, 'percent') }} + }} W | {{ $n(inverter.limit_relative / 100, 'percentOneDigit') }}
{{ $t('home.DataAge') }} {{ $t('home.Seconds', {'val': $n(inverter.data_age) }) }} @@ -416,13 +416,13 @@ export default defineComponent({ currentLimitAbsolute(): string { if (this.currentLimitList.max_power > 0) { return this.$n(this.currentLimitList.limit_relative * this.currentLimitList.max_power / 100, - 'decimalTwoDigits'); + 'decimalNoDigits'); } return "0"; }, currentLimitRelative(): string { return this.$n(this.currentLimitList.limit_relative, - 'decimalTwoDigits'); + 'decimalOneDigit'); }, inverterData(): Inverter[] { return this.liveData.inverters.slice().sort((a: Inverter, b: Inverter) => {