Skip to content

Commit e6d08ba

Browse files
author
Phrase
committed
Deploying from phrase/openapi@5b486eab
1 parent f90dd4e commit e6d08ba

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

docs/UploadsApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010

1111

1212
# **upload_create**
13-
> Upload upload_create(project_id, file, file_format, locale_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, tags=tags, update_translations=update_translations, update_translation_keys=update_translation_keys, update_translations_on_source_match=update_translations_on_source_match, update_descriptions=update_descriptions, convert_emoji=convert_emoji, skip_upload_tags=skip_upload_tags, skip_unverification=skip_unverification, file_encoding=file_encoding, locale_mapping=locale_mapping, format_options=format_options, autotranslate=autotranslate, verify_mentioned_translations=verify_mentioned_translations, mark_reviewed=mark_reviewed, tag_only_affected_keys=tag_only_affected_keys, translation_key_prefix=translation_key_prefix)
13+
> Upload upload_create(project_id, file, file_format, locale_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, tags=tags, update_translations=update_translations, update_custom_metadata=update_custom_metadata, update_translation_keys=update_translation_keys, update_translations_on_source_match=update_translations_on_source_match, update_descriptions=update_descriptions, convert_emoji=convert_emoji, skip_upload_tags=skip_upload_tags, skip_unverification=skip_unverification, file_encoding=file_encoding, locale_mapping=locale_mapping, format_options=format_options, autotranslate=autotranslate, verify_mentioned_translations=verify_mentioned_translations, mark_reviewed=mark_reviewed, tag_only_affected_keys=tag_only_affected_keys, translation_key_prefix=translation_key_prefix)
1414
1515
Upload a new file
1616

@@ -41,6 +41,7 @@ with phrase_api.ApiClient(configuration) as api_client:
4141
branch = 'branch_example' # str | specify the branch to use
4242
tags = 'tags_example' # str | List of tags separated by comma to be associated with the new keys contained in the upload.
4343
update_translations = True # bool | Indicates whether existing translations should be updated with the file content.
44+
update_custom_metadata = True # bool | Indicates whether existing custom metadata properties should be updated with the file content (default to True)
4445
update_translation_keys = True # bool | Pass `false` here to prevent new keys from being created and existing keys updated. (default to True)
4546
update_translations_on_source_match = False # bool | Update target translations only if the source translations of the uploaded multilingual file match the stored translations. (default to False)
4647
update_descriptions = True # bool | Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -58,7 +59,7 @@ with phrase_api.ApiClient(configuration) as api_client:
5859

5960
try:
6061
# Upload a new file
61-
api_response = api_instance.upload_create(project_id, file, file_format, locale_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, tags=tags, update_translations=update_translations, update_translation_keys=update_translation_keys, update_translations_on_source_match=update_translations_on_source_match, update_descriptions=update_descriptions, convert_emoji=convert_emoji, skip_upload_tags=skip_upload_tags, skip_unverification=skip_unverification, file_encoding=file_encoding, locale_mapping=locale_mapping, format_options=format_options, autotranslate=autotranslate, verify_mentioned_translations=verify_mentioned_translations, mark_reviewed=mark_reviewed, tag_only_affected_keys=tag_only_affected_keys, translation_key_prefix=translation_key_prefix)
62+
api_response = api_instance.upload_create(project_id, file, file_format, locale_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, tags=tags, update_translations=update_translations, update_custom_metadata=update_custom_metadata, update_translation_keys=update_translation_keys, update_translations_on_source_match=update_translations_on_source_match, update_descriptions=update_descriptions, convert_emoji=convert_emoji, skip_upload_tags=skip_upload_tags, skip_unverification=skip_unverification, file_encoding=file_encoding, locale_mapping=locale_mapping, format_options=format_options, autotranslate=autotranslate, verify_mentioned_translations=verify_mentioned_translations, mark_reviewed=mark_reviewed, tag_only_affected_keys=tag_only_affected_keys, translation_key_prefix=translation_key_prefix)
6263
pprint(api_response)
6364
except ApiException as e:
6465
print("Exception when calling UploadsApi->upload_create: %s\n" % e)
@@ -77,6 +78,7 @@ Name | Type | Description | Notes
7778
**branch** | **str**| specify the branch to use | [optional]
7879
**tags** | **str**| List of tags separated by comma to be associated with the new keys contained in the upload. | [optional]
7980
**update_translations** | **bool**| Indicates whether existing translations should be updated with the file content. | [optional]
81+
**update_custom_metadata** | **bool**| Indicates whether existing custom metadata properties should be updated with the file content | [optional] [default to True]
8082
**update_translation_keys** | **bool**| Pass `false` here to prevent new keys from being created and existing keys updated. | [optional] [default to True]
8183
**update_translations_on_source_match** | **bool**| Update target translations only if the source translations of the uploaded multilingual file match the stored translations. | [optional] [default to False]
8284
**update_descriptions** | **bool**| Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. | [optional]

