Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between dbf8086 and 9655a98180092f5fa4c3deb04046ddae49de9177. 📒 Files selected for processing (12)
👮 Files not reviewed due to content moderation or server errors (11)
📝 Walkthrough
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The locale resolver dropped the region for every language except Chinese, so es-ES and es-MX loaded the same catalog. Make Spanish region-aware: - es.json becomes the Spain (es-ES) catalog and the generic `es` fallback. - es-419.json is a frozen copy of the current translation, served to Latin-American regions (es-MX, es-AR, es-419, …). - normalizeSupportedUiLocale routes Spanish by region (Spain / bare es -> es; other es-* -> es-419), mirroring the existing zh handling. Lazy loaders wired in both the renderer and the main process. - Language picker gains 'Español (Latinoamérica)'; the existing entry is relabelled 'Español (España)'. No visible string change at this step: es-419.json equals the current es.json.
Now that es.json is the Spain catalog, replace the Latin-American lexicon that upstream's es keeps (es-419.json preserves it for Latin America): - agregar -> añadir (conjugation-aware: Añadir/Añade/Añadiendo/Añadido/Añada…) - computadora -> ordenador (with gender agreement: 'la computadora activa' -> 'el ordenador activo', 'de la computadora' -> 'del ordenador') - ingresar (enter a value, never the Enter key) -> introducir / introduzca - presionar -> pulsar - verb 'Supports:' -> 'Admite:' (kept the noun 'soporte' for tech support) ~250 strings. es-419.json is unchanged.
9655a98 to
c246cde
Compare
|
@brennanb2025 when you review this, maybe can refer to other established open source project to see the best coding practice for this split |
Greptile SummaryThis PR splits the single neutral Spanish catalog into two regional variants —
Confidence Score: 5/5Safe to merge — the region routing is self-contained and symmetrically wired in both the renderer and main process, LatAm users see no change, and the previously flagged test-structure issue is resolved in the current HEAD. The locale-routing logic is straightforward and mirrors the existing Chinese split pattern; all new code paths are covered by unit tests; the es-419.json catalog is a frozen copy so there is zero risk of regression for LatAm users; the test file is correctly structured with all blocks properly closed. Files Needing Attention: No files require special attention. The previous concern about ui-locale.test.ts (unclosed it callback) is resolved in the current HEAD.
|
| Filename | Overview |
|---|---|
| src/shared/ui-locale.ts | Adds Spanish region routing: Spain (es) and Latin America (es-419), mirroring the existing Chinese handling; logic and guard conditions are correct. |
| src/shared/ui-locale.test.ts | Test block previously flagged as unclosed is correctly closed in the current HEAD; all it() blocks and the describe are properly delimited. |
| src/shared/ui-language.ts | Adds UI_LANGUAGE_SPANISH_LATAM = 'es-419' constant and includes it in the BuiltInUiLanguage union type and UI_LANGUAGE_VALUES set. |
| src/renderer/src/i18n/i18n.ts | Adds lazy loader for es-419.json in the renderer, consistent with the existing loader pattern. |
| src/main/i18n/main-i18n.ts | Adds lazy loader for es-419.json in the main process, symmetric with the renderer change. |
| src/renderer/src/i18n/supported-languages.ts | Adds UI_LANGUAGE_SPANISH_LATAM to the language picker choices and fallback labels; existing entry relabelled to Español (España). |
| src/renderer/src/i18n/locales/es-419.json | New 14,353-line Latin-American Spanish catalog, frozen copy of the previous neutral es catalog; retains LatAm vocabulary (computadora, agregar, ingresar, presionar). |
| src/renderer/src/i18n/locales/es.json | ~250 strings updated to peninsular Spanish (añadir, ordenador, introducir, pulsar); adds spanishLatam key for the language picker. |
| src/renderer/src/components/settings/AccountsPane.test.tsx | Regex updated from agregan to añaden to match the Spain-catalog vocabulary change. |
Reviews (2): Last reviewed commit: "fix(i18n): close LatAm Spanish test bloc..." | Re-trigger Greptile
… account copy test - Add missing }) that left the describe block unclosed (Greptile P1) - Sync es-419.json to full parity with en.json (inherit Spanish for new keys, drop obsolete keys; existing LatAm content unchanged) - Update AccountsPane test for peninsular 'se añaden'
|
Thanks @Pomy1, and apologies for the slow reply. Splitting The peninsular lexicon work is the interesting half though, and it does not require a split. If you want to open a PR that just corrects the Latin-American-flavoured strings inside the existing |
|
@Pomy1 — I'm sorry, I closed this and that was the wrong call. Reopening it. What I said still holds (splitting The direction we're working toward is plugin language packs, so locale maintenance can sit with people who actually speak the language rather than becoming in-tree debt. Most of the mechanism is already in the repo: a manifest declares What's missing is the authoring side: no guide, no scaffolding from The separate offer stands and doesn't depend on any of the above: the peninsular lexicon fixes don't need the split. If you open a PR correcting the Latin-American-flavoured strings inside the existing Sorry again for the handling. |
Summary
Orca's Spanish catalog is a single region-neutral (Latin-American)
es, and the locale resolver drops the region for every language except Chinese — soes-ESandes-MXload the same catalog. This PR splits Spanish into two regional catalogs and gives the Spain variant a peninsular-Spanish lexicon.1. Split Spanish into
es(Spain) andes-419(Latin America)es.jsonbecomes the Spain (es-ES) catalog and the genericesfallback.es-419.jsonis a frozen copy of the currentestranslation, served to Latin-American regions (es-MX,es-AR,es-419, …). No content change for those users.normalizeSupportedUiLocaleroutes Spanish by region (Spain / barees→es; otheres-*→es-419), mirroring the existingzhhandling. Lazy loaders wired in both the renderer and the main process.2. Peninsular-Spanish lexicon in the Spain catalog
The
escatalog keeps Latin-American vocabulary; correct it for Spain (Latin America keeps it viaes-419.json):Añadir/Añade/Añadiendo/Añadido/Añada…)la computadora activa→el ordenador activo,de la computadora→del ordenador)soportefor technical support is kept — it is correct in Spain)~250 strings.
es-419.jsonis untouched.Testing
typecheck— pass (3 tsgo projects)check:max-lines-ratchet— passNotes
es-419.jsonequals today'ses.json.en.json) are left as-is — they are not part of this change.ELI5
Spanish splits into Spain (
es) and Latin America (es-419) with region-aware catalogs. Spain gets peninsular wording instead of one neutral catalog for everyone.