1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "type": "object",
- "description": "All locales and translations that are available in BYTM.",
- "patternProperties": {
- "^[a-z]{2}-[A-Z]{2}$": {
- "type": "object",
- "required": ["name", "nameEnglish", "emoji", "userscriptDesc", "authors", "altLocales", "textDir", "sentenceTerminator"],
- "description": "Main locale code in the format \"ll-CC\" (language-COUNTRY).",
- "properties": {
- "name": {
- "type": "string",
- "description": "Native name and country of the language, e.g. \"Deutsch (Deutschland)\"."
- },
- "nameEnglish": {
- "type": "string",
- "description": "English name and country of the language, e.g. \"German (Germany)\".",
- "pattern": "^.+ \\(.+\\)$"
- },
- "emoji": {
- "type": "string",
- "pattern": "^[\uD83C\uDDE6-\uDDFF\uD83C\uDDE6-\uDDFF]{4}$",
- "description": "Flag emoji of the country."
- },
- "userscriptDesc": {
- "type": "string",
- "description": "Localized userscript description (from \"description\" in package.json)."
- },
- "authors": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "List of authors that contributed to the translation."
- },
- "altLocales": {
- "type": "array",
- "items": {
- "contains": {
- "pattern": "^[a-z]{2}$"
- },
- "type": "string",
- "pattern": "^[a-z]{2}(-[A-Z]{2})?$"
- },
- "description": "Alternative locale codes that will be redirected to this locale, e.g. for all German languages: [\"de\", \"de-AT\", \"de-CH\", \"de-LI\", \"de-LU\"]."
- },
- "textDir": {
- "type": "string",
- "enum": ["ltr", "rtl"],
- "description": "Text direction of the language."
- },
- "sentenceTerminator": {
- "type": "string",
- "description": "The character that ends a neutral, informative sentence, e.g. \".\", \"।\" or \"。\".",
- "pattern": "^.{1}$"
- }
- },
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- }
|