Skip to content

Commit a4c6a7b

Browse files
author
Phrase
committed
1 parent c315679 commit a4c6a7b

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_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)
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, source_locale_id=source_locale_id, 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

@@ -44,6 +44,7 @@ with phrase_api.ApiClient(configuration) as api_client:
4444
update_custom_metadata = True # bool | Determines whether to update custom metadata values when uploading a file. If set to true, existing metadata can be changed or removed. Passing an empty value deletes the corresponding metadata property. (default to True)
4545
update_translation_keys = True # bool | Pass `false` here to prevent new keys from being created and existing keys updated. (default to True)
4646
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)
47+
source_locale_id = 'source_locale_id_example' # str | Specifies the source locale for multilingual files. Can be the name or id of the locale. Preferred is id.
4748
update_descriptions = True # bool | Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
4849
convert_emoji = True # bool | This option is obsolete. Providing the option will cause a bad request error.
4950
skip_upload_tags = True # bool | Indicates whether the upload should not create upload tags.
@@ -59,7 +60,7 @@ with phrase_api.ApiClient(configuration) as api_client:
5960

6061
try:
6162
# Upload a new file
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)
63+
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, source_locale_id=source_locale_id, 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)
6364
pprint(api_response)
6465
except ApiException as e:
6566
print("Exception when calling UploadsApi->upload_create: %s\n" % e)
@@ -81,6 +82,7 @@ Name | Type | Description | Notes
8182
**update_custom_metadata** | **bool**| Determines whether to update custom metadata values when uploading a file. If set to true, existing metadata can be changed or removed. Passing an empty value deletes the corresponding metadata property. | [optional] [default to True]
8283
**update_translation_keys** | **bool**| Pass `false` here to prevent new keys from being created and existing keys updated. | [optional] [default to True]
8384
**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]
85+
**source_locale_id** | **str**| Specifies the source locale for multilingual files. Can be the name or id of the locale. Preferred is id. | [optional]
8486
**update_descriptions** | **bool**| Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. | [optional]
8587
**convert_emoji** | **bool**| This option is obsolete. Providing the option will cause a bad request error. | [optional]
8688
**skip_upload_tags** | **bool**| Indicates whether the upload should not create upload tags. | [optional]

phrase_api/api/uploads_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def upload_create(self, project_id, file, file_format, locale_id, **kwargs): #
5656
:param bool update_custom_metadata: Determines whether to update custom metadata values when uploading a file. If set to true, existing metadata can be changed or removed. Passing an empty value deletes the corresponding metadata property.
5757
:param bool update_translation_keys: Pass `false` here to prevent new keys from being created and existing keys updated.
5858
:param bool update_translations_on_source_match: Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
59+
:param str source_locale_id: Specifies the source locale for multilingual files. Can be the name or id of the locale. Preferred is id.
5960
:param bool update_descriptions: Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
6061
:param bool convert_emoji: This option is obsolete. Providing the option will cause a bad request error.
6162
:param bool skip_upload_tags: Indicates whether the upload should not create upload tags.
@@ -103,6 +104,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
103104
:param bool update_custom_metadata: Determines whether to update custom metadata values when uploading a file. If set to true, existing metadata can be changed or removed. Passing an empty value deletes the corresponding metadata property.
104105
:param bool update_translation_keys: Pass `false` here to prevent new keys from being created and existing keys updated.
105106
:param bool update_translations_on_source_match: Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
107+
:param str source_locale_id: Specifies the source locale for multilingual files. Can be the name or id of the locale. Preferred is id.
106108
:param bool update_descriptions: Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
107109
:param bool convert_emoji: This option is obsolete. Providing the option will cause a bad request error.
108110
:param bool skip_upload_tags: Indicates whether the upload should not create upload tags.
@@ -143,6 +145,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
143145
'update_custom_metadata',
144146
'update_translation_keys',
145147
'update_translations_on_source_match',
148+
'source_locale_id',
146149
'update_descriptions',
147150
'convert_emoji',
148151
'skip_upload_tags',
@@ -222,6 +225,8 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
222225
form_params.append(('update_translation_keys', local_var_params['update_translation_keys'])) # noqa: E501
223226
if 'update_translations_on_source_match' in local_var_params:
224227
form_params.append(('update_translations_on_source_match', local_var_params['update_translations_on_source_match'])) # noqa: E501
228+
if 'source_locale_id' in local_var_params:
229+
form_params.append(('source_locale_id', local_var_params['source_locale_id'])) # noqa: E501
225230
if 'update_descriptions' in local_var_params:
226231
form_params.append(('update_descriptions', local_var_params['update_descriptions'])) # noqa: E501
227232
if 'convert_emoji' 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@384edc3b',
49+
screenshot = '[B@566bea82',
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@13421eb0',
49+
screenshot = '[B@4b28d787',
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@18809db8',
44+
project_image = '[B@1d0544b3',
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@c34e260',
46+
project_image = '[B@22d7e121',
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@243fe859'
43+
filename = '[B@617c1ac2'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)