Skip to content

Commit aba0c7a

Browse files
author
Phrase
committed
1 parent bf1cdd1 commit aba0c7a

File tree

7 files changed

+36
-6
lines changed

7 files changed

+36
-6
lines changed

docs/KeyCreateParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**remove_screenshot** | **bool** | Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead. | [optional]
1616
**unformatted** | **bool** | Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats. | [optional]
1717
**default_translation_content** | **str** | Creates a translation in the default locale with the specified content | [optional]
18+
**autotranslate** | **bool** | Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`. | [optional]
1819
**xml_space_preserve** | **bool** | Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats. | [optional]
1920
**original_file** | **str** | Original file attribute. Used in some formats, e.g. XLIFF. | [optional]
2021
**localized_format_string** | **str** | NSStringLocalizedFormatKey attribute. Used in .stringsdict format. | [optional]

phrase_api/models/key_create_parameters.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class KeyCreateParameters(object):
4444
'remove_screenshot': 'bool',
4545
'unformatted': 'bool',
4646
'default_translation_content': 'str',
47+
'autotranslate': 'bool',
4748
'xml_space_preserve': 'bool',
4849
'original_file': 'str',
4950
'localized_format_string': 'str',
@@ -64,14 +65,15 @@ class KeyCreateParameters(object):
6465
'remove_screenshot': 'remove_screenshot',
6566
'unformatted': 'unformatted',
6667
'default_translation_content': 'default_translation_content',
68+
'autotranslate': 'autotranslate',
6769
'xml_space_preserve': 'xml_space_preserve',
6870
'original_file': 'original_file',
6971
'localized_format_string': 'localized_format_string',
7072
'localized_format_key': 'localized_format_key',
7173
'custom_metadata': 'custom_metadata'
7274
}
7375

74-
def __init__(self, branch=None, name=None, description=None, plural=None, name_plural=None, data_type=None, tags=None, max_characters_allowed=None, screenshot=None, remove_screenshot=None, unformatted=None, default_translation_content=None, xml_space_preserve=None, original_file=None, localized_format_string=None, localized_format_key=None, custom_metadata=None, local_vars_configuration=None): # noqa: E501
76+
def __init__(self, branch=None, name=None, description=None, plural=None, name_plural=None, data_type=None, tags=None, max_characters_allowed=None, screenshot=None, remove_screenshot=None, unformatted=None, default_translation_content=None, autotranslate=None, xml_space_preserve=None, original_file=None, localized_format_string=None, localized_format_key=None, custom_metadata=None, local_vars_configuration=None): # noqa: E501
7577
"""KeyCreateParameters - a model defined in OpenAPI""" # noqa: E501
7678
if local_vars_configuration is None:
7779
local_vars_configuration = Configuration()
@@ -89,6 +91,7 @@ def __init__(self, branch=None, name=None, description=None, plural=None, name_p
8991
self._remove_screenshot = None
9092
self._unformatted = None
9193
self._default_translation_content = None
94+
self._autotranslate = None
9295
self._xml_space_preserve = None
9396
self._original_file = None
9497
self._localized_format_string = None
@@ -119,6 +122,8 @@ def __init__(self, branch=None, name=None, description=None, plural=None, name_p
119122
self.unformatted = unformatted
120123
if default_translation_content is not None:
121124
self.default_translation_content = default_translation_content
125+
if autotranslate is not None:
126+
self.autotranslate = autotranslate
122127
if xml_space_preserve is not None:
123128
self.xml_space_preserve = xml_space_preserve
124129
if original_file is not None:
@@ -408,6 +413,29 @@ def default_translation_content(self, default_translation_content):
408413

409414
self._default_translation_content = default_translation_content
410415

416+
@property
417+
def autotranslate(self):
418+
"""Gets the autotranslate of this KeyCreateParameters. # noqa: E501
419+
420+
Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`. # noqa: E501
421+
422+
:return: The autotranslate of this KeyCreateParameters. # noqa: E501
423+
:rtype: bool
424+
"""
425+
return self._autotranslate
426+
427+
@autotranslate.setter
428+
def autotranslate(self, autotranslate):
429+
"""Sets the autotranslate of this KeyCreateParameters.
430+
431+
Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`. # noqa: E501
432+
433+
:param autotranslate: The autotranslate of this KeyCreateParameters. # noqa: E501
434+
:type: bool
435+
"""
436+
437+
self._autotranslate = autotranslate
438+
411439
@property
412440
def xml_space_preserve(self):
413441
"""Gets the xml_space_preserve of this KeyCreateParameters. # noqa: E501

test/test_key_create_parameters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ def make_instance(self, include_optional):
4545
data_type = 'number',
4646
tags = 'awesome-feature,needs-proofreading',
4747
max_characters_allowed = 140,
48-
screenshot = '[B@5dcf8b37',
48+
screenshot = '[B@7caf0725',
4949
remove_screenshot = True,
5050
unformatted = True,
5151
default_translation_content = 'Default translation content',
52+
autotranslate = True,
5253
xml_space_preserve = True,
5354
original_file = '',
5455
localized_format_string = '',

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@776609b',
48+
screenshot = '[B@644acaff',
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@11f8bff1',
44+
project_image = '[B@210d1b45',
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@3fb2306',
46+
project_image = '[B@29862f60',
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@99caac2'
43+
filename = '[B@35b1e5e5'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)