You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DevTrack uses the Next.js App Router with a single root layout, client providers, custom auth/rate-limit middleware, and Supabase-backed user settings. next-intl was selected because it fits App Router server/client rendering, supports request-scoped message loading, and avoids a disruptive route-prefix migration.
Locale strategy
Supported locales are English (en) and Spanish (es). Routes remain unprefixed for this foundation. Locale metadata includes direction so RTL languages can be added later without changing the provider shape.
Persistence strategy
Authenticated language preference is stored as users.preferred_locale through the existing settings API and mirrored into a devtrack-locale cookie. The cookie lets pre-auth and server-rendered pages pick the active locale quickly, while the database setting survives refresh, login, and other devices once settings are loaded.
Fallback behavior
Locale resolution priority is user preference, then cookie, then browser Accept-Language, then English. Message loading merges locale messages over English so missing translated keys fall back to English and rendering does not break.
gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score
Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus
This PR uses pnpm-lock.yaml and pnpm-workspace.yaml, but the project uses npm (package-lock.json). This would break npm ci in CI. Please switch to npm and regenerate the lock file, and also confirm no existing routes break with the locale routing change.
CI is failing on this PR (Type check, Lint, Build). Please fix the errors and push an update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1082
Architecture decision
DevTrack uses the Next.js App Router with a single root layout, client providers, custom auth/rate-limit middleware, and Supabase-backed user settings.
next-intlwas selected because it fits App Router server/client rendering, supports request-scoped message loading, and avoids a disruptive route-prefix migration.Locale strategy
Supported locales are English (
en) and Spanish (es). Routes remain unprefixed for this foundation. Locale metadata includes direction so RTL languages can be added later without changing the provider shape.Persistence strategy
Authenticated language preference is stored as
users.preferred_localethrough the existing settings API and mirrored into adevtrack-localecookie. The cookie lets pre-auth and server-rendered pages pick the active locale quickly, while the database setting survives refresh, login, and other devices once settings are loaded.Fallback behavior
Locale resolution priority is user preference, then cookie, then browser
Accept-Language, then English. Message loading merges locale messages over English so missing translated keys fall back to English and rendering does not break.Supported languages
Files changed
next-intlconfig, request helpers, locale metadata, detection, and lookup helpers.messages/en.jsonandmessages/es.json.preferred_localepersistence to settings API and migration.Tests added
Verification commands
corepack pnpm lintcorepack pnpm typecheck(not defined; repo usestype-check)corepack pnpm type-checkcorepack pnpm test test/i18n.test.ts test/user-settings-api.test.ts test/useUserSettings.test.tsx test/components/DashboardHeader.test.tsxcorepack pnpm test