Skip to content

Commit f2fdf60

Browse files
authored
feat(API): Add "verify_mentioned_translations" parameter to uploads (#830)
1 parent 20de2b4 commit f2fdf60

3 files changed

Lines changed: 40 additions & 29 deletions

File tree

clients/java/src/test/java/com/phrase/client/api/UploadsApiTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
107107
String fileEncoding = null;
108108
Object localeMapping = null;
109109
Boolean autotranslate = null;
110+
Boolean verifyMentionedTranslations = null;
110111
Boolean markReviewed = null;
111112
Boolean tagOnlyAffectedKeys = null;
112113
String translationKeyPrefix = null;
@@ -122,7 +123,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
122123
Upload response = api.uploadCreate(projectId, file, fileFormat, localeId, xPhraseAppOTP, branch,
123124
tags, updateTranslations, updateTranslationKeys, updateTranslationsOnSourceMatch,
124125
updateDescriptions, convertEmoji, skipUploadTags, skipUnverification, fileEncoding,
125-
localeMapping, formatOptionsMap, autotranslate, markReviewed, tagOnlyAffectedKeys,
126+
localeMapping, formatOptionsMap, autotranslate, verifyMentionedTranslations, markReviewed, tagOnlyAffectedKeys,
126127
translationKeyPrefix);
127128

128129
Assert.assertEquals("valid id returned", "id_example", response.getId());

doc/compiled.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14591,6 +14591,12 @@
1459114591
"type": "boolean",
1459214592
"example": null
1459314593
},
14594+
"verify_mentioned_translations": {
14595+
"description": "Indicates whether all translations mentioned in the upload should be verified.",
14596+
"type": "boolean",
14597+
"default": false,
14598+
"example": null
14599+
},
1459414600
"mark_reviewed": {
1459514601
"description": "Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.",
1459614602
"type": "boolean",

paths/uploads/create.yaml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
---
21
summary: Upload a new file
32
description: Upload a new language file. Creates necessary resources in your project.
43
operationId: upload/create
54
tags:
6-
- Uploads
5+
- Uploads
76
parameters:
8-
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
9-
- "$ref": "../../parameters.yaml#/project_id"
7+
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
8+
- "$ref": "../../parameters.yaml#/project_id"
109
responses:
1110
'201':
1211
description: Created
@@ -28,30 +27,30 @@ responses:
2827
'429':
2928
"$ref": "../../responses.yaml#/429"
3029
x-code-samples:
31-
- lang: Curl
32-
source: |-
33-
curl "https://api.phrase.com/v2/projects/:project_id/uploads" \
34-
-u USERNAME_OR_ACCESS_TOKEN \
35-
-X POST \
36-
-F branch=my-feature-branch \
37-
-F file=@/path/to/my/file.json \
38-
-F file_format=json \
39-
-F locale_id=abcd1234cdef1234abcd1234cdef1234 \
40-
-F tags=awesome-feature,needs-proofreading \
41-
-F locale_mapping[en]=2 \
42-
-F format_options[foo]=bar
43-
- lang: CLI v2
44-
source: |-
45-
phrase uploads create \
46-
--project_id <project_id> \
47-
--branch my-feature-branch \
48-
--file /path/to/my/file.json \
49-
--file_format json \
50-
--locale_id abcd1234cdef1234abcd1234cdef1234 \
51-
--tags awesome-feature,needs-proofreading \
52-
--locale_mapping '{"en": "2"}' \
53-
--format_options '{"foo": "bar"}' \
54-
--access_token <token>
30+
- lang: Curl
31+
source: |-
32+
curl "https://api.phrase.com/v2/projects/:project_id/uploads" \
33+
-u USERNAME_OR_ACCESS_TOKEN \
34+
-X POST \
35+
-F branch=my-feature-branch \
36+
-F file=@/path/to/my/file.json \
37+
-F file_format=json \
38+
-F locale_id=abcd1234cdef1234abcd1234cdef1234 \
39+
-F tags=awesome-feature,needs-proofreading \
40+
-F locale_mapping[en]=2 \
41+
-F format_options[foo]=bar
42+
- lang: CLI v2
43+
source: |-
44+
phrase uploads create \
45+
--project_id <project_id> \
46+
--branch my-feature-branch \
47+
--file /path/to/my/file.json \
48+
--file_format json \
49+
--locale_id abcd1234cdef1234abcd1234cdef1234 \
50+
--tags awesome-feature,needs-proofreading \
51+
--locale_mapping '{"en": "2"}' \
52+
--format_options '{"foo": "bar"}' \
53+
--access_token <token>
5554
requestBody:
5655
required: true
5756
content:
@@ -134,6 +133,11 @@ requestBody:
134133
description: If set, translations for the uploaded language will be fetched automatically.
135134
type: boolean
136135
example:
136+
verify_mentioned_translations:
137+
description: Indicates whether all translations mentioned in the upload should be verified.
138+
type: boolean
139+
default: false
140+
example:
137141
mark_reviewed:
138142
description: Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
139143
type: boolean

0 commit comments

Comments
 (0)