Skip to content

Commit d8fccc1

Browse files
author
Phrase
committed
1 parent e83351b commit d8fccc1

File tree

5 files changed

+40
-12
lines changed

5 files changed

+40
-12
lines changed

api/openapi.yaml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,17 +4465,29 @@ paths:
44654465
schema:
44664466
type: boolean
44674467
style: form
4468-
- description: If a key has no translation in the locale being downloaded the
4469-
translation in the fallback locale will be used. Provide the ID of the locale
4470-
that should be used as the fallback. Requires include_empty_translations
4471-
to be set to `true`.
4468+
- description: |
4469+
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
4470+
Provide the ID of the locale that should be used as the fallback.
4471+
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
44724472
explode: true
44734473
in: query
44744474
name: fallback_locale_id
44754475
required: false
44764476
schema:
44774477
type: string
44784478
style: form
4479+
- description: |
4480+
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
4481+
Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id).
4482+
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
4483+
example: true
4484+
explode: true
4485+
in: query
4486+
name: use_locale_fallback
4487+
required: false
4488+
schema:
4489+
type: boolean
4490+
style: form
44794491
- description: Provides the source language of a corresponding job as the source
44804492
language of the generated locale file. This parameter will be ignored unless
44814493
used in combination with a `tag` parameter indicating a specific job.
@@ -32320,12 +32332,19 @@ components:
3232032332
type: string
3232132333
type: array
3232232334
fallback_locale_id:
32323-
description: If a key has no translation in the locale being downloaded
32324-
the translation in the fallback locale will be used. Provide the ID of
32325-
the locale that should be used as the fallback. Requires include_empty_translations
32326-
to be set to `true`.
32335+
description: |
32336+
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
32337+
Provide the ID of the locale that should be used as the fallback.
32338+
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
3232732339
example: abcd1234abcd1234abcd1234abcd1234
3232832340
type: string
32341+
use_locale_fallback:
32342+
description: |
32343+
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
32344+
Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id).
32345+
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
32346+
example: false
32347+
type: boolean
3232932348
source_locale_id:
3233032349
description: Provides the source language of a corresponding job as the
3233132350
source language of the generated locale file. This parameter will be ignored

api_locales.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ type LocaleDownloadOpts struct {
353353
IncludeUnverifiedTranslations optional.Bool `json:"include_unverified_translations,omitempty"`
354354
UseLastReviewedVersion optional.Bool `json:"use_last_reviewed_version,omitempty"`
355355
FallbackLocaleId optional.String `json:"fallback_locale_id,omitempty"`
356+
UseLocaleFallback optional.Bool `json:"use_locale_fallback,omitempty"`
356357
SourceLocaleId optional.String `json:"source_locale_id,omitempty"`
357358
TranslationKeyPrefix optional.String `json:"translation_key_prefix,omitempty"`
358359
FilterByPrefix optional.Bool `json:"filter_by_prefix,omitempty"`
@@ -385,7 +386,8 @@ Download a locale in a specific file format.
385386
- @param "SkipUnverifiedTranslations" (optional.Bool) - Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
386387
- @param "IncludeUnverifiedTranslations" (optional.Bool) - if set to false unverified translations are excluded
387388
- @param "UseLastReviewedVersion" (optional.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.
388-
- @param "FallbackLocaleId" (optional.String) - 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`.
389+
- @param "FallbackLocaleId" (optional.String) - 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`.
390+
- @param "UseLocaleFallback" (optional.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`.
389391
- @param "SourceLocaleId" (optional.String) - 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.
390392
- @param "TranslationKeyPrefix" (optional.String) - 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.
391393
- @param "FilterByPrefix" (optional.Bool) - Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -462,6 +464,9 @@ func (a *LocalesApiService) LocaleDownload(ctx _context.Context, projectId strin
462464
if localVarOptionals != nil && localVarOptionals.FallbackLocaleId.IsSet() {
463465
localVarQueryParams.Add("fallback_locale_id", parameterToString(localVarOptionals.FallbackLocaleId.Value(), ""))
464466
}
467+
if localVarOptionals != nil && localVarOptionals.UseLocaleFallback.IsSet() {
468+
localVarQueryParams.Add("use_locale_fallback", parameterToString(localVarOptionals.UseLocaleFallback.Value(), ""))
469+
}
465470
if localVarOptionals != nil && localVarOptionals.SourceLocaleId.IsSet() {
466471
localVarQueryParams.Add("source_locale_id", parameterToString(localVarOptionals.SourceLocaleId.Value(), ""))
467472
}

docs/LocaleDownloadCreateParameters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Name | Type | Description | Notes
1616
**IncludeUnverifiedTranslations** | **bool** | if set to false unverified translations are excluded | [optional]
1717
**UseLastReviewedVersion** | **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]
1818
**LocaleIds** | **[]string** | Locale IDs or locale names | [optional]
19-
**FallbackLocaleId** | **string** | 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]
19+
**FallbackLocaleId** | **string** | 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]
20+
**UseLocaleFallback** | **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]
2021
**SourceLocaleId** | **string** | 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]
2122
**CustomMetadataFilters** | **map[string]interface{}** | 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]
2223
**UpdatedSince** | **string** | 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ Name | Type | Description | Notes
193193
**skipUnverifiedTranslations** | **optional.Bool**| Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`. |
194194
**includeUnverifiedTranslations** | **optional.Bool**| if set to false unverified translations are excluded |
195195
**useLastReviewedVersion** | **optional.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. |
196-
**fallbackLocaleId** | **optional.String**| 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`. |
196+
**fallbackLocaleId** | **optional.String**| 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`. |
197+
**useLocaleFallback** | **optional.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`. |
197198
**sourceLocaleId** | **optional.String**| 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. |
198199
**translationKeyPrefix** | **optional.String**| 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. |
199200
**filterByPrefix** | **optional.Bool**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. |

model_locale_download_create_parameters.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ type LocaleDownloadCreateParameters struct {
2626
UseLastReviewedVersion *bool `json:"use_last_reviewed_version,omitempty"`
2727
// Locale IDs or locale names
2828
LocaleIds []string `json:"locale_ids,omitempty"`
29-
// 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`.
29+
// 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`.
3030
FallbackLocaleId string `json:"fallback_locale_id,omitempty"`
31+
// 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`.
32+
UseLocaleFallback *bool `json:"use_locale_fallback,omitempty"`
3133
// 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.
3234
SourceLocaleId string `json:"source_locale_id,omitempty"`
3335
// 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.

0 commit comments

Comments
 (0)