diff --git a/src/i18n.ts b/src/i18n.ts index 2544fc7eb..29d55f783 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -71,7 +71,7 @@ export const i18n = createI18n({ }) /** Convenience shorthand: i18n.global */ -export const { t, te } = i18n.global +export const { t, te, d } = i18n.global /** * Safe translation function that returns the fallback message if the key is not found. diff --git a/src/platform/assets/composables/useAssetBrowser.ts b/src/platform/assets/composables/useAssetBrowser.ts index 22af0cf4e..964c81fc7 100644 --- a/src/platform/assets/composables/useAssetBrowser.ts +++ b/src/platform/assets/composables/useAssetBrowser.ts @@ -1,6 +1,6 @@ import { computed, ref } from 'vue' -import { t } from '@/i18n' +import { d, t } from '@/i18n' import type { UUID } from '@/lib/litegraph/src/utils/uuid' import type { AssetItem } from '@/platform/assets/schemas/assetSchema' import { @@ -69,7 +69,7 @@ export function useAssetBrowser(assets: AssetItem[] = []) { // Create display stats from API data const stats = { - formattedDate: new Date(asset.created_at).toLocaleDateString(), + formattedDate: d(new Date(asset.created_at), { dateStyle: 'short' }), downloadCount: undefined, // Not available in API stars: undefined // Not available in API }