phrase 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +33 -21
- data/docs/BlacklistedKeyCreateParameters.md +1 -1
- data/docs/BlacklistedKeyUpdateParameters.md +1 -1
- data/docs/BlacklistedKeysApi.md +20 -20
- data/docs/DistributionCreateParameters.md +2 -0
- data/docs/DistributionUpdateParameters.md +2 -0
- data/docs/GlossariesApi.md +20 -20
- data/docs/GlossaryTermTranslationsApi.md +12 -12
- data/docs/GlossaryTermsApi.md +20 -20
- data/docs/JobComment.md +29 -0
- data/docs/JobCommentCreateParameters.md +17 -0
- data/docs/JobCommentUpdateParameters.md +17 -0
- data/docs/JobCommentsApi.md +343 -0
- data/docs/Locale.md +2 -0
- data/docs/LocaleCreateParameters.md +2 -0
- data/docs/LocaleDetails.md +2 -0
- data/docs/LocaleUpdateParameters.md +2 -0
- data/docs/ScreenshotsApi.md +12 -6
- data/docs/StyleguideCreateParameters.md +1 -1
- data/docs/StyleguideUpdateParameters.md +1 -1
- data/docs/VersionsHistoryApi.md +1 -1
- data/docs/WebhookDeliveriesApi.md +206 -0
- data/docs/WebhookDelivery.md +29 -0
- data/lib/phrase/api/blacklisted_keys_api.rb +20 -20
- data/lib/phrase/api/glossaries_api.rb +20 -20
- data/lib/phrase/api/glossary_term_translations_api.rb +12 -12
- data/lib/phrase/api/glossary_terms_api.rb +20 -20
- data/lib/phrase/api/job_comments_api.rb +411 -0
- data/lib/phrase/api/screenshots_api.rb +17 -11
- data/lib/phrase/api/versions_history_api.rb +2 -2
- data/lib/phrase/api/webhook_deliveries_api.rb +241 -0
- data/lib/phrase/models/blacklisted_key_create_parameters.rb +1 -1
- data/lib/phrase/models/blacklisted_key_update_parameters.rb +1 -1
- data/lib/phrase/models/distribution_create_parameters.rb +11 -1
- data/lib/phrase/models/distribution_update_parameters.rb +11 -1
- data/lib/phrase/models/job_comment.rb +250 -0
- data/lib/phrase/models/job_comment_create_parameters.rb +195 -0
- data/lib/phrase/models/job_comment_update_parameters.rb +195 -0
- data/lib/phrase/models/locale.rb +10 -1
- data/lib/phrase/models/locale_create_parameters.rb +11 -1
- data/lib/phrase/models/locale_details.rb +10 -1
- data/lib/phrase/models/locale_update_parameters.rb +11 -1
- data/lib/phrase/models/webhook_delivery.rb +248 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +6 -0
- data/spec/api/blacklisted_keys_api_spec.rb +10 -10
- data/spec/api/glossaries_api_spec.rb +10 -10
- data/spec/api/glossary_term_translations_api_spec.rb +6 -6
- data/spec/api/glossary_terms_api_spec.rb +10 -10
- data/spec/api/job_comments_api_spec.rb +101 -0
- data/spec/api/screenshots_api_spec.rb +4 -1
- data/spec/api/versions_history_api_spec.rb +1 -1
- data/spec/api/webhook_deliveries_api_spec.rb +68 -0
- data/spec/models/distribution_create_parameters_spec.rb +6 -0
- data/spec/models/distribution_update_parameters_spec.rb +6 -0
- data/spec/models/job_comment_create_parameters_spec.rb +29 -0
- data/spec/models/job_comment_spec.rb +65 -0
- data/spec/models/job_comment_update_parameters_spec.rb +29 -0
- data/spec/models/locale_create_parameters_spec.rb +6 -0
- data/spec/models/locale_details_spec.rb +6 -0
- data/spec/models/locale_spec.rb +6 -0
- data/spec/models/locale_update_parameters_spec.rb +6 -0
- data/spec/models/webhook_delivery_spec.rb +65 -0
- metadata +221 -197
@@ -0,0 +1,195 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class JobCommentCreateParameters
|
5
|
+
# Job comment message
|
6
|
+
attr_accessor :message
|
7
|
+
|
8
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:'message' => :'message'
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# Attribute type mapping.
|
16
|
+
def self.openapi_types
|
17
|
+
{
|
18
|
+
:'message' => :'String'
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# List of attributes with nullable: true
|
23
|
+
def self.openapi_nullable
|
24
|
+
Set.new([
|
25
|
+
])
|
26
|
+
end
|
27
|
+
|
28
|
+
# Initializes the object
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
30
|
+
def initialize(attributes = {})
|
31
|
+
if (!attributes.is_a?(Hash))
|
32
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobCommentCreateParameters` initialize method"
|
33
|
+
end
|
34
|
+
|
35
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
37
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
38
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobCommentCreateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
39
|
+
end
|
40
|
+
h[k.to_sym] = v
|
41
|
+
}
|
42
|
+
|
43
|
+
if attributes.key?(:'message')
|
44
|
+
self.message = attributes[:'message']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
message == o.message
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Integer] Hash code
|
77
|
+
def hash
|
78
|
+
[message].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def self.build_from_hash(attributes)
|
85
|
+
new.build_from_hash(attributes)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.openapi_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :Boolean
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
Phrase.const_get(type).build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
if value.nil?
|
168
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
169
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
170
|
+
end
|
171
|
+
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map { |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class JobCommentUpdateParameters
|
5
|
+
# Comment message
|
6
|
+
attr_accessor :message
|
7
|
+
|
8
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:'message' => :'message'
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# Attribute type mapping.
|
16
|
+
def self.openapi_types
|
17
|
+
{
|
18
|
+
:'message' => :'String'
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# List of attributes with nullable: true
|
23
|
+
def self.openapi_nullable
|
24
|
+
Set.new([
|
25
|
+
])
|
26
|
+
end
|
27
|
+
|
28
|
+
# Initializes the object
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
30
|
+
def initialize(attributes = {})
|
31
|
+
if (!attributes.is_a?(Hash))
|
32
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobCommentUpdateParameters` initialize method"
|
33
|
+
end
|
34
|
+
|
35
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
37
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
38
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobCommentUpdateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
39
|
+
end
|
40
|
+
h[k.to_sym] = v
|
41
|
+
}
|
42
|
+
|
43
|
+
if attributes.key?(:'message')
|
44
|
+
self.message = attributes[:'message']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
message == o.message
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Integer] Hash code
|
77
|
+
def hash
|
78
|
+
[message].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def self.build_from_hash(attributes)
|
85
|
+
new.build_from_hash(attributes)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.openapi_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :Boolean
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
Phrase.const_get(type).build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
if value.nil?
|
168
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
169
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
170
|
+
end
|
171
|
+
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map { |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
data/lib/phrase/models/locale.rb
CHANGED
@@ -18,6 +18,8 @@ module Phrase
|
|
18
18
|
|
19
19
|
attr_accessor :source_locale
|
20
20
|
|
21
|
+
attr_accessor :fallback_locale
|
22
|
+
|
21
23
|
attr_accessor :created_at
|
22
24
|
|
23
25
|
attr_accessor :updated_at
|
@@ -33,6 +35,7 @@ module Phrase
|
|
33
35
|
:'rtl' => :'rtl',
|
34
36
|
:'plural_forms' => :'plural_forms',
|
35
37
|
:'source_locale' => :'source_locale',
|
38
|
+
:'fallback_locale' => :'fallback_locale',
|
36
39
|
:'created_at' => :'created_at',
|
37
40
|
:'updated_at' => :'updated_at'
|
38
41
|
}
|
@@ -49,6 +52,7 @@ module Phrase
|
|
49
52
|
:'rtl' => :'Boolean',
|
50
53
|
:'plural_forms' => :'Array<String>',
|
51
54
|
:'source_locale' => :'LocalePreview',
|
55
|
+
:'fallback_locale' => :'LocalePreview',
|
52
56
|
:'created_at' => :'DateTime',
|
53
57
|
:'updated_at' => :'DateTime'
|
54
58
|
}
|
@@ -109,6 +113,10 @@ module Phrase
|
|
109
113
|
self.source_locale = attributes[:'source_locale']
|
110
114
|
end
|
111
115
|
|
116
|
+
if attributes.key?(:'fallback_locale')
|
117
|
+
self.fallback_locale = attributes[:'fallback_locale']
|
118
|
+
end
|
119
|
+
|
112
120
|
if attributes.key?(:'created_at')
|
113
121
|
self.created_at = attributes[:'created_at']
|
114
122
|
end
|
@@ -144,6 +152,7 @@ module Phrase
|
|
144
152
|
rtl == o.rtl &&
|
145
153
|
plural_forms == o.plural_forms &&
|
146
154
|
source_locale == o.source_locale &&
|
155
|
+
fallback_locale == o.fallback_locale &&
|
147
156
|
created_at == o.created_at &&
|
148
157
|
updated_at == o.updated_at
|
149
158
|
end
|
@@ -157,7 +166,7 @@ module Phrase
|
|
157
166
|
# Calculates hash code according to all attributes.
|
158
167
|
# @return [Integer] Hash code
|
159
168
|
def hash
|
160
|
-
[id, name, code, default, main, rtl, plural_forms, source_locale, created_at, updated_at].hash
|
169
|
+
[id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
|
161
170
|
end
|
162
171
|
|
163
172
|
# Builds the object from hash
|
@@ -23,6 +23,9 @@ module Phrase
|
|
23
23
|
# Source locale. Can be the name or public id of the locale. Preferred is the public id.
|
24
24
|
attr_accessor :source_locale_id
|
25
25
|
|
26
|
+
# Fallback locale for empty translations. Can be a locale name or id.
|
27
|
+
attr_accessor :fallback_locale_id
|
28
|
+
|
26
29
|
# Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
|
27
30
|
attr_accessor :unverify_new_translations
|
28
31
|
|
@@ -42,6 +45,7 @@ module Phrase
|
|
42
45
|
:'main' => :'main',
|
43
46
|
:'rtl' => :'rtl',
|
44
47
|
:'source_locale_id' => :'source_locale_id',
|
48
|
+
:'fallback_locale_id' => :'fallback_locale_id',
|
45
49
|
:'unverify_new_translations' => :'unverify_new_translations',
|
46
50
|
:'unverify_updated_translations' => :'unverify_updated_translations',
|
47
51
|
:'autotranslate' => :'autotranslate'
|
@@ -58,6 +62,7 @@ module Phrase
|
|
58
62
|
:'main' => :'Boolean',
|
59
63
|
:'rtl' => :'Boolean',
|
60
64
|
:'source_locale_id' => :'String',
|
65
|
+
:'fallback_locale_id' => :'String',
|
61
66
|
:'unverify_new_translations' => :'Boolean',
|
62
67
|
:'unverify_updated_translations' => :'Boolean',
|
63
68
|
:'autotranslate' => :'Boolean'
|
@@ -113,6 +118,10 @@ module Phrase
|
|
113
118
|
self.source_locale_id = attributes[:'source_locale_id']
|
114
119
|
end
|
115
120
|
|
121
|
+
if attributes.key?(:'fallback_locale_id')
|
122
|
+
self.fallback_locale_id = attributes[:'fallback_locale_id']
|
123
|
+
end
|
124
|
+
|
116
125
|
if attributes.key?(:'unverify_new_translations')
|
117
126
|
self.unverify_new_translations = attributes[:'unverify_new_translations']
|
118
127
|
end
|
@@ -151,6 +160,7 @@ module Phrase
|
|
151
160
|
main == o.main &&
|
152
161
|
rtl == o.rtl &&
|
153
162
|
source_locale_id == o.source_locale_id &&
|
163
|
+
fallback_locale_id == o.fallback_locale_id &&
|
154
164
|
unverify_new_translations == o.unverify_new_translations &&
|
155
165
|
unverify_updated_translations == o.unverify_updated_translations &&
|
156
166
|
autotranslate == o.autotranslate
|
@@ -165,7 +175,7 @@ module Phrase
|
|
165
175
|
# Calculates hash code according to all attributes.
|
166
176
|
# @return [Integer] Hash code
|
167
177
|
def hash
|
168
|
-
[branch, name, code, default, main, rtl, source_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
178
|
+
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
169
179
|
end
|
170
180
|
|
171
181
|
# Builds the object from hash
|
@@ -18,6 +18,8 @@ module Phrase
|
|
18
18
|
|
19
19
|
attr_accessor :source_locale
|
20
20
|
|
21
|
+
attr_accessor :fallback_locale
|
22
|
+
|
21
23
|
attr_accessor :created_at
|
22
24
|
|
23
25
|
attr_accessor :updated_at
|
@@ -35,6 +37,7 @@ module Phrase
|
|
35
37
|
:'rtl' => :'rtl',
|
36
38
|
:'plural_forms' => :'plural_forms',
|
37
39
|
:'source_locale' => :'source_locale',
|
40
|
+
:'fallback_locale' => :'fallback_locale',
|
38
41
|
:'created_at' => :'created_at',
|
39
42
|
:'updated_at' => :'updated_at',
|
40
43
|
:'statistics' => :'statistics'
|
@@ -52,6 +55,7 @@ module Phrase
|
|
52
55
|
:'rtl' => :'Boolean',
|
53
56
|
:'plural_forms' => :'Array<String>',
|
54
57
|
:'source_locale' => :'LocalePreview',
|
58
|
+
:'fallback_locale' => :'LocalePreview',
|
55
59
|
:'created_at' => :'DateTime',
|
56
60
|
:'updated_at' => :'DateTime',
|
57
61
|
:'statistics' => :'LocaleStatistics'
|
@@ -121,6 +125,10 @@ module Phrase
|
|
121
125
|
self.source_locale = attributes[:'source_locale']
|
122
126
|
end
|
123
127
|
|
128
|
+
if attributes.key?(:'fallback_locale')
|
129
|
+
self.fallback_locale = attributes[:'fallback_locale']
|
130
|
+
end
|
131
|
+
|
124
132
|
if attributes.key?(:'created_at')
|
125
133
|
self.created_at = attributes[:'created_at']
|
126
134
|
end
|
@@ -160,6 +168,7 @@ module Phrase
|
|
160
168
|
rtl == o.rtl &&
|
161
169
|
plural_forms == o.plural_forms &&
|
162
170
|
source_locale == o.source_locale &&
|
171
|
+
fallback_locale == o.fallback_locale &&
|
163
172
|
created_at == o.created_at &&
|
164
173
|
updated_at == o.updated_at &&
|
165
174
|
statistics == o.statistics
|
@@ -174,7 +183,7 @@ module Phrase
|
|
174
183
|
# Calculates hash code according to all attributes.
|
175
184
|
# @return [Integer] Hash code
|
176
185
|
def hash
|
177
|
-
[id, name, code, default, main, rtl, plural_forms, source_locale, created_at, updated_at, statistics].hash
|
186
|
+
[id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at, statistics].hash
|
178
187
|
end
|
179
188
|
|
180
189
|
# Builds the object from hash
|
@@ -23,6 +23,9 @@ module Phrase
|
|
23
23
|
# Source locale. Can be the name or public id of the locale. Preferred is the public id.
|
24
24
|
attr_accessor :source_locale_id
|
25
25
|
|
26
|
+
# Fallback locale for empty translations. Can be a locale name or id.
|
27
|
+
attr_accessor :fallback_locale_id
|
28
|
+
|
26
29
|
# Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
|
27
30
|
attr_accessor :unverify_new_translations
|
28
31
|
|
@@ -42,6 +45,7 @@ module Phrase
|
|
42
45
|
:'main' => :'main',
|
43
46
|
:'rtl' => :'rtl',
|
44
47
|
:'source_locale_id' => :'source_locale_id',
|
48
|
+
:'fallback_locale_id' => :'fallback_locale_id',
|
45
49
|
:'unverify_new_translations' => :'unverify_new_translations',
|
46
50
|
:'unverify_updated_translations' => :'unverify_updated_translations',
|
47
51
|
:'autotranslate' => :'autotranslate'
|
@@ -58,6 +62,7 @@ module Phrase
|
|
58
62
|
:'main' => :'Boolean',
|
59
63
|
:'rtl' => :'Boolean',
|
60
64
|
:'source_locale_id' => :'String',
|
65
|
+
:'fallback_locale_id' => :'String',
|
61
66
|
:'unverify_new_translations' => :'Boolean',
|
62
67
|
:'unverify_updated_translations' => :'Boolean',
|
63
68
|
:'autotranslate' => :'Boolean'
|
@@ -113,6 +118,10 @@ module Phrase
|
|
113
118
|
self.source_locale_id = attributes[:'source_locale_id']
|
114
119
|
end
|
115
120
|
|
121
|
+
if attributes.key?(:'fallback_locale_id')
|
122
|
+
self.fallback_locale_id = attributes[:'fallback_locale_id']
|
123
|
+
end
|
124
|
+
|
116
125
|
if attributes.key?(:'unverify_new_translations')
|
117
126
|
self.unverify_new_translations = attributes[:'unverify_new_translations']
|
118
127
|
end
|
@@ -151,6 +160,7 @@ module Phrase
|
|
151
160
|
main == o.main &&
|
152
161
|
rtl == o.rtl &&
|
153
162
|
source_locale_id == o.source_locale_id &&
|
163
|
+
fallback_locale_id == o.fallback_locale_id &&
|
154
164
|
unverify_new_translations == o.unverify_new_translations &&
|
155
165
|
unverify_updated_translations == o.unverify_updated_translations &&
|
156
166
|
autotranslate == o.autotranslate
|
@@ -165,7 +175,7 @@ module Phrase
|
|
165
175
|
# Calculates hash code according to all attributes.
|
166
176
|
# @return [Integer] Hash code
|
167
177
|
def hash
|
168
|
-
[branch, name, code, default, main, rtl, source_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
178
|
+
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
169
179
|
end
|
170
180
|
|
171
181
|
# Builds the object from hash
|