Files
OmniRoute/config/i18n-schema.json
diegosouzapw c86f60b1d3 feat(i18n): add config/i18n.json as canonical locale list
Adds config/i18n.json (41 locales) + JSON-Schema as the single source of
truth for the locale list, RTL set, and docs-translation policy. This file
is consumed by:

- The runtime UI config in src/i18n/config.ts (next commit).
- The docs translation pipeline (scripts/i18n/run-translation.mjs, added in
  a later commit).
- The drift checker (scripts/i18n/check-translation-drift.mjs).

Fields:
- default: source locale (en)
- rtl: locale codes rendered right-to-left
- uiOnly: locales shipped in UI but not target of docs translation
- docsExcluded: locales NOT receiving docs translations (source language)
- locales[]: code, label, name, native, english, flag

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:51:41 -03:00

66 lines
2.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OmniRoute i18n config",
"description": "Canonical list of locales used by both the UI (next-intl) and the docs translation pipeline.",
"type": "object",
"required": ["default", "rtl", "locales"],
"additionalProperties": false,
"properties": {
"$schema": { "type": "string" },
"default": {
"type": "string",
"description": "Default fallback locale code (must exist in `locales`)."
},
"rtl": {
"type": "array",
"description": "Locale codes that should be rendered right-to-left.",
"items": { "type": "string" }
},
"uiOnly": {
"type": "array",
"description": "Locale codes shipped in the UI but not produced as a docs translation target.",
"items": { "type": "string" }
},
"docsExcluded": {
"type": "array",
"description": "Locale codes that should NOT receive docs translations (e.g. the source language).",
"items": { "type": "string" }
},
"locales": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["code", "label", "name", "flag"],
"additionalProperties": false,
"properties": {
"code": {
"type": "string",
"description": "Locale code (ISO-639-1, optionally with region — e.g. `pt-BR`)."
},
"label": {
"type": "string",
"description": "Short uppercase label for compact UI badges."
},
"name": {
"type": "string",
"description": "Display name in the locale's native script (kept for compatibility with existing LanguageSelector)."
},
"native": {
"type": "string",
"description": "Same as `name` — present as an alias so new code can rely on a stable field name."
},
"english": {
"type": "string",
"description": "English name of the language (used by the docs translator system prompt)."
},
"flag": {
"type": "string",
"description": "Flag emoji shown next to the locale."
}
}
}
}
}
}