chore: remove unused dead code

This commit is contained in:
chengyongru
2026-07-07 15:41:27 +08:00
committed by Xubin Ren
parent 29e99d3742
commit 3f33ff3143
12 changed files with 7 additions and 154 deletions
-13
View File
@@ -57,19 +57,6 @@ export function readStoredLocale(): SupportedLocale | null {
}
}
export function detectNavigatorLocale(): SupportedLocale {
if (typeof navigator === "undefined") return defaultLocale;
const candidates = [
...(navigator.languages ?? []),
navigator.language,
].filter(Boolean);
for (const locale of candidates) {
const normalized = normalizeLocale(locale);
if (normalized) return normalized;
}
return defaultLocale;
}
export function resolveInitialLocale(): SupportedLocale {
return readStoredLocale() ?? defaultLocale;
}