Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(API): Add 'update_translation_keys' for Uploads [TSI-2292] #578

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading