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
@@ -8,6 +8,9 @@ module Phrase
|
|
8
8
|
# Job name
|
9
9
|
attr_accessor :name
|
10
10
|
|
11
|
+
# The API id of the source language
|
12
|
+
attr_accessor :source_locale_id
|
13
|
+
|
11
14
|
# Briefing for the translators
|
12
15
|
attr_accessor :briefing
|
13
16
|
|
@@ -28,6 +31,7 @@ module Phrase
|
|
28
31
|
{
|
29
32
|
:'branch' => :'branch',
|
30
33
|
:'name' => :'name',
|
34
|
+
:'source_locale_id' => :'source_locale_id',
|
31
35
|
:'briefing' => :'briefing',
|
32
36
|
:'due_date' => :'due_date',
|
33
37
|
:'ticket_url' => :'ticket_url',
|
@@ -41,6 +45,7 @@ module Phrase
|
|
41
45
|
{
|
42
46
|
:'branch' => :'String',
|
43
47
|
:'name' => :'String',
|
48
|
+
:'source_locale_id' => :'String',
|
44
49
|
:'briefing' => :'String',
|
45
50
|
:'due_date' => :'DateTime',
|
46
51
|
:'ticket_url' => :'String',
|
@@ -78,6 +83,10 @@ module Phrase
|
|
78
83
|
self.name = attributes[:'name']
|
79
84
|
end
|
80
85
|
|
86
|
+
if attributes.key?(:'source_locale_id')
|
87
|
+
self.source_locale_id = attributes[:'source_locale_id']
|
88
|
+
end
|
89
|
+
|
81
90
|
if attributes.key?(:'briefing')
|
82
91
|
self.briefing = attributes[:'briefing']
|
83
92
|
end
|
@@ -123,6 +132,7 @@ module Phrase
|
|
123
132
|
self.class == o.class &&
|
124
133
|
branch == o.branch &&
|
125
134
|
name == o.name &&
|
135
|
+
source_locale_id == o.source_locale_id &&
|
126
136
|
briefing == o.briefing &&
|
127
137
|
due_date == o.due_date &&
|
128
138
|
ticket_url == o.ticket_url &&
|
@@ -139,7 +149,7 @@ module Phrase
|
|
139
149
|
# Calculates hash code according to all attributes.
|
140
150
|
# @return [Integer] Hash code
|
141
151
|
def hash
|
142
|
-
[branch, name, briefing, due_date, ticket_url, tags, translation_key_ids].hash
|
152
|
+
[branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids].hash
|
143
153
|
end
|
144
154
|
|
145
155
|
# Builds the object from hash
|
@@ -26,6 +26,8 @@ module Phrase
|
|
26
26
|
|
27
27
|
attr_accessor :job_tag_name
|
28
28
|
|
29
|
+
attr_accessor :source_locale
|
30
|
+
|
29
31
|
attr_accessor :locales
|
30
32
|
|
31
33
|
attr_accessor :keys
|
@@ -45,6 +47,7 @@ module Phrase
|
|
45
47
|
:'updated_at' => :'updated_at',
|
46
48
|
:'owner' => :'owner',
|
47
49
|
:'job_tag_name' => :'job_tag_name',
|
50
|
+
:'source_locale' => :'source_locale',
|
48
51
|
:'locales' => :'locales',
|
49
52
|
:'keys' => :'keys'
|
50
53
|
}
|
@@ -65,6 +68,7 @@ module Phrase
|
|
65
68
|
:'updated_at' => :'DateTime',
|
66
69
|
:'owner' => :'UserPreview',
|
67
70
|
:'job_tag_name' => :'String',
|
71
|
+
:'source_locale' => :'LocalePreview',
|
68
72
|
:'locales' => :'Array<LocalePreview>',
|
69
73
|
:'keys' => :'Array<KeyPreview>'
|
70
74
|
}
|
@@ -147,6 +151,10 @@ module Phrase
|
|
147
151
|
self.job_tag_name = attributes[:'job_tag_name']
|
148
152
|
end
|
149
153
|
|
154
|
+
if attributes.key?(:'source_locale')
|
155
|
+
self.source_locale = attributes[:'source_locale']
|
156
|
+
end
|
157
|
+
|
150
158
|
if attributes.key?(:'locales')
|
151
159
|
if (value = attributes[:'locales']).is_a?(Array)
|
152
160
|
self.locales = value
|
@@ -190,6 +198,7 @@ module Phrase
|
|
190
198
|
updated_at == o.updated_at &&
|
191
199
|
owner == o.owner &&
|
192
200
|
job_tag_name == o.job_tag_name &&
|
201
|
+
source_locale == o.source_locale &&
|
193
202
|
locales == o.locales &&
|
194
203
|
keys == o.keys
|
195
204
|
end
|
@@ -203,7 +212,7 @@ module Phrase
|
|
203
212
|
# Calculates hash code according to all attributes.
|
204
213
|
# @return [Integer] Hash code
|
205
214
|
def hash
|
206
|
-
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, locales, keys].hash
|
215
|
+
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_locale, locales, keys].hash
|
207
216
|
end
|
208
217
|
|
209
218
|
# Builds the object from hash
|
@@ -6,6 +6,8 @@ module Phrase
|
|
6
6
|
|
7
7
|
attr_accessor :job_tag_name
|
8
8
|
|
9
|
+
attr_accessor :source_locale
|
10
|
+
|
9
11
|
attr_accessor :locales
|
10
12
|
|
11
13
|
attr_accessor :keys
|
@@ -15,6 +17,7 @@ module Phrase
|
|
15
17
|
{
|
16
18
|
:'owner' => :'owner',
|
17
19
|
:'job_tag_name' => :'job_tag_name',
|
20
|
+
:'source_locale' => :'source_locale',
|
18
21
|
:'locales' => :'locales',
|
19
22
|
:'keys' => :'keys'
|
20
23
|
}
|
@@ -25,6 +28,7 @@ module Phrase
|
|
25
28
|
{
|
26
29
|
:'owner' => :'UserPreview',
|
27
30
|
:'job_tag_name' => :'String',
|
31
|
+
:'source_locale' => :'LocalePreview',
|
28
32
|
:'locales' => :'Array<LocalePreview>',
|
29
33
|
:'keys' => :'Array<KeyPreview>'
|
30
34
|
}
|
@@ -59,6 +63,10 @@ module Phrase
|
|
59
63
|
self.job_tag_name = attributes[:'job_tag_name']
|
60
64
|
end
|
61
65
|
|
66
|
+
if attributes.key?(:'source_locale')
|
67
|
+
self.source_locale = attributes[:'source_locale']
|
68
|
+
end
|
69
|
+
|
62
70
|
if attributes.key?(:'locales')
|
63
71
|
if (value = attributes[:'locales']).is_a?(Array)
|
64
72
|
self.locales = value
|
@@ -92,6 +100,7 @@ module Phrase
|
|
92
100
|
self.class == o.class &&
|
93
101
|
owner == o.owner &&
|
94
102
|
job_tag_name == o.job_tag_name &&
|
103
|
+
source_locale == o.source_locale &&
|
95
104
|
locales == o.locales &&
|
96
105
|
keys == o.keys
|
97
106
|
end
|
@@ -105,7 +114,7 @@ module Phrase
|
|
105
114
|
# Calculates hash code according to all attributes.
|
106
115
|
# @return [Integer] Hash code
|
107
116
|
def hash
|
108
|
-
[owner, job_tag_name, locales, keys].hash
|
117
|
+
[owner, job_tag_name, source_locale, locales, keys].hash
|
109
118
|
end
|
110
119
|
|
111
120
|
# Builds the object from hash
|
@@ -8,6 +8,9 @@ module Phrase
|
|
8
8
|
# List of platforms the release should support.
|
9
9
|
attr_accessor :platforms
|
10
10
|
|
11
|
+
# List of locale ids that will be included in the release. If empty, distribution locales will be used
|
12
|
+
attr_accessor :locale_ids
|
13
|
+
|
11
14
|
# Branch used for release
|
12
15
|
attr_accessor :branch
|
13
16
|
|
@@ -16,6 +19,7 @@ module Phrase
|
|
16
19
|
{
|
17
20
|
:'description' => :'description',
|
18
21
|
:'platforms' => :'platforms',
|
22
|
+
:'locale_ids' => :'locale_ids',
|
19
23
|
:'branch' => :'branch'
|
20
24
|
}
|
21
25
|
end
|
@@ -25,6 +29,7 @@ module Phrase
|
|
25
29
|
{
|
26
30
|
:'description' => :'String',
|
27
31
|
:'platforms' => :'Array<String>',
|
32
|
+
:'locale_ids' => :'Array<String>',
|
28
33
|
:'branch' => :'String'
|
29
34
|
}
|
30
35
|
end
|
@@ -60,6 +65,12 @@ module Phrase
|
|
60
65
|
end
|
61
66
|
end
|
62
67
|
|
68
|
+
if attributes.key?(:'locale_ids')
|
69
|
+
if (value = attributes[:'locale_ids']).is_a?(Array)
|
70
|
+
self.locale_ids = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
63
74
|
if attributes.key?(:'branch')
|
64
75
|
self.branch = attributes[:'branch']
|
65
76
|
end
|
@@ -85,6 +96,7 @@ module Phrase
|
|
85
96
|
self.class == o.class &&
|
86
97
|
description == o.description &&
|
87
98
|
platforms == o.platforms &&
|
99
|
+
locale_ids == o.locale_ids &&
|
88
100
|
branch == o.branch
|
89
101
|
end
|
90
102
|
|
@@ -97,7 +109,7 @@ module Phrase
|
|
97
109
|
# Calculates hash code according to all attributes.
|
98
110
|
# @return [Integer] Hash code
|
99
111
|
def hash
|
100
|
-
[description, platforms, branch].hash
|
112
|
+
[description, platforms, locale_ids, branch].hash
|
101
113
|
end
|
102
114
|
|
103
115
|
# Builds the object from hash
|
@@ -5,22 +5,18 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
+
# specify the locale of the translations to be verified
|
9
|
+
attr_accessor :locale_id
|
10
|
+
|
8
11
|
# 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>.
|
9
12
|
attr_accessor :q
|
10
13
|
|
11
|
-
# Sort criteria. Can be one of: key_name, created_at, updated_at.
|
12
|
-
attr_accessor :sort
|
13
|
-
|
14
|
-
# Order direction. Can be one of: asc, desc.
|
15
|
-
attr_accessor :order
|
16
|
-
|
17
14
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
15
|
def self.attribute_map
|
19
16
|
{
|
20
17
|
:'branch' => :'branch',
|
21
|
-
:'
|
22
|
-
:'
|
23
|
-
:'order' => :'order'
|
18
|
+
:'locale_id' => :'locale_id',
|
19
|
+
:'q' => :'q'
|
24
20
|
}
|
25
21
|
end
|
26
22
|
|
@@ -28,9 +24,8 @@ module Phrase
|
|
28
24
|
def self.openapi_types
|
29
25
|
{
|
30
26
|
:'branch' => :'String',
|
31
|
-
:'
|
32
|
-
:'
|
33
|
-
:'order' => :'String'
|
27
|
+
:'locale_id' => :'String',
|
28
|
+
:'q' => :'String'
|
34
29
|
}
|
35
30
|
end
|
36
31
|
|
@@ -59,16 +54,12 @@ module Phrase
|
|
59
54
|
self.branch = attributes[:'branch']
|
60
55
|
end
|
61
56
|
|
62
|
-
if attributes.key?(:'
|
63
|
-
self.
|
57
|
+
if attributes.key?(:'locale_id')
|
58
|
+
self.locale_id = attributes[:'locale_id']
|
64
59
|
end
|
65
60
|
|
66
|
-
if attributes.key?(:'
|
67
|
-
self.
|
68
|
-
end
|
69
|
-
|
70
|
-
if attributes.key?(:'order')
|
71
|
-
self.order = attributes[:'order']
|
61
|
+
if attributes.key?(:'q')
|
62
|
+
self.q = attributes[:'q']
|
72
63
|
end
|
73
64
|
end
|
74
65
|
|
@@ -91,9 +82,8 @@ module Phrase
|
|
91
82
|
return true if self.equal?(o)
|
92
83
|
self.class == o.class &&
|
93
84
|
branch == o.branch &&
|
94
|
-
|
95
|
-
|
96
|
-
order == o.order
|
85
|
+
locale_id == o.locale_id &&
|
86
|
+
q == o.q
|
97
87
|
end
|
98
88
|
|
99
89
|
# @see the `==` method
|
@@ -105,7 +95,7 @@ module Phrase
|
|
105
95
|
# Calculates hash code according to all attributes.
|
106
96
|
# @return [Integer] Hash code
|
107
97
|
def hash
|
108
|
-
[branch,
|
98
|
+
[branch, locale_id, q].hash
|
109
99
|
end
|
110
100
|
|
111
101
|
# Builds the object from hash
|
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
|
@@ -38,6 +38,12 @@ describe 'DistributionCreateParameters' do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
describe 'test attribute "locale_ids"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
describe 'test attribute "format_options"' do
|
42
48
|
it 'should work' do
|
43
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -44,6 +44,12 @@ describe 'Distribution' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
describe 'test attribute "locales"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
47
53
|
describe 'test attribute "releases"' do
|
48
54
|
it 'should work' do
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -38,6 +38,12 @@ describe 'DistributionUpdateParameters' do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
describe 'test attribute "locale_ids"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
describe 'test attribute "format_options"' do
|
42
48
|
it 'should work' do
|
43
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -50,6 +50,12 @@ describe 'InvitationCreateParameters' do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
describe 'test attribute "team_ids"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
53
59
|
describe 'test attribute "default_locale_codes"' do
|
54
60
|
it 'should work' do
|
55
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -44,6 +44,12 @@ describe 'InvitationUpdateParameters' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
describe 'test attribute "team_ids"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
47
53
|
describe 'test attribute "default_locale_codes"' do
|
48
54
|
it 'should work' do
|
49
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -32,6 +32,12 @@ describe 'JobCreateParameters' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
describe 'test attribute "source_locale_id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
35
41
|
describe 'test attribute "briefing"' do
|
36
42
|
it 'should work' do
|
37
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -32,6 +32,12 @@ describe 'JobDetails1' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
describe 'test attribute "source_locale"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
35
41
|
describe 'test attribute "locales"' do
|
36
42
|
it 'should work' do
|
37
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -92,6 +92,12 @@ describe 'JobDetails' do
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
+
describe 'test attribute "source_locale"' do
|
96
|
+
it 'should work' do
|
97
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
95
101
|
describe 'test attribute "locales"' do
|
96
102
|
it 'should work' do
|
97
103
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -32,6 +32,12 @@ describe 'ReleaseCreateParameters' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
describe 'test attribute "locale_ids"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
35
41
|
describe 'test attribute "branch"' do
|
36
42
|
it 'should work' do
|
37
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -26,19 +26,13 @@ describe 'TranslationsVerifyParameters' do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
describe 'test attribute "
|
29
|
+
describe 'test attribute "locale_id"' do
|
30
30
|
it 'should work' do
|
31
31
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe 'test attribute "
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "order"' do
|
35
|
+
describe 'test attribute "q"' do
|
42
36
|
it 'should work' do
|
43
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
38
|
end
|