phrase 2.2.0 → 2.3.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 +3 -3
- data/docs/LocalesApi.md +7 -3
- data/lib/phrase/api/locales_api.rb +13 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/locales_api_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be794e52cd40f286c8958c9b1937168c54ecdb3161bba26254c5664b5c6c38d7
|
4
|
+
data.tar.gz: 8b8825c7057685e8dd229afdec2e4a660ae04ede50522b31290d13f1827f70dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2609256143868b86dcc0705c59994bfb58bbcf844c0a1967ce0a5c635f25f8b4a194f92d809fcd014790153e77373312592bd0aacc58d310c50faa575cfe032
|
7
|
+
data.tar.gz: f93870abc9f40a0b7808cc85c7bbcf183db68c1ca9efbae02049b27cd7dbebace60952eb0b2b08793e75fe8c3ccdfc327579f663c6dbbf228d66b6c03c409097
|
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.3.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.3.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.3.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
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
|
|
@@ -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] || {}
|
data/lib/phrase/version.rb
CHANGED
@@ -23,6 +23,7 @@ describe 'LocalesApi' do
|
|
23
23
|
# unit tests for account_locales
|
24
24
|
# List locales used in account
|
25
25
|
# List all locales unique by locale code used across all projects within an account.
|
26
|
+
# @param id ID
|
26
27
|
# @param [Hash] opts the optional parameters
|
27
28
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
28
29
|
# @option opts [Integer] :page Page number
|
@@ -85,6 +86,7 @@ describe 'LocalesApi' do
|
|
85
86
|
# @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
|
86
87
|
# @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.
|
87
88
|
# @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>.
|
89
|
+
# @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.
|
88
90
|
# @return [File]
|
89
91
|
describe 'locale_download test' do
|
90
92
|
it 'should work' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phrase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|