phrase_api/api/uploads_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def upload_create(self, project_id, file, file_format, locale_id, **kwargs): #
5353
:param str branch: specify the branch to use
5454
:param str tags: List of tags separated by comma to be associated with the new keys contained in the upload.
5555
:param bool update_translations: Indicates whether existing translations should be updated with the file content.
56+
:param bool update_custom_metadata: Indicates whether existing custom metadata properties should be updated with the file content
5657
:param bool update_translation_keys: Pass `false` here to prevent new keys from being created and existing keys updated.
5758
:param bool update_translations_on_source_match: Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
5859
:param bool update_descriptions: Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -99,6 +100,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
99100
:param str branch: specify the branch to use
100101
:param str tags: List of tags separated by comma to be associated with the new keys contained in the upload.
101102
:param bool update_translations: Indicates whether existing translations should be updated with the file content.
103+
:param bool update_custom_metadata: Indicates whether existing custom metadata properties should be updated with the file content
102104
:param bool update_translation_keys: Pass `false` here to prevent new keys from being created and existing keys updated.
103105
:param bool update_translations_on_source_match: Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
104106
:param bool update_descriptions: Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -138,6 +140,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
138140
'branch',
139141
'tags',
140142
'update_translations',
143+
'update_custom_metadata',
141144
'update_translation_keys',
142145
'update_translations_on_source_match',
143146
'update_descriptions',
@@ -213,6 +216,8 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
213216
form_params.append(('tags', local_var_params['tags'])) # noqa: E501
214217
if 'update_translations' in local_var_params:
215218
form_params.append(('update_translations', local_var_params['update_translations'])) # noqa: E501
219+
if 'update_custom_metadata' in local_var_params:
220+
form_params.append(('update_custom_metadata', local_var_params['update_custom_metadata'])) # noqa: E501
216221
if 'update_translation_keys' in local_var_params:
217222
form_params.append(('update_translation_keys', local_var_params['update_translation_keys'])) # noqa: E501
218223
if 'update_translations_on_source_match' in local_var_params:

test/test_key_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@6d7232a5',
49+
screenshot = '[B@edda257',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
default_translation_content = 'Default translation content',

test/test_key_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@6c769cd8',
49+
screenshot = '[B@7dbcbc7b',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
xml_space_preserve = True,

test/test_project_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def make_instance(self, include_optional):
4141
main_format = 'yml',
4242
media = 'Python',
4343
shares_translation_memory = True,
44-
project_image = '[B@17e7df9e',
44+
project_image = '[B@1d021496',
4545
remove_project_image = True,
4646
account_id = 'abcd1234',
4747
point_of_contact = 'abcd1234',

test/test_project_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def make_instance(self, include_optional):
4343
main_format = 'yml',
4444
media = 'Python',
4545
shares_translation_memory = True,
46-
project_image = '[B@15f28ef5',
46+
project_image = '[B@1dfdddfa',
4747
remove_project_image = False,
4848
workflow = 'review',
4949
machine_translation_enabled = True,

test/test_screenshot_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def make_instance(self, include_optional):
4040
branch = 'my-feature-branch',
4141
name = 'A screenshot name',
4242
description = 'A screenshot description',
43-
filename = '[B@44c01e8c'
43+
filename = '[B@3f6b01b'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)