mirror of
https://github.com/immich-app/immich.git
synced 2025-11-26 12:39:44 +09:00
fix(web): Make date-time formatting follow locale (#17899)
* fixed missing $locale parameter to .toLocaleString * Remove unused types and functions in timeline-util * remove unused export * re-enable export because it is needed for tests * format
This commit is contained in:
committed by
GitHub
parent
205260d31c
commit
85ac0512a6
@@ -1,6 +1,7 @@
|
||||
import { locale } from '$lib/stores/preferences.store';
|
||||
import { AssetTypeEnum, type AssetResponseDto } from '@immich/sdk';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { derived } from 'svelte/store';
|
||||
import { derived, get } from 'svelte/store';
|
||||
import { fromLocalDateTime } from './timeline-util';
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,7 @@ export const getAltText = derived(t, ($t) => {
|
||||
return asset.exifInfo.description;
|
||||
}
|
||||
|
||||
const date = fromLocalDateTime(asset.localDateTime).toLocaleString({ dateStyle: 'long' });
|
||||
const date = fromLocalDateTime(asset.localDateTime).toLocaleString({ dateStyle: 'long' }, { locale: get(locale) });
|
||||
const hasPlace = !!asset.exifInfo?.city && !!asset.exifInfo?.country;
|
||||
const names = asset.people?.filter((p) => p.name).map((p) => p.name) ?? [];
|
||||
const peopleCount = names.length;
|
||||
|
||||
Reference in New Issue
Block a user