phrase 4.24.0 → 4.26.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/CHANGELOG.md +35 -0
- data/README.md +19 -4
- data/docs/AutomationEvent.md +33 -0
- data/docs/AutomationEventProject.md +19 -0
- data/docs/AutomationEventsApi.md +168 -0
- data/docs/AutomationsCreateParameters.md +1 -1
- data/docs/AutomationsCreateParameters1.md +1 -1
- data/docs/BranchComparison.md +23 -0
- data/docs/BranchComparisonChange.md +19 -0
- data/docs/BranchComparisonDiff.md +21 -0
- data/docs/BranchComparisonDiffConflictsValue.md +19 -0
- data/docs/BranchesApi.md +5 -4
- data/docs/DocumentsApi.md +4 -4
- data/docs/Format.md +20 -20
- data/docs/FormatsApi.md +1 -1
- data/docs/ICUApi.md +1 -1
- data/docs/IcuSkeletonError.md +17 -0
- data/docs/IcuSkeletonParameters.md +11 -11
- data/docs/Job.md +3 -1
- data/docs/JobDetails.md +2 -0
- data/docs/JobsApi.md +2 -2
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyFormatAnnotationsApi.md +74 -0
- data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
- data/docs/KeyLinksBatchDestroyParameters.md +6 -4
- data/docs/KeyLinksCreateParameters.md +2 -2
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/LinkedKeysApi.md +14 -13
- data/docs/Locale.md +2 -0
- data/docs/LocaleCreateParameters.md +3 -1
- data/docs/LocaleDetails.md +2 -0
- data/docs/LocaleDownloadCreateParameters.md +4 -0
- data/docs/LocaleUpdateParameters.md +3 -1
- data/docs/LocalesApi.md +2 -2
- data/docs/PreTranslation.md +29 -0
- data/docs/PreTranslationCreateParameters.md +19 -0
- data/docs/PreTranslationsApi.md +210 -0
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/RepoSync.md +2 -0
- data/docs/RepoSyncCreateParameters.md +2 -0
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/ScreenshotsApi.md +11 -11
- data/lib/phrase/api/automation_events_api.rb +215 -0
- data/lib/phrase/api/branches_api.rb +5 -3
- data/lib/phrase/api/documents_api.rb +6 -6
- data/lib/phrase/api/formats_api.rb +2 -2
- data/lib/phrase/api/icu_api.rb +2 -6
- data/lib/phrase/api/key_format_annotations_api.rb +85 -0
- data/lib/phrase/api/linked_keys_api.rb +19 -23
- data/lib/phrase/api/locales_api.rb +2 -2
- data/lib/phrase/api/pre_translations_api.rb +240 -0
- data/lib/phrase/api/screenshots_api.rb +20 -16
- data/lib/phrase/models/automation_event.rb +325 -0
- data/lib/phrase/models/automation_event_project.rb +208 -0
- data/lib/phrase/models/automations_create_parameters.rb +1 -1
- data/lib/phrase/models/automations_create_parameters1.rb +1 -1
- data/lib/phrase/models/branch_comparison.rb +224 -0
- data/lib/phrase/models/branch_comparison_change.rb +212 -0
- data/lib/phrase/models/branch_comparison_diff.rb +223 -0
- data/lib/phrase/models/branch_comparison_diff_conflicts_value.rb +209 -0
- data/lib/phrase/models/format.rb +60 -0
- data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
- data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
- data/lib/phrase/models/job.rb +16 -5
- data/lib/phrase/models/job_details.rb +12 -1
- data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
- data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
- data/lib/phrase/models/key_links_create_parameters.rb +1 -1
- data/lib/phrase/models/locale.rb +10 -1
- data/lib/phrase/models/locale_create_parameters.rb +14 -4
- data/lib/phrase/models/locale_details.rb +10 -1
- data/lib/phrase/models/locale_download_create_parameters.rb +21 -1
- data/lib/phrase/models/locale_update_parameters.rb +14 -4
- data/lib/phrase/models/pre_translation.rb +301 -0
- data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
- data/lib/phrase/models/repo_sync.rb +29 -1
- data/lib/phrase/models/repo_sync_create_parameters.rb +27 -1
- data/lib/phrase/response.rb +2 -2
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +13 -1
- data/phrase.gemspec +1 -1
- data/spec/api/automation_events_api_spec.rb +67 -0
- data/spec/api/branches_api_spec.rb +1 -1
- data/spec/api/documents_api_spec.rb +3 -3
- data/spec/api/formats_api_spec.rb +1 -1
- data/spec/api/icu_api_spec.rb +1 -1
- data/spec/api/key_format_annotations_api_spec.rb +38 -0
- data/spec/api/linked_keys_api_spec.rb +7 -7
- data/spec/api/pre_translations_api_spec.rb +70 -0
- data/spec/api/screenshots_api_spec.rb +6 -6
- data/spec/models/automation_event_project_spec.rb +35 -0
- data/spec/models/automation_event_spec.rb +85 -0
- data/spec/models/branch_comparison_change_spec.rb +35 -0
- data/spec/models/branch_comparison_diff_conflicts_value_spec.rb +35 -0
- data/spec/models/branch_comparison_diff_spec.rb +41 -0
- data/spec/models/branch_comparison_spec.rb +47 -0
- data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/job_spec.rb +6 -0
- data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
- data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
- data/spec/models/locale_create_parameters_spec.rb +6 -0
- data/spec/models/locale_details_spec.rb +6 -0
- data/spec/models/locale_download_create_parameters_spec.rb +12 -0
- data/spec/models/locale_spec.rb +6 -0
- data/spec/models/locale_update_parameters_spec.rb +6 -0
- data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
- data/spec/models/pre_translation_spec.rb +73 -0
- data/spec/models/repo_sync_create_parameters_spec.rb +6 -0
- data/spec/models/repo_sync_spec.rb +6 -0
- data/spec/response_spec.rb +53 -0
- metadata +304 -254
- data/docs/KeyLinksIndex400Response.md +0 -17
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
require 'date'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class KeyFormatAnnotationsList200ResponseInner
|
|
5
|
+
# The file format that produced this annotation.
|
|
6
|
+
attr_accessor :file_format
|
|
7
|
+
|
|
8
|
+
# The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.
|
|
9
|
+
attr_accessor :original_representation
|
|
10
|
+
|
|
11
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
12
|
+
def self.attribute_map
|
|
13
|
+
{
|
|
14
|
+
:'file_format' => :'file_format',
|
|
15
|
+
:'original_representation' => :'original_representation'
|
|
16
|
+
}
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Attribute type mapping.
|
|
20
|
+
def self.openapi_types
|
|
21
|
+
{
|
|
22
|
+
:'file_format' => :'String',
|
|
23
|
+
:'original_representation' => :'String'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# List of attributes with nullable: true
|
|
28
|
+
def self.openapi_nullable
|
|
29
|
+
Set.new([
|
|
30
|
+
])
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
if (!attributes.is_a?(Hash))
|
|
37
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::KeyFormatAnnotationsList200ResponseInner` initialize method"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
42
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
43
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::KeyFormatAnnotationsList200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
44
|
+
end
|
|
45
|
+
h[k.to_sym] = v
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if attributes.key?(:'file_format')
|
|
49
|
+
self.file_format = attributes[:'file_format']
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if attributes.key?(:'original_representation')
|
|
53
|
+
self.original_representation = attributes[:'original_representation']
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
58
|
+
# @return Array for valid properties with the reasons
|
|
59
|
+
def list_invalid_properties
|
|
60
|
+
invalid_properties = Array.new
|
|
61
|
+
invalid_properties
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Check to see if the all the properties in the model are valid
|
|
65
|
+
# @return true if the model is valid
|
|
66
|
+
def valid?
|
|
67
|
+
true
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Checks equality by comparing each attribute.
|
|
71
|
+
# @param [Object] Object to be compared
|
|
72
|
+
def ==(o)
|
|
73
|
+
return true if self.equal?(o)
|
|
74
|
+
self.class == o.class &&
|
|
75
|
+
file_format == o.file_format &&
|
|
76
|
+
original_representation == o.original_representation
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @see the `==` method
|
|
80
|
+
# @param [Object] Object to be compared
|
|
81
|
+
def eql?(o)
|
|
82
|
+
self == o
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Calculates hash code according to all attributes.
|
|
86
|
+
# @return [Integer] Hash code
|
|
87
|
+
def hash
|
|
88
|
+
[file_format, original_representation].hash
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Builds the object from hash
|
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
|
+
# @return [Object] Returns the model itself
|
|
94
|
+
def self.build_from_hash(attributes)
|
|
95
|
+
new.build_from_hash(attributes)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Builds the object from hash
|
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
|
+
# @return [Object] Returns the model itself
|
|
101
|
+
def build_from_hash(attributes)
|
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
|
103
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
|
105
|
+
# check to ensure the input is an array given that the attribute
|
|
106
|
+
# is documented as an array but the input is not
|
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
108
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
109
|
+
end
|
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
112
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
self
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Deserializes the data based on type
|
|
119
|
+
# @param string type Data type
|
|
120
|
+
# @param string value Value to be deserialized
|
|
121
|
+
# @return [Object] Deserialized data
|
|
122
|
+
def _deserialize(type, value)
|
|
123
|
+
case type.to_sym
|
|
124
|
+
when :DateTime
|
|
125
|
+
DateTime.parse(value)
|
|
126
|
+
when :Date
|
|
127
|
+
Date.parse(value)
|
|
128
|
+
when :Time
|
|
129
|
+
Time.parse(value)
|
|
130
|
+
when :String
|
|
131
|
+
value.to_s
|
|
132
|
+
when :Integer
|
|
133
|
+
value.to_i
|
|
134
|
+
when :Float
|
|
135
|
+
value.to_f
|
|
136
|
+
when :Boolean
|
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
138
|
+
true
|
|
139
|
+
else
|
|
140
|
+
false
|
|
141
|
+
end
|
|
142
|
+
when :Object
|
|
143
|
+
# generic object (usually a Hash), return directly
|
|
144
|
+
value
|
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
|
151
|
+
{}.tap do |hash|
|
|
152
|
+
value.each do |k, v|
|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
else # model
|
|
157
|
+
Phrase.const_get(type).build_from_hash(value)
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the string representation of the object
|
|
162
|
+
# @return [String] String presentation of the object
|
|
163
|
+
def to_s
|
|
164
|
+
to_hash.to_s
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
|
169
|
+
def to_body
|
|
170
|
+
to_hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
if value.nil?
|
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
hash[param] = _to_hash(value)
|
|
185
|
+
end
|
|
186
|
+
hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Outputs non-array value in the form of hash
|
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
191
|
+
# @param [Object] value Any valid value
|
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
|
193
|
+
def _to_hash(value)
|
|
194
|
+
if value.is_a?(Array)
|
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
|
196
|
+
elsif value.is_a?(Hash)
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
199
|
+
end
|
|
200
|
+
elsif value.respond_to? :to_hash
|
|
201
|
+
value.to_hash
|
|
202
|
+
else
|
|
203
|
+
value
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
@@ -2,17 +2,43 @@ require 'date'
|
|
|
2
2
|
|
|
3
3
|
module Phrase
|
|
4
4
|
class KeyLinksBatchDestroyParameters
|
|
5
|
-
#
|
|
5
|
+
# Codes of the child keys to unlink. Required when unlink_parent is false or omitted. Ignored when unlink_parent is true.
|
|
6
6
|
attr_accessor :child_key_ids
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# When true, dissolves the entire linked-key group by unlinking all children and removing the group. The child_key_ids field is ignored when this is set to true.
|
|
9
9
|
attr_accessor :unlink_parent
|
|
10
10
|
|
|
11
|
+
# Controls what happens to child key translation content after unlinking. keep_content (default) copies the parent translation into each child; remove_content clears each child translation.
|
|
12
|
+
attr_accessor :strategy
|
|
13
|
+
|
|
14
|
+
class EnumAttributeValidator
|
|
15
|
+
attr_reader :datatype
|
|
16
|
+
attr_reader :allowable_values
|
|
17
|
+
|
|
18
|
+
def initialize(datatype, allowable_values)
|
|
19
|
+
@allowable_values = allowable_values.map do |value|
|
|
20
|
+
case datatype.to_s
|
|
21
|
+
when /Integer/i
|
|
22
|
+
value.to_i
|
|
23
|
+
when /Float/i
|
|
24
|
+
value.to_f
|
|
25
|
+
else
|
|
26
|
+
value
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def valid?(value)
|
|
32
|
+
!value || allowable_values.include?(value)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
11
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
12
37
|
def self.attribute_map
|
|
13
38
|
{
|
|
14
39
|
:'child_key_ids' => :'child_key_ids',
|
|
15
|
-
:'unlink_parent' => :'unlink_parent'
|
|
40
|
+
:'unlink_parent' => :'unlink_parent',
|
|
41
|
+
:'strategy' => :'strategy'
|
|
16
42
|
}
|
|
17
43
|
end
|
|
18
44
|
|
|
@@ -20,7 +46,8 @@ module Phrase
|
|
|
20
46
|
def self.openapi_types
|
|
21
47
|
{
|
|
22
48
|
:'child_key_ids' => :'Array<String>',
|
|
23
|
-
:'unlink_parent' => :'Boolean'
|
|
49
|
+
:'unlink_parent' => :'Boolean',
|
|
50
|
+
:'strategy' => :'String'
|
|
24
51
|
}
|
|
25
52
|
end
|
|
26
53
|
|
|
@@ -56,6 +83,12 @@ module Phrase
|
|
|
56
83
|
else
|
|
57
84
|
self.unlink_parent = false
|
|
58
85
|
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'strategy')
|
|
88
|
+
self.strategy = attributes[:'strategy']
|
|
89
|
+
else
|
|
90
|
+
self.strategy = 'keep_content'
|
|
91
|
+
end
|
|
59
92
|
end
|
|
60
93
|
|
|
61
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -73,16 +106,29 @@ module Phrase
|
|
|
73
106
|
# @return true if the model is valid
|
|
74
107
|
def valid?
|
|
75
108
|
return false if @child_key_ids.nil?
|
|
109
|
+
strategy_validator = EnumAttributeValidator.new('String', ["keep_content", "remove_content"])
|
|
110
|
+
return false unless strategy_validator.valid?(@strategy)
|
|
76
111
|
true
|
|
77
112
|
end
|
|
78
113
|
|
|
114
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
115
|
+
# @param [Object] strategy Object to be assigned
|
|
116
|
+
def strategy=(strategy)
|
|
117
|
+
validator = EnumAttributeValidator.new('String', ["keep_content", "remove_content"])
|
|
118
|
+
unless validator.valid?(strategy)
|
|
119
|
+
fail ArgumentError, "invalid value for \"strategy\", must be one of #{validator.allowable_values}."
|
|
120
|
+
end
|
|
121
|
+
@strategy = strategy
|
|
122
|
+
end
|
|
123
|
+
|
|
79
124
|
# Checks equality by comparing each attribute.
|
|
80
125
|
# @param [Object] Object to be compared
|
|
81
126
|
def ==(o)
|
|
82
127
|
return true if self.equal?(o)
|
|
83
128
|
self.class == o.class &&
|
|
84
129
|
child_key_ids == o.child_key_ids &&
|
|
85
|
-
unlink_parent == o.unlink_parent
|
|
130
|
+
unlink_parent == o.unlink_parent &&
|
|
131
|
+
strategy == o.strategy
|
|
86
132
|
end
|
|
87
133
|
|
|
88
134
|
# @see the `==` method
|
|
@@ -94,7 +140,7 @@ module Phrase
|
|
|
94
140
|
# Calculates hash code according to all attributes.
|
|
95
141
|
# @return [Integer] Hash code
|
|
96
142
|
def hash
|
|
97
|
-
[child_key_ids, unlink_parent].hash
|
|
143
|
+
[child_key_ids, unlink_parent, strategy].hash
|
|
98
144
|
end
|
|
99
145
|
|
|
100
146
|
# Builds the object from hash
|
|
@@ -2,7 +2,7 @@ require 'date'
|
|
|
2
2
|
|
|
3
3
|
module Phrase
|
|
4
4
|
class KeyLinksCreateParameters
|
|
5
|
-
#
|
|
5
|
+
# Codes of the keys to link as children. Pass an empty array to mark the parent key without linking any children.
|
|
6
6
|
attr_accessor :child_key_ids
|
|
7
7
|
|
|
8
8
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/phrase/models/locale.rb
CHANGED
|
@@ -22,6 +22,8 @@ module Phrase
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :fallback_locale
|
|
24
24
|
|
|
25
|
+
attr_accessor :language_ai_profile
|
|
26
|
+
|
|
25
27
|
attr_accessor :created_at
|
|
26
28
|
|
|
27
29
|
attr_accessor :updated_at
|
|
@@ -39,6 +41,7 @@ module Phrase
|
|
|
39
41
|
:'ordinal_plural_forms' => :'ordinal_plural_forms',
|
|
40
42
|
:'source_locale' => :'source_locale',
|
|
41
43
|
:'fallback_locale' => :'fallback_locale',
|
|
44
|
+
:'language_ai_profile' => :'language_ai_profile',
|
|
42
45
|
:'created_at' => :'created_at',
|
|
43
46
|
:'updated_at' => :'updated_at'
|
|
44
47
|
}
|
|
@@ -57,6 +60,7 @@ module Phrase
|
|
|
57
60
|
:'ordinal_plural_forms' => :'Array<String>',
|
|
58
61
|
:'source_locale' => :'LocalePreview',
|
|
59
62
|
:'fallback_locale' => :'LocalePreview',
|
|
63
|
+
:'language_ai_profile' => :'String',
|
|
60
64
|
:'created_at' => :'DateTime',
|
|
61
65
|
:'updated_at' => :'DateTime'
|
|
62
66
|
}
|
|
@@ -127,6 +131,10 @@ module Phrase
|
|
|
127
131
|
self.fallback_locale = attributes[:'fallback_locale']
|
|
128
132
|
end
|
|
129
133
|
|
|
134
|
+
if attributes.key?(:'language_ai_profile')
|
|
135
|
+
self.language_ai_profile = attributes[:'language_ai_profile']
|
|
136
|
+
end
|
|
137
|
+
|
|
130
138
|
if attributes.key?(:'created_at')
|
|
131
139
|
self.created_at = attributes[:'created_at']
|
|
132
140
|
end
|
|
@@ -164,6 +172,7 @@ module Phrase
|
|
|
164
172
|
ordinal_plural_forms == o.ordinal_plural_forms &&
|
|
165
173
|
source_locale == o.source_locale &&
|
|
166
174
|
fallback_locale == o.fallback_locale &&
|
|
175
|
+
language_ai_profile == o.language_ai_profile &&
|
|
167
176
|
created_at == o.created_at &&
|
|
168
177
|
updated_at == o.updated_at
|
|
169
178
|
end
|
|
@@ -177,7 +186,7 @@ module Phrase
|
|
|
177
186
|
# Calculates hash code according to all attributes.
|
|
178
187
|
# @return [Integer] Hash code
|
|
179
188
|
def hash
|
|
180
|
-
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
|
|
189
|
+
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, created_at, updated_at].hash
|
|
181
190
|
end
|
|
182
191
|
|
|
183
192
|
# Builds the object from hash
|
|
@@ -35,6 +35,9 @@ module Phrase
|
|
|
35
35
|
# If set, translations for this locale will be fetched automatically, right after creation.
|
|
36
36
|
attr_accessor :autotranslate
|
|
37
37
|
|
|
38
|
+
# Identifier of the Language AI profile to use for this locale.
|
|
39
|
+
attr_accessor :language_ai_profile
|
|
40
|
+
|
|
38
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
42
|
def self.attribute_map
|
|
40
43
|
{
|
|
@@ -48,7 +51,8 @@ module Phrase
|
|
|
48
51
|
:'fallback_locale_id' => :'fallback_locale_id',
|
|
49
52
|
:'unverify_new_translations' => :'unverify_new_translations',
|
|
50
53
|
:'unverify_updated_translations' => :'unverify_updated_translations',
|
|
51
|
-
:'autotranslate' => :'autotranslate'
|
|
54
|
+
:'autotranslate' => :'autotranslate',
|
|
55
|
+
:'language_ai_profile' => :'language_ai_profile'
|
|
52
56
|
}
|
|
53
57
|
end
|
|
54
58
|
|
|
@@ -65,7 +69,8 @@ module Phrase
|
|
|
65
69
|
:'fallback_locale_id' => :'String',
|
|
66
70
|
:'unverify_new_translations' => :'Boolean',
|
|
67
71
|
:'unverify_updated_translations' => :'Boolean',
|
|
68
|
-
:'autotranslate' => :'Boolean'
|
|
72
|
+
:'autotranslate' => :'Boolean',
|
|
73
|
+
:'language_ai_profile' => :'String'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -133,6 +138,10 @@ module Phrase
|
|
|
133
138
|
if attributes.key?(:'autotranslate')
|
|
134
139
|
self.autotranslate = attributes[:'autotranslate']
|
|
135
140
|
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'language_ai_profile')
|
|
143
|
+
self.language_ai_profile = attributes[:'language_ai_profile']
|
|
144
|
+
end
|
|
136
145
|
end
|
|
137
146
|
|
|
138
147
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -173,7 +182,8 @@ module Phrase
|
|
|
173
182
|
fallback_locale_id == o.fallback_locale_id &&
|
|
174
183
|
unverify_new_translations == o.unverify_new_translations &&
|
|
175
184
|
unverify_updated_translations == o.unverify_updated_translations &&
|
|
176
|
-
autotranslate == o.autotranslate
|
|
185
|
+
autotranslate == o.autotranslate &&
|
|
186
|
+
language_ai_profile == o.language_ai_profile
|
|
177
187
|
end
|
|
178
188
|
|
|
179
189
|
# @see the `==` method
|
|
@@ -185,7 +195,7 @@ module Phrase
|
|
|
185
195
|
# Calculates hash code according to all attributes.
|
|
186
196
|
# @return [Integer] Hash code
|
|
187
197
|
def hash
|
|
188
|
-
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
|
198
|
+
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate, language_ai_profile].hash
|
|
189
199
|
end
|
|
190
200
|
|
|
191
201
|
# Builds the object from hash
|
|
@@ -22,6 +22,8 @@ module Phrase
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :fallback_locale
|
|
24
24
|
|
|
25
|
+
attr_accessor :language_ai_profile
|
|
26
|
+
|
|
25
27
|
attr_accessor :created_at
|
|
26
28
|
|
|
27
29
|
attr_accessor :updated_at
|
|
@@ -41,6 +43,7 @@ module Phrase
|
|
|
41
43
|
:'ordinal_plural_forms' => :'ordinal_plural_forms',
|
|
42
44
|
:'source_locale' => :'source_locale',
|
|
43
45
|
:'fallback_locale' => :'fallback_locale',
|
|
46
|
+
:'language_ai_profile' => :'language_ai_profile',
|
|
44
47
|
:'created_at' => :'created_at',
|
|
45
48
|
:'updated_at' => :'updated_at',
|
|
46
49
|
:'statistics' => :'statistics'
|
|
@@ -60,6 +63,7 @@ module Phrase
|
|
|
60
63
|
:'ordinal_plural_forms' => :'Array<String>',
|
|
61
64
|
:'source_locale' => :'LocalePreview',
|
|
62
65
|
:'fallback_locale' => :'LocalePreview',
|
|
66
|
+
:'language_ai_profile' => :'String',
|
|
63
67
|
:'created_at' => :'DateTime',
|
|
64
68
|
:'updated_at' => :'DateTime',
|
|
65
69
|
:'statistics' => :'LocaleStatistics'
|
|
@@ -138,6 +142,10 @@ module Phrase
|
|
|
138
142
|
self.fallback_locale = attributes[:'fallback_locale']
|
|
139
143
|
end
|
|
140
144
|
|
|
145
|
+
if attributes.key?(:'language_ai_profile')
|
|
146
|
+
self.language_ai_profile = attributes[:'language_ai_profile']
|
|
147
|
+
end
|
|
148
|
+
|
|
141
149
|
if attributes.key?(:'created_at')
|
|
142
150
|
self.created_at = attributes[:'created_at']
|
|
143
151
|
end
|
|
@@ -179,6 +187,7 @@ module Phrase
|
|
|
179
187
|
ordinal_plural_forms == o.ordinal_plural_forms &&
|
|
180
188
|
source_locale == o.source_locale &&
|
|
181
189
|
fallback_locale == o.fallback_locale &&
|
|
190
|
+
language_ai_profile == o.language_ai_profile &&
|
|
182
191
|
created_at == o.created_at &&
|
|
183
192
|
updated_at == o.updated_at &&
|
|
184
193
|
statistics == o.statistics
|
|
@@ -193,7 +202,7 @@ module Phrase
|
|
|
193
202
|
# Calculates hash code according to all attributes.
|
|
194
203
|
# @return [Integer] Hash code
|
|
195
204
|
def hash
|
|
196
|
-
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, created_at, updated_at, statistics].hash
|
|
205
|
+
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, created_at, updated_at, statistics].hash
|
|
197
206
|
end
|
|
198
207
|
|
|
199
208
|
# Builds the object from hash
|
|
@@ -53,6 +53,12 @@ module Phrase
|
|
|
53
53
|
# Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
|
|
54
54
|
attr_accessor :custom_metadata_filters
|
|
55
55
|
|
|
56
|
+
# Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
|
|
57
|
+
attr_accessor :translation_key_prefix
|
|
58
|
+
|
|
59
|
+
# Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.
|
|
60
|
+
attr_accessor :filter_by_prefix
|
|
61
|
+
|
|
56
62
|
# Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
|
|
57
63
|
attr_accessor :updated_since
|
|
58
64
|
|
|
@@ -76,6 +82,8 @@ module Phrase
|
|
|
76
82
|
:'fallback_for_unverified_translations' => :'fallback_for_unverified_translations',
|
|
77
83
|
:'source_locale_id' => :'source_locale_id',
|
|
78
84
|
:'custom_metadata_filters' => :'custom_metadata_filters',
|
|
85
|
+
:'translation_key_prefix' => :'translation_key_prefix',
|
|
86
|
+
:'filter_by_prefix' => :'filter_by_prefix',
|
|
79
87
|
:'updated_since' => :'updated_since'
|
|
80
88
|
}
|
|
81
89
|
end
|
|
@@ -100,6 +108,8 @@ module Phrase
|
|
|
100
108
|
:'fallback_for_unverified_translations' => :'Boolean',
|
|
101
109
|
:'source_locale_id' => :'String',
|
|
102
110
|
:'custom_metadata_filters' => :'Object',
|
|
111
|
+
:'translation_key_prefix' => :'String',
|
|
112
|
+
:'filter_by_prefix' => :'Boolean',
|
|
103
113
|
:'updated_since' => :'String'
|
|
104
114
|
}
|
|
105
115
|
end
|
|
@@ -195,6 +205,14 @@ module Phrase
|
|
|
195
205
|
self.custom_metadata_filters = attributes[:'custom_metadata_filters']
|
|
196
206
|
end
|
|
197
207
|
|
|
208
|
+
if attributes.key?(:'translation_key_prefix')
|
|
209
|
+
self.translation_key_prefix = attributes[:'translation_key_prefix']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'filter_by_prefix')
|
|
213
|
+
self.filter_by_prefix = attributes[:'filter_by_prefix']
|
|
214
|
+
end
|
|
215
|
+
|
|
198
216
|
if attributes.key?(:'updated_since')
|
|
199
217
|
self.updated_since = attributes[:'updated_since']
|
|
200
218
|
end
|
|
@@ -240,6 +258,8 @@ module Phrase
|
|
|
240
258
|
fallback_for_unverified_translations == o.fallback_for_unverified_translations &&
|
|
241
259
|
source_locale_id == o.source_locale_id &&
|
|
242
260
|
custom_metadata_filters == o.custom_metadata_filters &&
|
|
261
|
+
translation_key_prefix == o.translation_key_prefix &&
|
|
262
|
+
filter_by_prefix == o.filter_by_prefix &&
|
|
243
263
|
updated_since == o.updated_since
|
|
244
264
|
end
|
|
245
265
|
|
|
@@ -252,7 +272,7 @@ module Phrase
|
|
|
252
272
|
# Calculates hash code according to all attributes.
|
|
253
273
|
# @return [Integer] Hash code
|
|
254
274
|
def hash
|
|
255
|
-
[file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, use_locale_fallback, fallback_for_unverified_translations, source_locale_id, custom_metadata_filters, updated_since].hash
|
|
275
|
+
[file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, use_locale_fallback, fallback_for_unverified_translations, source_locale_id, custom_metadata_filters, translation_key_prefix, filter_by_prefix, updated_since].hash
|
|
256
276
|
end
|
|
257
277
|
|
|
258
278
|
# Builds the object from hash
|
|
@@ -35,6 +35,9 @@ module Phrase
|
|
|
35
35
|
# If set, translations for this locale will be fetched automatically, right after creation.
|
|
36
36
|
attr_accessor :autotranslate
|
|
37
37
|
|
|
38
|
+
# Identifier of the Language AI profile to use for this locale.
|
|
39
|
+
attr_accessor :language_ai_profile
|
|
40
|
+
|
|
38
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
42
|
def self.attribute_map
|
|
40
43
|
{
|
|
@@ -48,7 +51,8 @@ module Phrase
|
|
|
48
51
|
:'fallback_locale_id' => :'fallback_locale_id',
|
|
49
52
|
:'unverify_new_translations' => :'unverify_new_translations',
|
|
50
53
|
:'unverify_updated_translations' => :'unverify_updated_translations',
|
|
51
|
-
:'autotranslate' => :'autotranslate'
|
|
54
|
+
:'autotranslate' => :'autotranslate',
|
|
55
|
+
:'language_ai_profile' => :'language_ai_profile'
|
|
52
56
|
}
|
|
53
57
|
end
|
|
54
58
|
|
|
@@ -65,7 +69,8 @@ module Phrase
|
|
|
65
69
|
:'fallback_locale_id' => :'String',
|
|
66
70
|
:'unverify_new_translations' => :'Boolean',
|
|
67
71
|
:'unverify_updated_translations' => :'Boolean',
|
|
68
|
-
:'autotranslate' => :'Boolean'
|
|
72
|
+
:'autotranslate' => :'Boolean',
|
|
73
|
+
:'language_ai_profile' => :'String'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -133,6 +138,10 @@ module Phrase
|
|
|
133
138
|
if attributes.key?(:'autotranslate')
|
|
134
139
|
self.autotranslate = attributes[:'autotranslate']
|
|
135
140
|
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'language_ai_profile')
|
|
143
|
+
self.language_ai_profile = attributes[:'language_ai_profile']
|
|
144
|
+
end
|
|
136
145
|
end
|
|
137
146
|
|
|
138
147
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -163,7 +172,8 @@ module Phrase
|
|
|
163
172
|
fallback_locale_id == o.fallback_locale_id &&
|
|
164
173
|
unverify_new_translations == o.unverify_new_translations &&
|
|
165
174
|
unverify_updated_translations == o.unverify_updated_translations &&
|
|
166
|
-
autotranslate == o.autotranslate
|
|
175
|
+
autotranslate == o.autotranslate &&
|
|
176
|
+
language_ai_profile == o.language_ai_profile
|
|
167
177
|
end
|
|
168
178
|
|
|
169
179
|
# @see the `==` method
|
|
@@ -175,7 +185,7 @@ module Phrase
|
|
|
175
185
|
# Calculates hash code according to all attributes.
|
|
176
186
|
# @return [Integer] Hash code
|
|
177
187
|
def hash
|
|
178
|
-
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
|
|
188
|
+
[branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate, language_ai_profile].hash
|
|
179
189
|
end
|
|
180
190
|
|
|
181
191
|
# Builds the object from hash
|