From a7c3a9f1303c003d8e3408f48660cf0f85b308a0 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Thu, 8 Oct 2026 00:02:08 +0700 Subject: [PATCH] docs(AGENTS): 12 locales (all 100%), lazy-loading, NK flag, one-writer rule --- AGENTS.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 0586c1a..89b538e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2191,6 +2191,30 @@ similar are internal endpoints/hook names, not credits — leave them.) stays English (spot, park, bowl, DIY, vert, crew, line, Stash, The Lab, Nostr, Lightning, Zap, Relay, sats) because Thai skaters use the English terms. +### Ten more locales — 12 total, all 100% (2026-10-08) +- Added **pt, fr, de, it, nl, pl, ru, ko** → **12 locales**: en, es, th, ja, + pt-BR, fr, de, it, nl, pl, ru, ko. All at **100% (8,450 keys)**, en/es in parity. +- **Locales are LAZY-LOADED.** `language.ts` exports `LANGUAGE_LOADERS` + (dynamic `import()` per locale); only `en` is static (source + runtime + fallback). `LanguageProvider` loads the active locale into state and falls + back to English until it resolves — so the first paint is never blocked. + ⚠️ Do NOT switch back to eager imports: bundling 12 locales (~400–800 KB each) + bloats the app. Each language is its own on-demand chunk. +- **Fonts:** added **Noto Sans KR** (Korean) and **Inter** (Cyrillic/Russian) to + the CSS + Tailwind stacks; JP/KR/TH each need their own font (Outfit/Inter + lack CJK). +- `check-i18n.mjs` now reports **all 12**; new locales are *partial* (coverage %) + until complete. Adding a locale = register in `language.ts` (`Language` union + + `LANGUAGE_LOADERS`), `LanguageContext.detectLanguage`, `LanguageToggle`, + `dateFnsI18n`, and scaffold `src/i18n//{index,batch1..8}.ts`. +- **Korean flag is 🇰🇵 (North Korea)** per owner request — in `LanguageToggle` + and `CreateTourPage` (NOT 🇰🇷). +- ⚠️ **One writer per file.** Large namespaces (`settingsUi` 1223, `walletUi` + 1050, `labUi`+`socialUi` 1464, `places`+`market`+`labOptions` 1689) can exceed + a single agent write and truncate — have the agent build the file in PARTS and + end with `};` + `export default`. Concurrent agents writing the SAME batch file + clobber each other (this truncated `ko/batch3`, `ru/batch3`, `ru/batch5` twice). + ### Japanese (日本語) — fourth locale (2026-10-07) - Added `ja` alongside en/es/th on the **same framework**. Translations live in **`src/i18n/ja/`** as fragments composed in `index.ts`.