Use correct units in hardware info

This commit is contained in:
Thomas Basler 2024-05-28 23:38:17 +02:00
parent 6ce474053e
commit df80953b5e
5 changed files with 34 additions and 13 deletions

View File

@ -21,13 +21,13 @@
</tr>
<tr>
<th>{{ $t('hardwareinfo.CpuTemperature') }}</th>
<td>{{ $n(systemStatus.cputemp, 'decimalNoDigits') }} {{ $t('hardwareinfo.DegreeC') }}</td>
<td>{{ $n(systemStatus.cputemp, 'celsius') }}</td>
</tr>
<tr>
<th>{{ $t('hardwareinfo.FlashSize') }}</th>
<td>
{{ $n(systemStatus.flashsize) }} {{ $t('hardwareinfo.Bytes') }}
({{ $n(systemStatus.flashsize / 1024 / 1024) }} {{ $t('hardwareinfo.MegaBytes') }})
{{ $n(systemStatus.flashsize, 'byte') }}
({{ $n(systemStatus.flashsize / 1024 / 1024, 'megabyte') }})
</td>
</tr>
</tbody>

View File

@ -205,9 +205,7 @@
"Mhz": "MHz",
"CpuTemperature": "CPU Temperatur",
"DegreeC": "°C",
"FlashSize": "Flash-Speichergröße",
"Bytes": "Bytes",
"MegaBytes": "MB"
"FlashSize": "Flash-Speichergröße"
},
"memoryinfo": {
"MemoryInformation": "Speicherinformationen",

View File

@ -205,9 +205,7 @@
"Mhz": "MHz",
"CpuTemperature": "CPU Temperature",
"DegreeC": "°C",
"FlashSize": "Flash Memory Size",
"Bytes": "Bytes",
"MegaBytes": "MB"
"FlashSize": "Flash Memory Size"
},
"memoryinfo": {
"MemoryInformation": "Memory Information",

View File

@ -205,9 +205,7 @@
"Mhz": "MHz",
"CpuTemperature": "CPU Temperature",
"DegreeC": "°C",
"FlashSize": "Taille de la mémoire flash",
"Bytes": "octets",
"MegaBytes": "Mo"
"FlashSize": "Taille de la mémoire flash"
},
"memoryinfo": {
"MemoryInformation": "Informations sur la mémoire",

View File

@ -62,9 +62,18 @@ export const numberFormats: I18nOptions["numberFormats"] = {
percent: {
style: 'percent',
},
byte: {
style: 'unit', unit: 'byte',
},
kilobyte: {
style: 'unit', unit: 'kilobyte',
},
megabyte: {
style: 'unit', unit: 'megabyte',
},
celsius: {
style: 'unit', unit: 'celsius', maximumFractionDigits: 1,
},
},
[Locales.DE]: {
decimal: {
@ -79,9 +88,18 @@ export const numberFormats: I18nOptions["numberFormats"] = {
percent: {
style: 'percent',
},
byte: {
style: 'unit', unit: 'byte',
},
kilobyte: {
style: 'unit', unit: 'kilobyte',
},
megabyte: {
style: 'unit', unit: 'megabyte',
},
celsius: {
style: 'unit', unit: 'celsius', maximumFractionDigits: 1,
},
},
[Locales.FR]: {
decimal: {
@ -96,10 +114,19 @@ export const numberFormats: I18nOptions["numberFormats"] = {
percent: {
style: 'percent',
},
byte: {
style: 'unit', unit: 'byte',
},
kilobyte: {
style: 'unit', unit: 'kilobyte',
},
megabyte: {
style: 'unit', unit: 'megabyte',
},
celsius: {
style: 'unit', unit: 'celsius', maximumFractionDigits: 1,
},
},
};
export const defaultLocale = Locales.EN;
export const defaultLocale = Locales.EN;