mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-27 19:34:10 +08:00
439 lines
11 KiB
JSON
439 lines
11 KiB
JSON
{
|
|
"$id": "https://weblate.org/schemas/weblate-backup.schema.json",
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"definitions": {
|
|
"category": {
|
|
"$id": "#/definitions/category",
|
|
"title": "Category",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"slug",
|
|
"categories"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"$id": "#/definitions/category/name",
|
|
"title": "Category name",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"My Category"
|
|
]
|
|
},
|
|
"slug": {
|
|
"$id": "#/definitions/category/slug",
|
|
"title": "Full URL slug excluding the project slug",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"my-category",
|
|
"my-category/my-subcategory"
|
|
]
|
|
},
|
|
"categories": {
|
|
"$id": "#/definitions/category/items/category",
|
|
"title": "Categories",
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"$ref": "#/definitions/category"
|
|
}
|
|
],
|
|
"default": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"title": "Weblate backup",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"metadata",
|
|
"project",
|
|
"labels"
|
|
],
|
|
"properties": {
|
|
"metadata": {
|
|
"$id": "#root/metadata",
|
|
"title": "Export metadata",
|
|
"type": "object",
|
|
"required": [
|
|
"version",
|
|
"server",
|
|
"domain",
|
|
"timestamp"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": {
|
|
"$id": "#root/metadata/version",
|
|
"title": "Weblate version",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"4.13"
|
|
]
|
|
},
|
|
"server": {
|
|
"$id": "#root/metadata/server",
|
|
"title": "Server name",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"Weblate"
|
|
]
|
|
},
|
|
"domain": {
|
|
"$id": "#root/metadata/domain",
|
|
"title": "Server domain",
|
|
"type": "string",
|
|
"format": "hostname",
|
|
"default": "",
|
|
"examples": [
|
|
"weblate.example.com"
|
|
]
|
|
},
|
|
"timestamp": {
|
|
"$id": "#root/metadata/timestamp",
|
|
"title": "Export timestamp",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"default": "",
|
|
"examples": [
|
|
"2019-11-18T18:53:54.862Z"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"project": {
|
|
"$id": "#root/project",
|
|
"title": "Project",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"slug",
|
|
"web",
|
|
"instructions",
|
|
"access_control",
|
|
"language_aliases",
|
|
"set_language_team",
|
|
"use_shared_tm",
|
|
"contribute_shared_tm",
|
|
"translation_review",
|
|
"source_review",
|
|
"enable_hooks"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"$id": "#root/project/name",
|
|
"title": "Project name",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"Hello"
|
|
]
|
|
},
|
|
"slug": {
|
|
"$id": "#root/project/slug",
|
|
"title": "URL slug",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"hello"
|
|
]
|
|
},
|
|
"web": {
|
|
"$id": "#root/project/web",
|
|
"title": "",
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"format": "iri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"maxLength": 0
|
|
}
|
|
],
|
|
"default": "Project website",
|
|
"examples": [
|
|
"https://weblate.org/"
|
|
]
|
|
},
|
|
"instructions": {
|
|
"$id": "#root/project/instructions",
|
|
"title": "Translation instructions",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"access_control": {
|
|
"$id": "#root/project/access_control",
|
|
"title": "Access control",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
100,
|
|
200
|
|
],
|
|
"default": 0,
|
|
"examples": [
|
|
0
|
|
]
|
|
},
|
|
"language_aliases": {
|
|
"$id": "#root/project/language_aliases",
|
|
"title": "Language aliases",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
""
|
|
]
|
|
},
|
|
"set_language_team": {
|
|
"$id": "#root/project/set_language_team",
|
|
"title": "Set \"Language-Team\" header",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"use_shared_tm": {
|
|
"$id": "#root/project/use_shared_tm",
|
|
"title": "Use shared translation memory",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"contribute_shared_tm": {
|
|
"$id": "#root/project/contribute_shared_tm",
|
|
"title": "Contribute to shared translation memory",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"translation_review": {
|
|
"$id": "#root/project/translation_review",
|
|
"title": "Enable reviews",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"source_review": {
|
|
"$id": "#root/project/source_review",
|
|
"title": "Enable source reviews",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"enable_hooks": {
|
|
"$id": "#root/project/enable_hooks",
|
|
"title": "Enable hooks",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"labels": {
|
|
"$id": "#root/labels",
|
|
"title": "Project labels",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$id": "#root/labels/items",
|
|
"title": "Items",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"color"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"$id": "#root/auditlog/items/name",
|
|
"title": "Label name",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"Label"
|
|
]
|
|
},
|
|
"color": {
|
|
"$id": "#root/auditlog/items/color",
|
|
"title": "Color",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"navy"
|
|
],
|
|
"enum": [
|
|
"navy",
|
|
"blue",
|
|
"aqua",
|
|
"teal",
|
|
"olive",
|
|
"green",
|
|
"lime",
|
|
"yellow",
|
|
"orange",
|
|
"red",
|
|
"maroon",
|
|
"fuchsia",
|
|
"purple",
|
|
"black",
|
|
"gray",
|
|
"silver"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"categories": {
|
|
"$id": "#root/categories",
|
|
"title": "Project Categories",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/category"
|
|
}
|
|
},
|
|
"teams": {
|
|
"$id": "#root/teams",
|
|
"title": "Teams",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$id": "#root/teams/items",
|
|
"title": "Team",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"roles",
|
|
"components",
|
|
"language_selection",
|
|
"languages",
|
|
"admins",
|
|
"enforced_2fa",
|
|
"members",
|
|
"autogroups"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"$id": "#root/teams/items/name",
|
|
"title": "Team name",
|
|
"type": "string",
|
|
"default": "",
|
|
"examples": [
|
|
"My Team"
|
|
]
|
|
},
|
|
"roles": {
|
|
"$id": "#root/teams/items/roles",
|
|
"title": "Roles",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Role name",
|
|
"type": "string"
|
|
},
|
|
"default": [],
|
|
"examples": [
|
|
[
|
|
"Translate",
|
|
"Billing"
|
|
]
|
|
]
|
|
},
|
|
"components": {
|
|
"$id": "#root/teams/items/components",
|
|
"title": "Components",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Full component URL slug excluding the project slug",
|
|
"type": "string"
|
|
},
|
|
"default": [],
|
|
"examples": [
|
|
[
|
|
"my-category/my-component",
|
|
"top-level-component"
|
|
]
|
|
]
|
|
},
|
|
"language_selection": {
|
|
"$id": "#root/teams/items/language_selection",
|
|
"title": "Language Selection",
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1
|
|
],
|
|
"default": 0
|
|
},
|
|
"languages": {
|
|
"$id": "#root/teams/items/languages",
|
|
"title": "Languages",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Language code",
|
|
"type": "string"
|
|
},
|
|
"default": [],
|
|
"examples": [
|
|
[
|
|
"en",
|
|
"ru"
|
|
]
|
|
]
|
|
},
|
|
"admins": {
|
|
"$id": "#root/teams/items/admins",
|
|
"title": "Admins",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
},
|
|
"default": [],
|
|
"examples": [
|
|
[
|
|
"admin"
|
|
]
|
|
]
|
|
},
|
|
"enforced_2fa": {
|
|
"$id": "#root/teams/items/enforced_2fa",
|
|
"title": "Enforced two-factor authentication",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"members": {
|
|
"$id": "#root/teams/items/members",
|
|
"title": "Members",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Username",
|
|
"type": "string"
|
|
},
|
|
"default": [],
|
|
"examples": [
|
|
[
|
|
"user-1"
|
|
]
|
|
]
|
|
},
|
|
"autogroups": {
|
|
"$id": "#root/teams/items/autogroups",
|
|
"title": "Auto Groups",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "Regex to match",
|
|
"type": "string"
|
|
},
|
|
"examples": [
|
|
[
|
|
"^.*$"
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|