|
39 | 39 | import ThemeButton from '../shared-components/theme-button.svelte'; |
40 | 40 | import { openFileUploadDialog } from '$lib/utils/file-uploader'; |
41 | 41 | import { bulkDownload } from '$lib/utils/asset-utils'; |
| 42 | + import { locale } from '$lib/stores/preferences.store'; |
42 | 43 | import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte'; |
43 | 44 | import ImmichLogo from '../shared-components/immich-logo.svelte'; |
44 | 45 |
|
|
88 | 89 | } |
89 | 90 | }); |
90 | 91 |
|
91 | | - const locale = navigator.language; |
92 | 92 | const albumDateFormat: Intl.DateTimeFormatOptions = { |
93 | 93 | month: 'short', |
94 | 94 | day: 'numeric', |
|
99 | 99 | const startDate = new Date(album.assets[0].fileCreatedAt); |
100 | 100 | const endDate = new Date(album.assets[album.assetCount - 1].fileCreatedAt); |
101 | 101 |
|
102 | | - const startDateString = startDate.toLocaleDateString(locale, albumDateFormat); |
103 | | - const endDateString = endDate.toLocaleDateString(locale, albumDateFormat); |
| 102 | + const startDateString = startDate.toLocaleDateString($locale, albumDateFormat); |
| 103 | + const endDateString = endDate.toLocaleDateString($locale, albumDateFormat); |
104 | 104 |
|
105 | 105 | // If the start and end date are the same, only show one date |
106 | 106 | return startDateString === endDateString |
|
380 | 380 | > |
381 | 381 | <svelte:fragment slot="leading"> |
382 | 382 | <p class="font-medium text-immich-primary dark:text-immich-dark-primary"> |
383 | | - Selected {multiSelectAsset.size.toLocaleString(locale)} |
| 383 | + Selected {multiSelectAsset.size.toLocaleString($locale)} |
384 | 384 | </p> |
385 | 385 | </svelte:fragment> |
386 | 386 | <svelte:fragment slot="trailing"> |
|
0 commit comments