⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(web): preserve exact locale matching in resolver
Tinb9eae212cda8
diff --git a/apps/web/src/lib/i18n/index.ts b/apps/web/src/lib/i18n/index.tsindex 48d444c1f..8c63a3a5d 100644--- a/apps/web/src/lib/i18n/index.ts+++ b/apps/web/src/lib/i18n/index.ts@@ -15,13 +15,15 @@ export function resolveLocale(preferredLocale?: string | null,browserLocale?: string | null,): AppLocale {- const candidates = [preferredLocale, browserLocale]- .filter(Boolean)- .map((value) => value?.toLowerCase());+ const candidates = [preferredLocale, browserLocale].filter(+ (value): value is string => Boolean(value),+ );for (const candidate of candidates) {- if (!candidate) continue;- const exactMatch = supportedLocales.find((locale) => locale === candidate);+ const normalizedCandidate = candidate.toLowerCase();+ const exactMatch = supportedLocales.find(+ (locale) => locale.toLowerCase() === normalizedCandidate,+ );if (exactMatch) return exactMatch;const languageMatch = supportedLocales.find(