style: trim narration comments from recent changes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189ASmkMee4F5aJ3jnKeKQv
This commit is contained in:
@@ -36,11 +36,6 @@ export const LinguiProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
const locale = resolveLocale(data?.metadata?.locale);
|
||||
const [catalogVersion, setCatalogVersion] = useState(0);
|
||||
|
||||
// Fresh instance per locale (and per SSR request tree). __root beforeLoad
|
||||
// dehydrates the active locale's catalog with the page, so hydration primes
|
||||
// it from the query cache and never regresses to en for the SSR'd locale.
|
||||
// Public routes (login) may still lack it — createI18n falls back to en
|
||||
// until the effect below loads it and bumps catalogVersion.
|
||||
const i18n = useMemo(
|
||||
() => {
|
||||
if (!hasCachedMessages(locale)) {
|
||||
@@ -59,8 +54,6 @@ export const LinguiProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
if (hasCachedMessages(locale)) return;
|
||||
let cancelled = false;
|
||||
let retryTimer: ReturnType<typeof setTimeout> | undefined;
|
||||
// A failed chunk load must not strand the UI in en — retry until the
|
||||
// catalog arrives or the locale changes.
|
||||
const load = () => {
|
||||
ensureMessages(locale).then(
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user