Skip to content

Commit 829af77

Browse files
author
Phrase
committed
1 parent dee9e9c commit 829af77

10 files changed

Lines changed: 45 additions & 9 deletions

docs/JobDetails.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**updated_at** | **datetime** | | [optional]
1616
**owner** | [**UserPreview**](UserPreview.md) | | [optional]
1717
**job_tag_name** | **str** | | [optional]
18+
**source_translations_updated_at** | **datetime** | | [optional]
1819
**source_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
1920
**locales** | [**List[LocalePreview]**](LocalePreview.md) | | [optional]
2021
**keys** | [**List[KeyPreview]**](KeyPreview.md) | | [optional]

docs/LocalesApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void (empty response body)
221221
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
222222

223223
# **locale_download**
224-
> bytearray locale_download(project_id, id, x_phrase_app_otp=x_phrase_app_otp, if_modified_since=if_modified_since, if_none_match=if_none_match, branch=branch, file_format=file_format, tags=tags, tag=tag, include_empty_translations=include_empty_translations, exclude_empty_zero_forms=exclude_empty_zero_forms, include_translated_keys=include_translated_keys, keep_notranslate_tags=keep_notranslate_tags, convert_emoji=convert_emoji, format_options=format_options, encoding=encoding, skip_unverified_translations=skip_unverified_translations, include_unverified_translations=include_unverified_translations, use_last_reviewed_version=use_last_reviewed_version, fallback_locale_id=fallback_locale_id, source_locale_id=source_locale_id, translation_key_prefix=translation_key_prefix, filter_by_prefix=filter_by_prefix, custom_metadata_filters=custom_metadata_filters)
224+
> bytearray locale_download(project_id, id, x_phrase_app_otp=x_phrase_app_otp, if_modified_since=if_modified_since, if_none_match=if_none_match, branch=branch, file_format=file_format, tags=tags, tag=tag, include_empty_translations=include_empty_translations, exclude_empty_zero_forms=exclude_empty_zero_forms, include_translated_keys=include_translated_keys, keep_notranslate_tags=keep_notranslate_tags, convert_emoji=convert_emoji, format_options=format_options, encoding=encoding, skip_unverified_translations=skip_unverified_translations, include_unverified_translations=include_unverified_translations, use_last_reviewed_version=use_last_reviewed_version, fallback_locale_id=fallback_locale_id, source_locale_id=source_locale_id, translation_key_prefix=translation_key_prefix, filter_by_prefix=filter_by_prefix, custom_metadata_filters=custom_metadata_filters, locale_ids=locale_ids)
225225
226226
Download a locale
227227

@@ -268,10 +268,11 @@ with phrase_api.ApiClient(configuration) as api_client:
268268
translation_key_prefix = 'prefix_' # str | Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
269269
filter_by_prefix = True # bool | Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
270270
custom_metadata_filters = None # object | Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
271+
locale_ids = ['[\"de\",\"en\"]'] # List[str] | Locale IDs or locale names
271272

272273
try:
273274
# Download a locale
274-
api_response = api_instance.locale_download(project_id, id, x_phrase_app_otp=x_phrase_app_otp, if_modified_since=if_modified_since, if_none_match=if_none_match, branch=branch, file_format=file_format, tags=tags, tag=tag, include_empty_translations=include_empty_translations, exclude_empty_zero_forms=exclude_empty_zero_forms, include_translated_keys=include_translated_keys, keep_notranslate_tags=keep_notranslate_tags, convert_emoji=convert_emoji, format_options=format_options, encoding=encoding, skip_unverified_translations=skip_unverified_translations, include_unverified_translations=include_unverified_translations, use_last_reviewed_version=use_last_reviewed_version, fallback_locale_id=fallback_locale_id, source_locale_id=source_locale_id, translation_key_prefix=translation_key_prefix, filter_by_prefix=filter_by_prefix, custom_metadata_filters=custom_metadata_filters)
275+
api_response = api_instance.locale_download(project_id, id, x_phrase_app_otp=x_phrase_app_otp, if_modified_since=if_modified_since, if_none_match=if_none_match, branch=branch, file_format=file_format, tags=tags, tag=tag, include_empty_translations=include_empty_translations, exclude_empty_zero_forms=exclude_empty_zero_forms, include_translated_keys=include_translated_keys, keep_notranslate_tags=keep_notranslate_tags, convert_emoji=convert_emoji, format_options=format_options, encoding=encoding, skip_unverified_translations=skip_unverified_translations, include_unverified_translations=include_unverified_translations, use_last_reviewed_version=use_last_reviewed_version, fallback_locale_id=fallback_locale_id, source_locale_id=source_locale_id, translation_key_prefix=translation_key_prefix, filter_by_prefix=filter_by_prefix, custom_metadata_filters=custom_metadata_filters, locale_ids=locale_ids)
275276
pprint(api_response)
276277
except ApiException as e:
277278
print("Exception when calling LocalesApi->locale_download: %s\n" % e)
@@ -306,6 +307,7 @@ Name | Type | Description | Notes
306307
**translation_key_prefix** | **str**| Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed. | [optional]
307308
**filter_by_prefix** | **bool**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. | [optional]
308309
**custom_metadata_filters** | [**object**](.md)| Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download. | [optional]
310+
**locale_ids** | [**List[str]**](str.md)| Locale IDs or locale names | [optional]
309311

310312
### Return type
311313

