fix(i18n): standardize locale formatting for Intl APIs

This commit is contained in:
CaIon
2026-07-07 13:40:06 +08:00
parent 5cbb7b0be1
commit 8f31b30598
6 changed files with 35 additions and 7 deletions
@@ -31,6 +31,7 @@ import type {
QuotaDataItem,
DashboardFilters,
} from '@/features/dashboard/types'
import { toIntlLocale } from '@/i18n/languages'
import { formatCompactNumber, formatNumber, formatQuota } from '@/lib/format'
import { computeTimeRange } from '@/lib/time'
import { cn } from '@/lib/utils'
@@ -121,7 +122,7 @@ export function LogStatCards(props: LogStatCardsProps) {
const items = statCardsConfig.map((config) => {
const rawValue = config.getValue(adaptedStats, timeRangeMinutes)
const locale = i18n.resolvedLanguage || i18n.language
const locale = toIntlLocale(i18n.resolvedLanguage || i18n.language)
const formatted =
config.key === 'quota'
? {