phrase 2.1.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/docs/Distribution.md +2 -0
- data/docs/DistributionCreateParameters.md +2 -0
- data/docs/DistributionUpdateParameters.md +2 -0
- data/docs/InvitationCreateParameters.md +2 -0
- data/docs/InvitationUpdateParameters.md +2 -0
- data/docs/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +2 -0
- data/docs/JobDetails1.md +2 -0
- data/docs/LocalesApi.md +7 -3
- data/docs/ReleaseCreateParameters.md +2 -0
- data/docs/TranslationsVerifyParameters.md +3 -5
- data/lib/phrase/api/locales_api.rb +13 -4
- data/lib/phrase/models/distribution.rb +12 -1
- data/lib/phrase/models/distribution_create_parameters.rb +13 -1
- data/lib/phrase/models/distribution_update_parameters.rb +13 -1
- data/lib/phrase/models/invitation_create_parameters.rb +13 -1
- data/lib/phrase/models/invitation_update_parameters.rb +13 -1
- data/lib/phrase/models/job_create_parameters.rb +11 -1
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_details1.rb +10 -1
- data/lib/phrase/models/release_create_parameters.rb +13 -1
- data/lib/phrase/models/translations_verify_parameters.rb +14 -24
- data/lib/phrase/version.rb +1 -1
- data/spec/api/locales_api_spec.rb +2 -0
- data/spec/models/distribution_create_parameters_spec.rb +6 -0
- data/spec/models/distribution_spec.rb +6 -0
- data/spec/models/distribution_update_parameters_spec.rb +6 -0
- data/spec/models/invitation_create_parameters_spec.rb +6 -0
- data/spec/models/invitation_update_parameters_spec.rb +6 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/job_details1_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/release_create_parameters_spec.rb +6 -0
- data/spec/models/translations_verify_parameters_spec.rb +2 -8
- metadata +196 -196
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21fd62b66f6f2e44f29e39e4148a2ab2166b1e974fe8e26417e9bf8f86e9fd77
|
4
|
+
data.tar.gz: fd0cdbb0fcc42c3c0ecf2367f81dccfd800cd6c396ef5893bf1cd206ad8e7977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34f0a906028792b89365a2bc58b529305239d5caa64a2453c23f8cd77cf42f9152233c622e11e5ee32a415d710477e46e32db590aafaffcd562dbbf8bc982a5
|
7
|
+
data.tar.gz: 237117d2979303d9554f5503e1cfa1b0ef623e19d534746674f25bce58d91a8018833eba4b78d9ec4081dd0b03738d31f2d484e1207f6d75cfdafa62008c6c6e
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 2.
|
10
|
+
- Package version: 2.4.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
|
13
13
|
|
@@ -56,10 +56,10 @@ gem build phrase.gemspec
|
|
56
56
|
Then install the gem locally:
|
57
57
|
|
58
58
|
```shell
|
59
|
-
gem install ./phrase-2.
|
59
|
+
gem install ./phrase-2.4.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.4.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -98,6 +98,10 @@ end
|
|
98
98
|
|
99
99
|
```
|
100
100
|
|
101
|
+
## Get help / support
|
102
|
+
|
103
|
+
Please contact [support@phrase.com](mailto:support@phrase.com?subject=[GitHub]%20phrase-go) and we can take more direct action toward finding a solution.
|
104
|
+
|
101
105
|
## Documentation for API Endpoints
|
102
106
|
|
103
107
|
All URIs are relative to *https://api.phrase.com/v2*
|
data/docs/Distribution.md
CHANGED
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**name** | **String** | | [optional]
|
9
9
|
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
10
10
|
**platforms** | **Array<String>** | | [optional]
|
11
|
+
**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
|
11
12
|
**releases** | [**Array<ReleasePreview>**](ReleasePreview.md) | | [optional]
|
12
13
|
**created_at** | **DateTime** | | [optional]
|
13
14
|
**deleted_at** | **DateTime** | | [optional]
|
@@ -21,6 +22,7 @@ instance = Phrase::Distribution.new(id: null,
|
|
21
22
|
name: null,
|
22
23
|
project: null,
|
23
24
|
platforms: null,
|
25
|
+
locales: null,
|
24
26
|
releases: null,
|
25
27
|
created_at: null,
|
26
28
|
deleted_at: null)
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**name** | **String** | Name of the distribution | [optional]
|
8
8
|
**project_id** | **String** | Project id the distribution should be assigned to. | [optional]
|
9
9
|
**platforms** | **Array<String>** | List of platforms the distribution should support. | [optional]
|
10
|
+
**locale_ids** | **Array<String>** | List of locale ids that will be part of distribution releases | [optional]
|
10
11
|
**format_options** | **Hash<String, String>** | Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>. | [optional]
|
11
12
|
**fallback_to_non_regional_locale** | **Boolean** | Indicates whether to fallback to non regional locale when locale can not be found | [optional]
|
12
13
|
**fallback_to_default_locale** | **Boolean** | Indicates whether to fallback to projects default locale when locale can not be found | [optional]
|
@@ -20,6 +21,7 @@ require 'Phrase'
|
|
20
21
|
instance = Phrase::DistributionCreateParameters.new(name: My Android Distribution,
|
21
22
|
project_id: abcd1234abcd1234abcd1234,
|
22
23
|
platforms: ["android","ios"],
|
24
|
+
locale_ids: ["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],
|
23
25
|
format_options: {xml:{enclose_in_cdata:'1'}},
|
24
26
|
fallback_to_non_regional_locale: true,
|
25
27
|
fallback_to_default_locale: true,
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**name** | **String** | Name of the distribution | [optional]
|
8
8
|
**project_id** | **String** | Project id the distribution should be assigned to. | [optional]
|
9
9
|
**platforms** | **Array<String>** | List of platforms the distribution should support. | [optional]
|
10
|
+
**locale_ids** | **Array<String>** | List of locale ids that will be part of distribution releases | [optional]
|
10
11
|
**format_options** | **Hash<String, String>** | Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>. | [optional]
|
11
12
|
**fallback_to_non_regional_locale** | **Boolean** | Indicates whether to fallback to non regional locale when locale can not be found | [optional]
|
12
13
|
**fallback_to_default_locale** | **Boolean** | Indicates whether to fallback to projects default locale when locale can not be found | [optional]
|
@@ -20,6 +21,7 @@ require 'Phrase'
|
|
20
21
|
instance = Phrase::DistributionUpdateParameters.new(name: My Android Distribution,
|
21
22
|
project_id: abcd1234abcd1234abcd1234,
|
22
23
|
platforms: ["android","ios"],
|
24
|
+
locale_ids: ["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],
|
23
25
|
format_options: {xml:{enclose_in_cdata:'1'}},
|
24
26
|
fallback_to_non_regional_locale: true,
|
25
27
|
fallback_to_default_locale: true,
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**project_ids** | **String** | List of project ids the invited user has access to. | [optional]
|
10
10
|
**locale_ids** | **String** | List of locale ids the invited user has access to. | [optional]
|
11
11
|
**space_ids** | **Array<String>** | List of spaces the user is assigned to. | [optional]
|
12
|
+
**team_ids** | **Array<String>** | List of teams the user is assigned to. | [optional]
|
12
13
|
**default_locale_codes** | **Array<String>** | List of default locales for the user. | [optional]
|
13
14
|
**permissions** | **Hash<String, String>** | Additional permissions depending on invitation role. Available permissions are <code>create_upload</code> and <code>review_translations</code> | [optional]
|
14
15
|
|
@@ -22,6 +23,7 @@ instance = Phrase::InvitationCreateParameters.new(email: example@mail.com,
|
|
22
23
|
project_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
|
23
24
|
locale_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
|
24
25
|
space_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],
|
26
|
+
team_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],
|
25
27
|
default_locale_codes: ["en","de"],
|
26
28
|
permissions: {"create_upload":true,"review_translations":true})
|
27
29
|
```
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**project_ids** | **String** | List of project ids the invited user has access to | [optional]
|
9
9
|
**locale_ids** | **String** | List of locale ids the invited user has access to | [optional]
|
10
10
|
**space_ids** | **Array<String>** | List of spaces the user is assigned to. | [optional]
|
11
|
+
**team_ids** | **Array<String>** | List of teams the user is assigned to. | [optional]
|
11
12
|
**default_locale_codes** | **Array<String>** | List of default locales for the user. | [optional]
|
12
13
|
**permissions** | **Hash<String, String>** | Additional permissions depending on invitation role. | [optional]
|
13
14
|
|
@@ -20,6 +21,7 @@ instance = Phrase::InvitationUpdateParameters.new(role: Invitiation role,
|
|
20
21
|
project_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
|
21
22
|
locale_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
|
22
23
|
space_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],
|
24
|
+
team_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],
|
23
25
|
default_locale_codes: ["en","de"],
|
24
26
|
permissions: {"create_upload":true})
|
25
27
|
```
|
data/docs/JobCreateParameters.md
CHANGED
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**branch** | **String** | specify the branch to use | [optional]
|
8
8
|
**name** | **String** | Job name | [optional]
|
9
|
+
**source_locale_id** | **String** | The API id of the source language | [optional]
|
9
10
|
**briefing** | **String** | Briefing for the translators | [optional]
|
10
11
|
**due_date** | **DateTime** | Date the job should be finished | [optional]
|
11
12
|
**ticket_url** | **String** | URL to a ticket for this job (e.g. Jira, Trello) | [optional]
|
@@ -19,6 +20,7 @@ require 'Phrase'
|
|
19
20
|
|
20
21
|
instance = Phrase::JobCreateParameters.new(branch: my-feature-branch,
|
21
22
|
name: de,
|
23
|
+
source_locale_id: abcd1234cdef1234abcd1234cdef1234,
|
22
24
|
briefing: de-DE,
|
23
25
|
due_date: null,
|
24
26
|
ticket_url: https://example.atlassian.net/browse/FOO,
|
data/docs/JobDetails.md
CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
**updated_at** | **DateTime** | | [optional]
|
17
17
|
**owner** | [**UserPreview**](UserPreview.md) | | [optional]
|
18
18
|
**job_tag_name** | **String** | | [optional]
|
19
|
+
**source_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
|
19
20
|
**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
|
20
21
|
**keys** | [**Array<KeyPreview>**](KeyPreview.md) | | [optional]
|
21
22
|
|
@@ -36,6 +37,7 @@ instance = Phrase::JobDetails.new(id: null,
|
|
36
37
|
updated_at: null,
|
37
38
|
owner: null,
|
38
39
|
job_tag_name: null,
|
40
|
+
source_locale: null,
|
39
41
|
locales: null,
|
40
42
|
keys: null)
|
41
43
|
```
|
data/docs/JobDetails1.md
CHANGED
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**owner** | [**UserPreview**](UserPreview.md) | | [optional]
|
8
8
|
**job_tag_name** | **String** | | [optional]
|
9
|
+
**source_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
|
9
10
|
**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
|
10
11
|
**keys** | [**Array<KeyPreview>**](KeyPreview.md) | | [optional]
|
11
12
|
|
@@ -16,6 +17,7 @@ require 'Phrase'
|
|
16
17
|
|
17
18
|
instance = Phrase::JobDetails1.new(owner: null,
|
18
19
|
job_tag_name: null,
|
20
|
+
source_locale: null,
|
19
21
|
locales: null,
|
20
22
|
keys: null)
|
21
23
|
```
|
data/docs/LocalesApi.md
CHANGED
@@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|
16
16
|
|
17
17
|
## account_locales
|
18
18
|
|
19
|
-
> Array<LocalePreview1> account_locales(opts)
|
19
|
+
> Array<LocalePreview1> account_locales(id, opts)
|
20
20
|
|
21
21
|
List locales used in account
|
22
22
|
|
@@ -39,6 +39,7 @@ Phrase.configure do |config|
|
|
39
39
|
end
|
40
40
|
|
41
41
|
api_instance = Phrase::LocalesApi.new
|
42
|
+
id = 'id_example' # String | ID
|
42
43
|
opts = {
|
43
44
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
44
45
|
page: 1, # Integer | Page number
|
@@ -47,7 +48,7 @@ opts = {
|
|
47
48
|
|
48
49
|
begin
|
49
50
|
#List locales used in account
|
50
|
-
result = api_instance.account_locales(opts)
|
51
|
+
result = api_instance.account_locales(id, opts)
|
51
52
|
pp result
|
52
53
|
rescue Phrase::ApiError => e
|
53
54
|
puts "Exception when calling LocalesApi->account_locales: #{e}"
|
@@ -59,6 +60,7 @@ end
|
|
59
60
|
|
60
61
|
Name | Type | Description | Notes
|
61
62
|
------------- | ------------- | ------------- | -------------
|
63
|
+
**id** | **String**| ID |
|
62
64
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
63
65
|
**page** | **Integer**| Page number | [optional]
|
64
66
|
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
@@ -247,7 +249,8 @@ opts = {
|
|
247
249
|
skip_unverified_translations: true, # Boolean | Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with <code>include_unverified_translations</code>.
|
248
250
|
include_unverified_translations: true, # Boolean | if set to false unverified translations are excluded
|
249
251
|
use_last_reviewed_version: true, # Boolean | If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
|
250
|
-
fallback_locale_id: 'fallback_locale_id_example' # String | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
|
252
|
+
fallback_locale_id: 'fallback_locale_id_example', # String | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
|
253
|
+
source_locale_id: 'source_locale_id_example' # 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 <code>tag</code> parameter indicating a specific job.
|
251
254
|
}
|
252
255
|
|
253
256
|
begin
|
@@ -282,6 +285,7 @@ Name | Type | Description | Notes
|
|
282
285
|
**include_unverified_translations** | **Boolean**| if set to false unverified translations are excluded | [optional]
|
283
286
|
**use_last_reviewed_version** | **Boolean**| If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project. | [optional]
|
284
287
|
**fallback_locale_id** | **String**| If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>. | [optional]
|
288
|
+
**source_locale_id** | **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 <code>tag</code> parameter indicating a specific job. | [optional]
|
285
289
|
|
286
290
|
### Return type
|
287
291
|
|
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**description** | **String** | Description of the release | [optional]
|
8
8
|
**platforms** | **Array<String>** | List of platforms the release should support. | [optional]
|
9
|
+
**locale_ids** | **Array<String>** | List of locale ids that will be included in the release. If empty, distribution locales will be used | [optional]
|
9
10
|
**branch** | **String** | Branch used for release | [optional]
|
10
11
|
|
11
12
|
## Code Sample
|
@@ -15,6 +16,7 @@ require 'Phrase'
|
|
15
16
|
|
16
17
|
instance = Phrase::ReleaseCreateParameters.new(description: My first Release,
|
17
18
|
platforms: ["android","ios"],
|
19
|
+
locale_ids: ["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],
|
18
20
|
branch: my-feature-branch)
|
19
21
|
```
|
20
22
|
|
@@ -5,9 +5,8 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**branch** | **String** | specify the branch to use | [optional]
|
8
|
+
**locale_id** | **String** | specify the locale of the translations to be verified | [optional]
|
8
9
|
**q** | **String** | Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. | [optional]
|
9
|
-
**sort** | **String** | Sort criteria. Can be one of: key_name, created_at, updated_at. | [optional]
|
10
|
-
**order** | **String** | Order direction. Can be one of: asc, desc. | [optional]
|
11
10
|
|
12
11
|
## Code Sample
|
13
12
|
|
@@ -15,9 +14,8 @@ Name | Type | Description | Notes
|
|
15
14
|
require 'Phrase'
|
16
15
|
|
17
16
|
instance = Phrase::TranslationsVerifyParameters.new(branch: my-feature-branch,
|
18
|
-
|
19
|
-
|
20
|
-
order: desc)
|
17
|
+
locale_id: fc2f11dd6a658fa9652f6f0a9ebee688,
|
18
|
+
q: PhraseApp*%20unverified:true%20tags:feature,center)
|
21
19
|
```
|
22
20
|
|
23
21
|
|
@@ -9,29 +9,35 @@ module Phrase
|
|
9
9
|
end
|
10
10
|
# List locales used in account
|
11
11
|
# List all locales unique by locale code used across all projects within an account.
|
12
|
+
# @param id [String] ID
|
12
13
|
# @param [Hash] opts the optional parameters
|
13
14
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
14
15
|
# @option opts [Integer] :page Page number
|
15
16
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
16
17
|
# @return [Array<LocalePreview1>]
|
17
|
-
def account_locales(opts = {})
|
18
|
-
data, _status_code, _headers = account_locales_with_http_info(opts)
|
18
|
+
def account_locales(id, opts = {})
|
19
|
+
data, _status_code, _headers = account_locales_with_http_info(id, opts)
|
19
20
|
data
|
20
21
|
end
|
21
22
|
|
22
23
|
# List locales used in account
|
23
24
|
# List all locales unique by locale code used across all projects within an account.
|
25
|
+
# @param id [String] ID
|
24
26
|
# @param [Hash] opts the optional parameters
|
25
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
26
28
|
# @option opts [Integer] :page Page number
|
27
29
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
28
30
|
# @return [Array<(Response<(Array<LocalePreview1>)>, Integer, Hash)>] Response<(Array<LocalePreview1>)> data, response status code and response headers
|
29
|
-
def account_locales_with_http_info(opts = {})
|
31
|
+
def account_locales_with_http_info(id, opts = {})
|
30
32
|
if @api_client.config.debugging
|
31
33
|
@api_client.config.logger.debug 'Calling API: LocalesApi.account_locales ...'
|
32
34
|
end
|
35
|
+
# verify the required parameter 'id' is set
|
36
|
+
if @api_client.config.client_side_validation && id.nil?
|
37
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LocalesApi.account_locales"
|
38
|
+
end
|
33
39
|
# resource path
|
34
|
-
local_var_path = '/accounts/{account_id}/locales'
|
40
|
+
local_var_path = '/accounts/{account_id}/locales'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
35
41
|
|
36
42
|
# query parameters
|
37
43
|
query_params = opts[:query_params] || {}
|
@@ -241,6 +247,7 @@ module Phrase
|
|
241
247
|
# @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
|
242
248
|
# @option opts [Boolean] :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 (currently in beta) is enabled for the project.
|
243
249
|
# @option opts [String] :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 public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
|
250
|
+
# @option opts [String] :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 <code>tag</code> parameter indicating a specific job.
|
244
251
|
# @return [File]
|
245
252
|
def locale_download(project_id, id, opts = {})
|
246
253
|
data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
|
@@ -268,6 +275,7 @@ module Phrase
|
|
268
275
|
# @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
|
269
276
|
# @option opts [Boolean] :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 (currently in beta) is enabled for the project.
|
270
277
|
# @option opts [String] :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 public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
|
278
|
+
# @option opts [String] :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 <code>tag</code> parameter indicating a specific job.
|
271
279
|
# @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
|
272
280
|
def locale_download_with_http_info(project_id, id, opts = {})
|
273
281
|
if @api_client.config.debugging
|
@@ -301,6 +309,7 @@ module Phrase
|
|
301
309
|
query_params[:'include_unverified_translations'] = opts[:'include_unverified_translations'] if !opts[:'include_unverified_translations'].nil?
|
302
310
|
query_params[:'use_last_reviewed_version'] = opts[:'use_last_reviewed_version'] if !opts[:'use_last_reviewed_version'].nil?
|
303
311
|
query_params[:'fallback_locale_id'] = opts[:'fallback_locale_id'] if !opts[:'fallback_locale_id'].nil?
|
312
|
+
query_params[:'source_locale_id'] = opts[:'source_locale_id'] if !opts[:'source_locale_id'].nil?
|
304
313
|
|
305
314
|
# header parameters
|
306
315
|
header_params = opts[:header_params] || {}
|
@@ -10,6 +10,8 @@ module Phrase
|
|
10
10
|
|
11
11
|
attr_accessor :platforms
|
12
12
|
|
13
|
+
attr_accessor :locales
|
14
|
+
|
13
15
|
attr_accessor :releases
|
14
16
|
|
15
17
|
attr_accessor :created_at
|
@@ -23,6 +25,7 @@ module Phrase
|
|
23
25
|
:'name' => :'name',
|
24
26
|
:'project' => :'project',
|
25
27
|
:'platforms' => :'platforms',
|
28
|
+
:'locales' => :'locales',
|
26
29
|
:'releases' => :'releases',
|
27
30
|
:'created_at' => :'created_at',
|
28
31
|
:'deleted_at' => :'deleted_at'
|
@@ -36,6 +39,7 @@ module Phrase
|
|
36
39
|
:'name' => :'String',
|
37
40
|
:'project' => :'ProjectShort',
|
38
41
|
:'platforms' => :'Array<String>',
|
42
|
+
:'locales' => :'Array<LocalePreview>',
|
39
43
|
:'releases' => :'Array<ReleasePreview>',
|
40
44
|
:'created_at' => :'DateTime',
|
41
45
|
:'deleted_at' => :'DateTime'
|
@@ -81,6 +85,12 @@ module Phrase
|
|
81
85
|
end
|
82
86
|
end
|
83
87
|
|
88
|
+
if attributes.key?(:'locales')
|
89
|
+
if (value = attributes[:'locales']).is_a?(Array)
|
90
|
+
self.locales = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
84
94
|
if attributes.key?(:'releases')
|
85
95
|
if (value = attributes[:'releases']).is_a?(Array)
|
86
96
|
self.releases = value
|
@@ -118,6 +128,7 @@ module Phrase
|
|
118
128
|
name == o.name &&
|
119
129
|
project == o.project &&
|
120
130
|
platforms == o.platforms &&
|
131
|
+
locales == o.locales &&
|
121
132
|
releases == o.releases &&
|
122
133
|
created_at == o.created_at &&
|
123
134
|
deleted_at == o.deleted_at
|
@@ -132,7 +143,7 @@ module Phrase
|
|
132
143
|
# Calculates hash code according to all attributes.
|
133
144
|
# @return [Integer] Hash code
|
134
145
|
def hash
|
135
|
-
[id, name, project, platforms, releases, created_at, deleted_at].hash
|
146
|
+
[id, name, project, platforms, locales, releases, created_at, deleted_at].hash
|
136
147
|
end
|
137
148
|
|
138
149
|
# Builds the object from hash
|
@@ -11,6 +11,9 @@ module Phrase
|
|
11
11
|
# List of platforms the distribution should support.
|
12
12
|
attr_accessor :platforms
|
13
13
|
|
14
|
+
# List of locale ids that will be part of distribution releases
|
15
|
+
attr_accessor :locale_ids
|
16
|
+
|
14
17
|
# Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
|
15
18
|
attr_accessor :format_options
|
16
19
|
|
@@ -29,6 +32,7 @@ module Phrase
|
|
29
32
|
:'name' => :'name',
|
30
33
|
:'project_id' => :'project_id',
|
31
34
|
:'platforms' => :'platforms',
|
35
|
+
:'locale_ids' => :'locale_ids',
|
32
36
|
:'format_options' => :'format_options',
|
33
37
|
:'fallback_to_non_regional_locale' => :'fallback_to_non_regional_locale',
|
34
38
|
:'fallback_to_default_locale' => :'fallback_to_default_locale',
|
@@ -42,6 +46,7 @@ module Phrase
|
|
42
46
|
:'name' => :'String',
|
43
47
|
:'project_id' => :'String',
|
44
48
|
:'platforms' => :'Array<String>',
|
49
|
+
:'locale_ids' => :'Array<String>',
|
45
50
|
:'format_options' => :'Hash<String, String>',
|
46
51
|
:'fallback_to_non_regional_locale' => :'Boolean',
|
47
52
|
:'fallback_to_default_locale' => :'Boolean',
|
@@ -84,6 +89,12 @@ module Phrase
|
|
84
89
|
end
|
85
90
|
end
|
86
91
|
|
92
|
+
if attributes.key?(:'locale_ids')
|
93
|
+
if (value = attributes[:'locale_ids']).is_a?(Array)
|
94
|
+
self.locale_ids = value
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
87
98
|
if attributes.key?(:'format_options')
|
88
99
|
if (value = attributes[:'format_options']).is_a?(Hash)
|
89
100
|
self.format_options = value
|
@@ -124,6 +135,7 @@ module Phrase
|
|
124
135
|
name == o.name &&
|
125
136
|
project_id == o.project_id &&
|
126
137
|
platforms == o.platforms &&
|
138
|
+
locale_ids == o.locale_ids &&
|
127
139
|
format_options == o.format_options &&
|
128
140
|
fallback_to_non_regional_locale == o.fallback_to_non_regional_locale &&
|
129
141
|
fallback_to_default_locale == o.fallback_to_default_locale &&
|
@@ -139,7 +151,7 @@ module Phrase
|
|
139
151
|
# Calculates hash code according to all attributes.
|
140
152
|
# @return [Integer] Hash code
|
141
153
|
def hash
|
142
|
-
[name, project_id, platforms, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
|
154
|
+
[name, project_id, platforms, locale_ids, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
|
143
155
|
end
|
144
156
|
|
145
157
|
# Builds the object from hash
|
@@ -11,6 +11,9 @@ module Phrase
|
|
11
11
|
# List of platforms the distribution should support.
|
12
12
|
attr_accessor :platforms
|
13
13
|
|
14
|
+
# List of locale ids that will be part of distribution releases
|
15
|
+
attr_accessor :locale_ids
|
16
|
+
|
14
17
|
# Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
|
15
18
|
attr_accessor :format_options
|
16
19
|
|
@@ -29,6 +32,7 @@ module Phrase
|
|
29
32
|
:'name' => :'name',
|
30
33
|
:'project_id' => :'project_id',
|
31
34
|
:'platforms' => :'platforms',
|
35
|
+
:'locale_ids' => :'locale_ids',
|
32
36
|
:'format_options' => :'format_options',
|
33
37
|
:'fallback_to_non_regional_locale' => :'fallback_to_non_regional_locale',
|
34
38
|
:'fallback_to_default_locale' => :'fallback_to_default_locale',
|
@@ -42,6 +46,7 @@ module Phrase
|
|
42
46
|
:'name' => :'String',
|
43
47
|
:'project_id' => :'String',
|
44
48
|
:'platforms' => :'Array<String>',
|
49
|
+
:'locale_ids' => :'Array<String>',
|
45
50
|
:'format_options' => :'Hash<String, String>',
|
46
51
|
:'fallback_to_non_regional_locale' => :'Boolean',
|
47
52
|
:'fallback_to_default_locale' => :'Boolean',
|
@@ -84,6 +89,12 @@ module Phrase
|
|
84
89
|
end
|
85
90
|
end
|
86
91
|
|
92
|
+
if attributes.key?(:'locale_ids')
|
93
|
+
if (value = attributes[:'locale_ids']).is_a?(Array)
|
94
|
+
self.locale_ids = value
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
87
98
|
if attributes.key?(:'format_options')
|
88
99
|
if (value = attributes[:'format_options']).is_a?(Hash)
|
89
100
|
self.format_options = value
|
@@ -124,6 +135,7 @@ module Phrase
|
|
124
135
|
name == o.name &&
|
125
136
|
project_id == o.project_id &&
|
126
137
|
platforms == o.platforms &&
|
138
|
+
locale_ids == o.locale_ids &&
|
127
139
|
format_options == o.format_options &&
|
128
140
|
fallback_to_non_regional_locale == o.fallback_to_non_regional_locale &&
|
129
141
|
fallback_to_default_locale == o.fallback_to_default_locale &&
|
@@ -139,7 +151,7 @@ module Phrase
|
|
139
151
|
# Calculates hash code according to all attributes.
|
140
152
|
# @return [Integer] Hash code
|
141
153
|
def hash
|
142
|
-
[name, project_id, platforms, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
|
154
|
+
[name, project_id, platforms, locale_ids, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
|
143
155
|
end
|
144
156
|
|
145
157
|
# Builds the object from hash
|
@@ -17,6 +17,9 @@ module Phrase
|
|
17
17
|
# List of spaces the user is assigned to.
|
18
18
|
attr_accessor :space_ids
|
19
19
|
|
20
|
+
# List of teams the user is assigned to.
|
21
|
+
attr_accessor :team_ids
|
22
|
+
|
20
23
|
# List of default locales for the user.
|
21
24
|
attr_accessor :default_locale_codes
|
22
25
|
|
@@ -31,6 +34,7 @@ module Phrase
|
|
31
34
|
:'project_ids' => :'project_ids',
|
32
35
|
:'locale_ids' => :'locale_ids',
|
33
36
|
:'space_ids' => :'space_ids',
|
37
|
+
:'team_ids' => :'team_ids',
|
34
38
|
:'default_locale_codes' => :'default_locale_codes',
|
35
39
|
:'permissions' => :'permissions'
|
36
40
|
}
|
@@ -44,6 +48,7 @@ module Phrase
|
|
44
48
|
:'project_ids' => :'String',
|
45
49
|
:'locale_ids' => :'String',
|
46
50
|
:'space_ids' => :'Array<String>',
|
51
|
+
:'team_ids' => :'Array<String>',
|
47
52
|
:'default_locale_codes' => :'Array<String>',
|
48
53
|
:'permissions' => :'Hash<String, String>'
|
49
54
|
}
|
@@ -92,6 +97,12 @@ module Phrase
|
|
92
97
|
end
|
93
98
|
end
|
94
99
|
|
100
|
+
if attributes.key?(:'team_ids')
|
101
|
+
if (value = attributes[:'team_ids']).is_a?(Array)
|
102
|
+
self.team_ids = value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
95
106
|
if attributes.key?(:'default_locale_codes')
|
96
107
|
if (value = attributes[:'default_locale_codes']).is_a?(Array)
|
97
108
|
self.default_locale_codes = value
|
@@ -128,6 +139,7 @@ module Phrase
|
|
128
139
|
project_ids == o.project_ids &&
|
129
140
|
locale_ids == o.locale_ids &&
|
130
141
|
space_ids == o.space_ids &&
|
142
|
+
team_ids == o.team_ids &&
|
131
143
|
default_locale_codes == o.default_locale_codes &&
|
132
144
|
permissions == o.permissions
|
133
145
|
end
|
@@ -141,7 +153,7 @@ module Phrase
|
|
141
153
|
# Calculates hash code according to all attributes.
|
142
154
|
# @return [Integer] Hash code
|
143
155
|
def hash
|
144
|
-
[email, role, project_ids, locale_ids, space_ids, default_locale_codes, permissions].hash
|
156
|
+
[email, role, project_ids, locale_ids, space_ids, team_ids, default_locale_codes, permissions].hash
|
145
157
|
end
|
146
158
|
|
147
159
|
# Builds the object from hash
|
@@ -14,6 +14,9 @@ module Phrase
|
|
14
14
|
# List of spaces the user is assigned to.
|
15
15
|
attr_accessor :space_ids
|
16
16
|
|
17
|
+
# List of teams the user is assigned to.
|
18
|
+
attr_accessor :team_ids
|
19
|
+
|
17
20
|
# List of default locales for the user.
|
18
21
|
attr_accessor :default_locale_codes
|
19
22
|
|
@@ -27,6 +30,7 @@ module Phrase
|
|
27
30
|
:'project_ids' => :'project_ids',
|
28
31
|
:'locale_ids' => :'locale_ids',
|
29
32
|
:'space_ids' => :'space_ids',
|
33
|
+
:'team_ids' => :'team_ids',
|
30
34
|
:'default_locale_codes' => :'default_locale_codes',
|
31
35
|
:'permissions' => :'permissions'
|
32
36
|
}
|
@@ -39,6 +43,7 @@ module Phrase
|
|
39
43
|
:'project_ids' => :'String',
|
40
44
|
:'locale_ids' => :'String',
|
41
45
|
:'space_ids' => :'Array<String>',
|
46
|
+
:'team_ids' => :'Array<String>',
|
42
47
|
:'default_locale_codes' => :'Array<String>',
|
43
48
|
:'permissions' => :'Hash<String, String>'
|
44
49
|
}
|
@@ -83,6 +88,12 @@ module Phrase
|
|
83
88
|
end
|
84
89
|
end
|
85
90
|
|
91
|
+
if attributes.key?(:'team_ids')
|
92
|
+
if (value = attributes[:'team_ids']).is_a?(Array)
|
93
|
+
self.team_ids = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
86
97
|
if attributes.key?(:'default_locale_codes')
|
87
98
|
if (value = attributes[:'default_locale_codes']).is_a?(Array)
|
88
99
|
self.default_locale_codes = value
|
@@ -118,6 +129,7 @@ module Phrase
|
|
118
129
|
project_ids == o.project_ids &&
|
119
130
|
locale_ids == o.locale_ids &&
|
120
131
|
space_ids == o.space_ids &&
|
132
|
+
team_ids == o.team_ids &&
|
121
133
|
default_locale_codes == o.default_locale_codes &&
|
122
134
|
permissions == o.permissions
|
123
135
|
end
|
@@ -131,7 +143,7 @@ module Phrase
|
|
131
143
|
# Calculates hash code according to all attributes.
|
132
144
|
# @return [Integer] Hash code
|
133
145
|
def hash
|
134
|
-
[role, project_ids, locale_ids, space_ids, default_locale_codes, permissions].hash
|
146
|
+
[role, project_ids, locale_ids, space_ids, team_ids, default_locale_codes, permissions].hash
|
135
147
|
end
|
136
148
|
|
137
149
|
# Builds the object from hash
|