mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): More localisation (#1441)
* File size localisation * Localisation for sidebar tooltips * Localisation for active/waiting jobs * Localisation for selected item counts * Prettier * Ignore Jest coverage directory for Prettier
This commit is contained in:
parent
12ecf366b0
commit
5aee5c0fb8
8 changed files with 25 additions and 12 deletions
|
|
@ -42,6 +42,8 @@
|
|||
owned: albumCount.owned
|
||||
};
|
||||
};
|
||||
|
||||
const locale = navigator.language;
|
||||
</script>
|
||||
|
||||
<section id="sidebar" class="flex flex-col gap-1 pt-8 pr-6 bg-immich-bg dark:bg-immich-dark-bg">
|
||||
|
|
@ -73,8 +75,8 @@
|
|||
<LoadingSpinner />
|
||||
{:then data}
|
||||
<div>
|
||||
<p>{data.videos} Videos</p>
|
||||
<p>{data.photos} Photos</p>
|
||||
<p>{data.videos.toLocaleString(locale)} Videos</p>
|
||||
<p>{data.photos.toLocaleString(locale)} Photos</p>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
|
|
@ -104,7 +106,7 @@
|
|||
<LoadingSpinner />
|
||||
{:then data}
|
||||
<div>
|
||||
<p>{data.shared + data.sharing} Albums</p>
|
||||
<p>{(data.shared + data.sharing).toLocaleString(locale)} Albums</p>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
|
|
@ -174,7 +176,7 @@
|
|||
<LoadingSpinner />
|
||||
{:then data}
|
||||
<div>
|
||||
<p>{data.owned} Albums</p>
|
||||
<p>{data.owned.toLocaleString(locale)} Albums</p>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import WindowMinimize from 'svelte-material-icons/WindowMinimize.svelte';
|
||||
import type { UploadAsset } from '$lib/models/upload-asset';
|
||||
import { notificationController, NotificationType } from './notification/notification';
|
||||
import { getBytesWithUnit } from '../../utils/byte-units';
|
||||
import { asByteUnitString } from '$lib/utils/byte-units';
|
||||
|
||||
let showDetail = true;
|
||||
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
<input
|
||||
disabled
|
||||
class="bg-gray-100 border w-full p-1 rounded-md text-[10px] px-2"
|
||||
value={`[${getBytesWithUnit(uploadAsset.file.size)}] ${uploadAsset.file.name}`}
|
||||
value={`[${asByteUnitString(uploadAsset.file.size)}] ${uploadAsset.file.name}`}
|
||||
/>
|
||||
|
||||
<div class="w-full bg-gray-300 h-[15px] rounded-md mt-[5px] text-white relative">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue