Skip to content

Commit

Permalink
feat(API): Add 'update_translation_keys' for Uploads [TSI-2292] (#578)
Browse files Browse the repository at this point in the history
* feat(API): Add 'update_translation_keys' for Uploads [TSI-2292]

* Fix failing Java test, rephrase option's description
  • Loading branch information
hahmed-dev authored Apr 29, 2024
1 parent 95dfe7a commit 4492ec0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
String localeId = "en";
String tags = null;
Boolean updateTranslations = null;
Boolean updateTranslationKeys = true;
Boolean updateDescriptions = null;
Boolean convertEmoji = null;
Boolean skipUploadTags = null;
Expand All @@ -106,7 +107,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
Boolean autotranslate = null;
Boolean markReviewed = null;
Boolean tagOnlyAffectedKeys = null;
Upload response = api.uploadCreate(projectId, file, fileFormat, localeId, xPhraseAppOTP, branch, tags, updateTranslations, updateDescriptions, convertEmoji, skipUploadTags, skipUnverification, fileEncoding, localeMapping, formatOptions, autotranslate, markReviewed, tagOnlyAffectedKeys);
Upload response = api.uploadCreate(projectId, file, fileFormat, localeId, xPhraseAppOTP, branch, tags, updateTranslations, updateTranslationKeys, updateDescriptions, convertEmoji, skipUploadTags, skipUnverification, fileEncoding, localeMapping, formatOptions, autotranslate, markReviewed, tagOnlyAffectedKeys);

Assert.assertEquals("valid id returned", "id_example", response.getId());
Assert.assertEquals("valid creation date returned", OffsetDateTime.parse("2015-01-28T09:52:53Z"), response.getCreatedAt());
Expand Down
6 changes: 6 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -14136,6 +14136,12 @@
"type": "boolean",
"example": null
},
"update_translation_keys": {
"description": "Pass `false` here to prevent new keys from being created and existing keys updated.",
"type": "boolean",
"default": true,
"example": null
},
"update_descriptions": {
"description": "Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.",
"type": "boolean",
Expand Down
5 changes: 5 additions & 0 deletions paths/uploads/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ requestBody:
description: Indicates whether existing translations should be updated with the file content.
type: boolean
example:
update_translation_keys:
description: Pass `false` here to prevent new keys from being created and existing keys updated.
type: boolean
default: true
example:
update_descriptions:
description: Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
type: boolean
Expand Down

0 comments on commit 4492ec0

Please sign in to comment.