|
19 | 19 | "description": "Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\"", |
20 | 20 | "type": "string", |
21 | 21 | "default": "UTF-8" |
| 22 | + }, |
| 23 | + "format_options": { |
| 24 | + "description": "Additional options available for specific formats. See our format guide for complete list.", |
| 25 | + "type": "object", |
| 26 | + "properties": { |
| 27 | + "column_separator": { |
| 28 | + "description": "Column separator character", |
| 29 | + "type": "string", |
| 30 | + "default": ";" |
| 31 | + } |
| 32 | + } |
22 | 33 | } |
23 | 34 | }, |
24 | 35 | "properties": { |
|
51 | 62 | "type": "object", |
52 | 63 | "properties": { |
53 | 64 | "file": { |
54 | | - "description": "Translation file which will be uploaded", |
| 65 | + "description": "Translation file(s) which should be uploaded. You can either specify a single file or a pattern. The glob pattern will be expanded to all files matching the pattern. Besides '*' and '**', you can use the following placeholders: <locale_name> for the locale name and <locale_code> for the locale code", |
55 | 66 | "type": "string", |
56 | | - "default": "<locale_name>.yml" |
| 67 | + "examples": [ |
| 68 | + "en.yml", |
| 69 | + "translations/*.yml", |
| 70 | + "./src/<locale_name>.yml" |
| 71 | + ] |
57 | 72 | }, |
58 | 73 | "params": { |
59 | 74 | "description": "Locale upload parameter", |
60 | 75 | "type": "object", |
61 | 76 | "properties": { |
62 | | - "branch": { |
63 | | - "description": "Branch name", |
64 | | - "type": "string" |
65 | | - }, |
66 | 77 | "file_format": { |
67 | 78 | "$ref": "#/definitions/file_format" |
68 | 79 | }, |
69 | 80 | "locale_id": { |
70 | 81 | "$ref": "#/definitions/locale_id" |
71 | 82 | }, |
| 83 | + "branch": { |
| 84 | + "description": "Branch name", |
| 85 | + "type": "string" |
| 86 | + }, |
72 | 87 | "tags": { |
73 | 88 | "description": "List of tags separated by comma to be associated with the new keys contained in the upload", |
74 | 89 | "type": "string" |
|
110 | 125 | "default": false |
111 | 126 | }, |
112 | 127 | "mark_reviewed": { |
113 | | - "description": "Indicated whether the imported translations should be marked as reviewed", |
| 128 | + "description": "Indicates whether the imported translations should be marked as reviewed", |
114 | 129 | "type": "boolean", |
115 | 130 | "default": false |
116 | 131 | }, |
117 | 132 | "file_encoding": { |
118 | 133 | "$ref": "#/definitions/encoding" |
119 | 134 | }, |
| 135 | + "translation_key_prefix": { |
| 136 | + "description": "Prefix all the created keys with the given prefix. This can be used to prevent collisions from multiple different sources", |
| 137 | + "type": "string" |
| 138 | + }, |
120 | 139 | "locale_mapping": { |
121 | 140 | "description": "Optional, format specific mapping between locale names and the columns the translations to those locales are contained in", |
122 | 141 | "type": "object" |
123 | 142 | }, |
124 | 143 | "format_options": { |
125 | | - "description": "Additional options available for specific formats. See our format guide for complete list", |
126 | | - "type": "object", |
127 | | - "properties": { |
128 | | - "column_separator": { |
129 | | - "description": "Column separator character", |
130 | | - "type": "string", |
131 | | - "default": ";" |
132 | | - } |
133 | | - } |
| 144 | + "$ref": "#/definitions/format_options" |
134 | 145 | } |
135 | 146 | } |
136 | 147 | } |
|
150 | 161 | "type": "object", |
151 | 162 | "properties": { |
152 | 163 | "file": { |
153 | | - "description": "Translation file which will be downloaded", |
| 164 | + "description": "Translation file which will be downloaded. You can either specify a single file or a pattern. The pattern can contain the following placeholders: <locale_name> for the locale name, <locale_code> for the locale code, and <tag>, which will go through the tag list and create a file for each tag. The placeholders will be replaced with the corresponding values.", |
154 | 165 | "type": "string", |
155 | | - "default": "<locale_name>.yml" |
| 166 | + "examples": ["en.yml", "translations/<locale_name>.yml"] |
156 | 167 | }, |
157 | 168 | "project_id": { |
158 | 169 | "$ref": "#/definitions/project_id" |
|
228 | 239 | "custom_metadata_filters": { |
229 | 240 | "description": "Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download", |
230 | 241 | "type": "object" |
| 242 | + }, |
| 243 | + "filter_by_prefix": { |
| 244 | + "description": "Filters keys by prefix. Only keys starting with the given prefix will be included in the download, and the prefix will be removed from the key name in the files", |
| 245 | + "type": "string" |
| 246 | + }, |
| 247 | + "translation_key_prefix": { |
| 248 | + "description": "If a key name starts with the given prefix, the prefix will be removed from the key name in the files", |
| 249 | + "type": "string" |
| 250 | + }, |
| 251 | + "format_options": { |
| 252 | + "$ref": "#/definitions/format_options" |
231 | 253 | } |
232 | 254 | } |
233 | 255 | } |
|
0 commit comments