Skip to content

Commit 8bbde33

Browse files
author
Phrase
committed
1 parent 012cafa commit 8bbde33

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, 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_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

@@ -51,13 +51,14 @@ with phrase_api.ApiClient(configuration) as api_client:
5151
locale_mapping = None # object | Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
5252
format_options = None # object | Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
5353
autotranslate = True # bool | If set, translations for the uploaded language will be fetched automatically.
54+
verify_mentioned_translations = False # bool | Indicates whether all translations mentioned in the upload should be verified. (default to False)
5455
mark_reviewed = True # bool | Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
5556
tag_only_affected_keys = False # bool | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` (default to False)
5657
translation_key_prefix = 'translation_key_prefix_example' # str | This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
5758

5859
try:
5960
# Upload a new file
60-
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, mark_reviewed=mark_reviewed, tag_only_affected_keys=tag_only_affected_keys, translation_key_prefix=translation_key_prefix)
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)
6162
pprint(api_response)
6263
except ApiException as e:
6364
print("Exception when calling UploadsApi->upload_create: %s\n" % e)
@@ -86,6 +87,7 @@ Name | Type | Description | Notes
8687
**locale_mapping** | [**object**](object.md)| Mapping between locale names and translation columns. Required in some formats like CSV or XLSX. | [optional]
8788
**format_options** | [**object**](object.md)| Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings). | [optional]
8889
**autotranslate** | **bool**| If set, translations for the uploaded language will be fetched automatically. | [optional]
90+
**verify_mentioned_translations** | **bool**| Indicates whether all translations mentioned in the upload should be verified. | [optional] [default to False]
8991
**mark_reviewed** | **bool**| Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. | [optional]
9092
**tag_only_affected_keys** | **bool**| Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` | [optional] [default to False]
9193
**translation_key_prefix** | **str**| This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized. | [optional]

phrase_api/api/uploads_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def upload_create(self, project_id, file, file_format, locale_id, **kwargs): #
6363
:param object locale_mapping: Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
6464
:param object format_options: Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
6565
:param bool autotranslate: If set, translations for the uploaded language will be fetched automatically.
66+
:param bool verify_mentioned_translations: Indicates whether all translations mentioned in the upload should be verified.
6667
:param bool mark_reviewed: Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
6768
:param bool tag_only_affected_keys: Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
6869
:param str translation_key_prefix: This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
@@ -108,6 +109,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
108109
:param object locale_mapping: Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
109110
:param object format_options: Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
110111
:param bool autotranslate: If set, translations for the uploaded language will be fetched automatically.
112+
:param bool verify_mentioned_translations: Indicates whether all translations mentioned in the upload should be verified.
111113
:param bool mark_reviewed: Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
112114
:param bool tag_only_affected_keys: Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
113115
:param str translation_key_prefix: This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
@@ -146,6 +148,7 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
146148
'locale_mapping',
147149
'format_options',
148150
'autotranslate',
151+
'verify_mentioned_translations',
149152
'mark_reviewed',
150153
'tag_only_affected_keys',
151154
'translation_key_prefix'
@@ -230,6 +233,8 @@ def upload_create_with_http_info(self, project_id, file, file_format, locale_id,
230233
form_params.append(('format_options', local_var_params['format_options'])) # noqa: E501
231234
if 'autotranslate' in local_var_params:
232235
form_params.append(('autotranslate', local_var_params['autotranslate'])) # noqa: E501
236+
if 'verify_mentioned_translations' in local_var_params:
237+
form_params.append(('verify_mentioned_translations', local_var_params['verify_mentioned_translations'])) # noqa: E501
233238
if 'mark_reviewed' in local_var_params:
234239
form_params.append(('mark_reviewed', local_var_params['mark_reviewed'])) # noqa: E501
235240
if 'tag_only_affected_keys' in local_var_params:

test/test_key_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def make_instance(self, include_optional):
4545
data_type = 'number',
4646
tags = 'awesome-feature,needs-proofreading',
4747
max_characters_allowed = 140,
48-
screenshot = '[B@7150439c',
48+
screenshot = '[B@12445241',
4949
remove_screenshot = True,
5050
unformatted = True,
5151
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
@@ -45,7 +45,7 @@ def make_instance(self, include_optional):
4545
data_type = 'number',
4646
tags = 'awesome-feature,needs-proofreading',
4747
max_characters_allowed = 140,
48-
screenshot = '[B@4e928f86',
48+
screenshot = '[B@4bafe92f',
4949
remove_screenshot = True,
5050
unformatted = True,
5151
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@6571c72e',
44+
project_image = '[B@3949fcdc',
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@1145d71f',
46+
project_image = '[B@2ab632d',
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@1af3bf5b'
43+
filename = '[B@649ded12'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)