Automatic language choices resolve only to supported languages; community translations are listed apart in Settings and offered as a one-click switch. waybetter i18n check reads `supported` and generates `tier` into languages.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
2 KiB
JSON
29 lines
2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://waybetter.fyi/schema/i18n-config.schema.json",
|
|
"title": "wayBetter i18n config (waybetter.i18n.json)",
|
|
"description": "Where an app's catalogs and sources are, for `waybetter i18n check|extract`.",
|
|
"type": "object",
|
|
"required": ["locales"],
|
|
"properties": {
|
|
"$schema": { "type": "string" },
|
|
"locales": { "description": "The catalog folder (<bcp47>.json, en.meta.json, the generated languages.json).", "type": "string" },
|
|
"framework": { "description": "The framework's catalogs (default: the waybetter package's).", "type": "string" },
|
|
"sources": { "description": "Folders scanned for t('key') lookups.", "type": "array", "items": { "type": "string" } },
|
|
"nativeSources": { "description": "Rust folders scanned for tr(app, \"key\", ...) lookups.", "type": "array", "items": { "type": "string" } },
|
|
"bundledPlugins": { "description": "Bundled plugins whose inline English must match en.json.", "type": "string" },
|
|
"runtimeKeys": { "description": "Prefixes of keys built at runtime or used by generated files.", "type": "array", "items": { "type": "string" } },
|
|
"supported": {
|
|
"description": "The supported tier: catalogs checked by native speakers (or held to that bar). The app's automatic choices (\"same as system\") resolve only to these; English is always supported. Every other catalog gets tier \"community\" in languages.json: offered, but only when someone picks it, and labelled machine-drafted until it is reviewed. Omit for an app whose languages are all supported.",
|
|
"type": "array",
|
|
"items": { "type": "string", "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?(-x-[a-z0-9]{1,8})?$" },
|
|
"uniqueItems": true
|
|
},
|
|
"native": {
|
|
"type": "object",
|
|
"required": ["tauriDir"],
|
|
"properties": { "tauriDir": { "type": "string" }, "desktopFile": { "type": "string" }, "macos": { "type": "boolean" } }
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|