phrase_api/api/locales_api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ def locale_download(self, project_id, id, **kwargs): # noqa: E501
459459
:param str translation_key_prefix: Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
460460
:param bool filter_by_prefix: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
461461
:param object custom_metadata_filters: Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
462+
:param List[str] locale_ids: Locale IDs or locale names
462463
:param _preload_content: if False, the urllib3.HTTPResponse object will
463464
be returned without reading/decoding response
464465
data. Default is True.
@@ -507,6 +508,7 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
507508
:param str translation_key_prefix: Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
508509
:param bool filter_by_prefix: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
509510
:param object custom_metadata_filters: Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
511+
:param List[str] locale_ids: Locale IDs or locale names
510512
:param _return_http_data_only: response data without head status code
511513
and headers
512514
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -547,7 +549,8 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
547549
'source_locale_id',
548550
'translation_key_prefix',
549551
'filter_by_prefix',
550-
'custom_metadata_filters'
552+
'custom_metadata_filters',
553+
'locale_ids'
551554
]
552555
all_params.extend(
553556
[
@@ -622,6 +625,9 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
622625
query_params.append(('filter_by_prefix', local_var_params['filter_by_prefix'])) # noqa: E501
623626
if 'custom_metadata_filters' in local_var_params and local_var_params['custom_metadata_filters'] is not None: # noqa: E501
624627
query_params.append(('custom_metadata_filters', local_var_params['custom_metadata_filters'])) # noqa: E501
628+
if 'locale_ids' in local_var_params and local_var_params['locale_ids'] is not None: # noqa: E501
629+
query_params.append(('locale_ids', local_var_params['locale_ids'])) # noqa: E501
630+
collection_formats['locale_ids'] = 'multi' # noqa: E501
625631

626632
header_params = {}
627633
if 'x_phrase_app_otp' in local_var_params:

phrase_api/models/job_details.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class JobDetails(object):
4444
'updated_at': 'datetime',
4545
'owner': 'UserPreview',
4646
'job_tag_name': 'str',
47+
'source_translations_updated_at': 'datetime',
4748
'source_locale': 'LocalePreview',
4849
'locales': 'List[LocalePreview]',
4950
'keys': 'List[KeyPreview]'
@@ -62,12 +63,13 @@ class JobDetails(object):
6263
'updated_at': 'updated_at',
6364
'owner': 'owner',
6465
'job_tag_name': 'job_tag_name',
66+
'source_translations_updated_at': 'source_translations_updated_at',
6567
'source_locale': 'source_locale',
6668
'locales': 'locales',
6769
'keys': 'keys'
6870
}
6971

70-
def __init__(self, id=None, name=None, briefing=None, due_date=None, state=None, ticket_url=None, project=None, branch=None, created_at=None, updated_at=None, owner=None, job_tag_name=None, source_locale=None, locales=None, keys=None, local_vars_configuration=None): # noqa: E501
72+
def __init__(self, id=None, name=None, briefing=None, due_date=None, state=None, ticket_url=None, project=None, branch=None, created_at=None, updated_at=None, owner=None, job_tag_name=None, source_translations_updated_at=None, source_locale=None, locales=None, keys=None, local_vars_configuration=None): # noqa: E501
7173
"""JobDetails - a model defined in OpenAPI""" # noqa: E501
7274
if local_vars_configuration is None:
7375
local_vars_configuration = Configuration()
@@ -85,6 +87,7 @@ def __init__(self, id=None, name=None, briefing=None, due_date=None, state=None,
8587
self._updated_at = None
8688
self._owner = None
8789
self._job_tag_name = None
90+
self._source_translations_updated_at = None
8891
self._source_locale = None
8992
self._locales = None
9093
self._keys = None
@@ -113,6 +116,8 @@ def __init__(self, id=None, name=None, briefing=None, due_date=None, state=None,
113116
self.owner = owner
114117
if job_tag_name is not None:
115118
self.job_tag_name = job_tag_name
119+
if source_translations_updated_at is not None:
120+
self.source_translations_updated_at = source_translations_updated_at
116121
if source_locale is not None:
117122
self.source_locale = source_locale
118123
if locales is not None:
@@ -372,6 +377,27 @@ def job_tag_name(self, job_tag_name):
372377

373378
self._job_tag_name = job_tag_name
374379

380+
@property
381+
def source_translations_updated_at(self):
382+
"""Gets the source_translations_updated_at of this JobDetails. # noqa: E501
383+
384+
385+
:return: The source_translations_updated_at of this JobDetails. # noqa: E501
386+
:rtype: datetime
387+
"""
388+
return self._source_translations_updated_at
389+
390+
@source_translations_updated_at.setter
391+
def source_translations_updated_at(self, source_translations_updated_at):
392+
"""Sets the source_translations_updated_at of this JobDetails.
393+
394+
395+
:param source_translations_updated_at: The source_translations_updated_at of this JobDetails. # noqa: E501
396+
:type: datetime
397+
"""
398+
399+
self._source_translations_updated_at = source_translations_updated_at
400+
375401
@property
376402
def source_locale(self):
377403
"""Gets the source_locale of this JobDetails. # noqa: E501

test/test_job_details.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def make_instance(self, include_optional):
5353
name = '',
5454
gravatar_uid = '', ),
5555
job_tag_name = '',
56+
source_translations_updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
5657
source_locale = {"id":"abcd1234cdef1234abcd1234cdef1234","name":"English","code":"en-GB"},
5758
locales = [
5859
{"id":"abcd1234cdef1234abcd1234cdef1234","name":"English","code":"en-GB"}

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@1148eca4',
48+
screenshot = '[B@390d47db',
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@4d37c839',
48+
screenshot = '[B@6aa09c35',
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@3fd3d49c',
44+
project_image = '[B@5f385ee9',
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@2cce1da1',
46+
project_image = '[B@39ad5a7d',
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@309ea91f'
43+
filename = '[B@24df8abf'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)