Skip to content

Commit

Permalink
feat: Add update_translations_on_source_match (#670)
Browse files Browse the repository at this point in the history
* Add update_translations_on_source_match upload option to cli
  • Loading branch information
ildarsafin authored Aug 26, 2024
1 parent 50e329d commit 11003ac
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 @@ -97,6 +97,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
String tags = null;
Boolean updateTranslations = null;
Boolean updateTranslationKeys = true;
Boolean updateTranslationsOnSourceMatch = null;
Boolean updateDescriptions = null;
Boolean convertEmoji = null;
Boolean skipUploadTags = null;
Expand All @@ -107,7 +108,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, updateTranslationKeys, updateDescriptions, convertEmoji, skipUploadTags, skipUnverification, fileEncoding, localeMapping, formatOptions, autotranslate, markReviewed, tagOnlyAffectedKeys);
Upload response = api.uploadCreate(projectId, file, fileFormat, localeId, xPhraseAppOTP, branch, tags, updateTranslations, updateTranslationKeys, updateTranslationsOnSourceMatch, 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 @@ -14989,6 +14989,12 @@
"default": true,
"example": null
},
"update_translations_on_source_match": {
"description": "Update target translations only if the source translations of the uploaded multilingual file match the stored translations.",
"type": "boolean",
"default": false,
"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 @@ -94,6 +94,11 @@ requestBody:
type: boolean
default: true
example:
update_translations_on_source_match:
description: Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
type: boolean
default: false
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 11003ac

Please sign in to comment.