forked from tolgee/tolgee-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.json
175 lines (175 loc) · 5.48 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
"type": "object",
"properties": {
"projectId": {
"description": "Project ID. Only required when using a Personal Access Token.",
"type": ["number", "string"]
},
"extractor": {
"description": "A path to a custom extractor to use instead of the default one.",
"type": "string"
},
"apiUrl": {
"description": "The url of Tolgee API.",
"type": "string"
},
"patterns": {
"description": "File glob patterns to your source code, used for keys extraction.",
"type": "array",
"items": {
"type": "string"
}
},
"format": {
"$ref": "#/$defs/format"
},
"push": {
"type": "object",
"properties": {
"files": {
"description": "Define, which files should be pushed and attach language/namespace to them. By default Tolgee pushes all files specified here, you can filter them by languages and namespaces properties.",
"type": "array",
"items": { "$ref": "#/$defs/fileMatch" }
},
"languages": {
"description": "Specifies which languages should be pushed from push.files.",
"type": "array",
"items": { "type": "string" }
},
"namespaces": {
"description": "Specifies which namespaces should be pushed from push.files.",
"type": "array",
"items": { "type": "string" }
},
"forceMode": {
"$ref": "#/$defs/forceMode"
},
"overrideKeyDescriptions": {
"description": "Override existing key descriptions from local files (only relevant for some formats).",
"type": "boolean"
},
"convertPlaceholdersToIcu": {
"description": "Convert placeholders in local files to ICU format. (Default: true)",
"type": "boolean"
},
"tagNewKeys": {
"description": "Specify tags that will be added to newly created keys.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"pull": {
"type": "object",
"properties": {
"path": {
"description": "Path to a folder where the localization files are stored. (Structure itself can be defined with `fileStructureTemplate`)",
"type": "string"
},
"languages": {
"description": "List of languages to pull. Leave unspecified to export them all.",
"type": "array",
"items": {
"type": "string"
}
},
"namespaces": {
"description": "List of namespaces to pull. Defaults to all namespaces.",
"type": "array",
"items": {
"type": "string"
}
},
"states": {
"description": "List of translation states to include. Defaults all except untranslated.",
"type": "array",
"items": {
"enum": ["UNTRANSLATED", "TRANSLATED", "REVIEWED"]
}
},
"tags": {
"description": "List of tags which to include.",
"type": "array",
"items": {
"type": "string"
}
},
"excludeTags": {
"description": "List of tags which to exclude.",
"type": "array",
"items": {
"type": "string"
}
},
"supportArrays": {
"description": "Export keys with array syntax (e.g. item[0]) as arrays.",
"type": "boolean"
},
"fileStructureTemplate": {
"description": "Defines exported file structure: https://tolgee.io/tolgee-cli/push-pull-strings#file-structure-template-format",
"type": "string"
},
"emptyDir": {
"description": "Empty [path] folder before inserting pulled files.",
"type": "boolean"
},
"delimiter": {
"description": "Structure delimiter to use. By default, Tolgee interprets `.` as a nested structure. You can change the delimiter, or disable structure formatting by not specifying any value to the option.",
"type": ["string", "null"]
}
}
}
},
"$defs": {
"fileMatch": {
"type": "object",
"properties": {
"path": { "$ref": "#/$defs/path" },
"language": { "type": "string" },
"namespace": { "type": "string" }
},
"required": ["path", "language"]
},
"forceMode": {
"description": "Specifies how to solve potential conflicts in the pushed data.\n\nOptions:\n\n `OVERRIDE` - update everything according to local files\n `KEEP` - create only non-existent strings, don't touch existing ones\n `NO_FORCE` - throw an error, if there are any conflict",
"type": "string",
"enum": ["OVERRIDE", "KEEP", "NO_FORCE"]
},
"path": {
"description": "File glob specifying which files to include.",
"type": "string"
},
"format": {
"description": "Localization files format for push and pull operations.",
"enum": [
"JSON_TOLGEE",
"JSON_ICU",
"JSON_JAVA",
"JSON_PHP",
"JSON_RUBY",
"JSON_C",
"PO_PHP",
"PO_C",
"PO_JAVA",
"PO_ICU",
"PO_RUBY",
"APPLE_STRINGS",
"APPLE_XLIFF",
"PROPERTIES_ICU",
"PROPERTIES_JAVA",
"ANDROID_XML",
"FLUTTER_ARB",
"YAML_RUBY",
"YAML_JAVA",
"YAML_ICU",
"YAML_PHP",
"XLIFF_ICU",
"XLIFF_JAVA",
"XLIFF_PHP",
"XLIFF_RUBY"
]
}
}
}