1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

Fix plural

This commit is contained in:
Alex 2022-12-05 10:52:21 -06:00 committed by GitHub
parent 966d99217a
commit 6e2763b72c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ export function getBytesWithUnit(bytes: number, maxPrecision = 1): [number, stri
* @returns localized bytes with unit as string
*/
export function asByteUnitString(bytes: number, maxPrecision = 1): string {
const locale = Array.from(navigator.language);
const locale = Array.from(navigator.languages);
const [size, unit] = getBytesWithUnit(bytes, maxPrecision);
return `${size.toLocaleString(locale)} ${unit}`;
}