mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-15 19:32:20 +03:00
Locale aliases (uk, fil/tl, zh-hant, legacy in→id) with fixed browser/CLI/cookie detection; config/i18n.json shipped in the npm package; duplicate 'in' locale retired (42 honest locales); real-translation ratio gate with ratchet baseline (advisory); add-locale orchestrator + shared libs (batched translation backend, config-generated language bars, run-translation --adopt/--targets-only, scaffold helpers); tests derive the locale count from config with surface parity guards; docs and every public locale-count claim aligned.
76 lines
2.7 KiB
JSON
76 lines
2.7 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."
|
|
},
|
|
"aliases": {
|
|
"type": "array",
|
|
"description": "Browser/OS language tags (lower-case BCP-47) that resolve to this locale, e.g. `uk` → `uk-UA`, `fil`/`tl` → `phi`.",
|
|
"items": { "type": "string", "pattern": "^[a-z]{2,3}(-[a-z0-9]{2,8})*$" },
|
|
"uniqueItems": true
|
|
},
|
|
"script": {
|
|
"type": "string",
|
|
"description": "ISO 15924 script code (e.g. `Mymr`, `Khmr`). Informational only — the visual-QA report uses it to prioritise tall scripts."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|