Skip to content

Commit e99209f

Browse files
author
Phrase
committed
1 parent ff81515 commit e99209f

10 files changed

+52
-15
lines changed

docs/LocaleDownloadCreateParameters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Name | Type | Description | Notes
1515
**include_unverified_translations** | **bool** | if set to false unverified translations are excluded | [optional]
1616
**use_last_reviewed_version** | **bool** | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional]
1717
**locale_ids** | **List[str]** | Locale IDs or locale names | [optional]
18-
**fallback_locale_id** | **str** | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`. | [optional]
18+
**fallback_locale_id** | **str** | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`. | [optional]
19+
**use_locale_fallback** | **bool** | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`. | [optional]
1920
**source_locale_id** | **str** | Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job. | [optional]
2021
**custom_metadata_filters** | **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. | [optional]
2122
**updated_since** | **str** | Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`). | [optional]

docs/LocalesApi.md

Lines changed: 6 additions & 4 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, locale_ids=locale_ids, updated_since=updated_since)
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, use_locale_fallback=use_locale_fallback, 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, updated_since=updated_since)
225225
226226
Download a locale
227227

@@ -263,7 +263,8 @@ with phrase_api.ApiClient(configuration) as api_client:
263263
skip_unverified_translations = True # bool | Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
264264
include_unverified_translations = True # bool | if set to false unverified translations are excluded
265265
use_last_reviewed_version = True # bool | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
266-
fallback_locale_id = 'fallback_locale_id_example' # str | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
266+
fallback_locale_id = 'fallback_locale_id_example' # str | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
267+
use_locale_fallback = true # bool | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
267268
source_locale_id = 'source_locale_id_example' # str | Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
268269
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.
269270
filter_by_prefix = True # bool | Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -273,7 +274,7 @@ with phrase_api.ApiClient(configuration) as api_client:
273274

274275
try:
275276
# Download a locale
276-
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, updated_since=updated_since)
277+
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, use_locale_fallback=use_locale_fallback, 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, updated_since=updated_since)
277278
pprint(api_response)
278279
except ApiException as e:
279280
print("Exception when calling LocalesApi->locale_download: %s\n" % e)
@@ -303,7 +304,8 @@ Name | Type | Description | Notes
303304
**skip_unverified_translations** | **bool**| Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`. | [optional]
304305
**include_unverified_translations** | **bool**| if set to false unverified translations are excluded | [optional]
305306
**use_last_reviewed_version** | **bool**| If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional]
306-
**fallback_locale_id** | **str**| If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`. | [optional]
307+
**fallback_locale_id** | **str**| If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`. | [optional]
308+
**use_locale_fallback** | **bool**| If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`. | [optional]
307309
**source_locale_id** | **str**| Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job. | [optional]
308310
**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]
309311
**filter_by_prefix** | **bool**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. | [optional]

phrase_api/api/locales_api.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ def locale_download(self, project_id, id, **kwargs): # noqa: E501
454454
:param bool skip_unverified_translations: Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
455455
:param bool include_unverified_translations: if set to false unverified translations are excluded
456456
:param bool use_last_reviewed_version: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
457-
:param str fallback_locale_id: If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
457+
:param str fallback_locale_id: If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
458+
:param bool use_locale_fallback: If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
458459
:param str source_locale_id: Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
459460
: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.
460461
:param bool filter_by_prefix: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -504,7 +505,8 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
504505
:param bool skip_unverified_translations: Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
505506
:param bool include_unverified_translations: if set to false unverified translations are excluded
506507
:param bool use_last_reviewed_version: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
507-
:param str fallback_locale_id: If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
508+
:param str fallback_locale_id: If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
509+
:param bool use_locale_fallback: If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
508510
:param str source_locale_id: Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
509511
: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.
510512
:param bool filter_by_prefix: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -548,6 +550,7 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
548550
'include_unverified_translations',
549551
'use_last_reviewed_version',
550552
'fallback_locale_id',
553+
'use_locale_fallback',
551554
'source_locale_id',
552555
'translation_key_prefix',
553556
'filter_by_prefix',
@@ -620,6 +623,8 @@ def locale_download_with_http_info(self, project_id, id, **kwargs): # noqa: E50
620623
query_params.append(('use_last_reviewed_version', local_var_params['use_last_reviewed_version'])) # noqa: E501
621624
if 'fallback_locale_id' in local_var_params and local_var_params['fallback_locale_id'] is not None: # noqa: E501
622625
query_params.append(('fallback_locale_id', local_var_params['fallback_locale_id'])) # noqa: E501
626+
if 'use_locale_fallback' in local_var_params and local_var_params['use_locale_fallback'] is not None: # noqa: E501
627+
query_params.append(('use_locale_fallback', local_var_params['use_locale_fallback'])) # noqa: E501
623628
if 'source_locale_id' in local_var_params and local_var_params['source_locale_id'] is not None: # noqa: E501
624629
query_params.append(('source_locale_id', local_var_params['source_locale_id'])) # noqa: E501
625630
if 'translation_key_prefix' in local_var_params and local_var_params['translation_key_prefix'] is not None: # noqa: E501

0 commit comments

Comments
 (0)