phrase 4.26.0 → 4.27.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 +10 -0
- data/README.md +14 -3
- data/docs/CheckIssue.md +33 -0
- data/docs/ChecksApi.md +146 -0
- data/docs/JobCreateParameters.md +1 -1
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/Locale.md +6 -0
- data/docs/LocaleCreateParameters.md +2 -0
- data/docs/LocaleDetails.md +6 -0
- data/docs/LocaleUpdateParameters.md +2 -0
- data/docs/MachineTranslationApi.md +263 -0
- data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
- data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
- data/docs/MachineTranslationSettings.md +23 -0
- data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
- data/docs/ProjectCreateParameters.md +8 -2
- data/docs/ProjectDetails.md +3 -1
- data/docs/ProjectUpdateParameters.md +8 -2
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/Upload.md +3 -1
- data/docs/UploadsApi.md +4 -4
- data/lib/phrase/api/checks_api.rb +174 -0
- data/lib/phrase/api/machine_translation_api.rb +302 -0
- data/lib/phrase/api/uploads_api.rb +6 -6
- data/lib/phrase/models/check_issue.rb +319 -0
- data/lib/phrase/models/job_create_parameters.rb +1 -1
- data/lib/phrase/models/locale.rb +31 -1
- data/lib/phrase/models/locale_create_parameters.rb +11 -1
- data/lib/phrase/models/locale_details.rb +31 -1
- data/lib/phrase/models/locale_update_parameters.rb +11 -1
- data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
- data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
- data/lib/phrase/models/machine_translation_settings.rb +230 -0
- data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
- data/lib/phrase/models/project_create_parameters.rb +35 -1
- data/lib/phrase/models/project_details.rb +10 -1
- data/lib/phrase/models/project_update_parameters.rb +35 -1
- data/lib/phrase/models/upload.rb +13 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +7 -0
- data/spec/api/checks_api_spec.rb +56 -0
- data/spec/api/machine_translation_api_spec.rb +79 -0
- data/spec/models/check_issue_spec.rb +85 -0
- data/spec/models/locale_create_parameters_spec.rb +6 -0
- data/spec/models/locale_details_spec.rb +18 -0
- data/spec/models/locale_spec.rb +18 -0
- data/spec/models/locale_update_parameters_spec.rb +6 -0
- data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
- data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
- data/spec/models/machine_translation_settings_spec.rb +47 -0
- data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
- data/spec/models/project_create_parameters_spec.rb +18 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_update_parameters_spec.rb +18 -0
- data/spec/models/upload_spec.rb +6 -0
- metadata +292 -264
|
@@ -14,6 +14,12 @@ module Phrase
|
|
|
14
14
|
# Indicates whether the project should share the account's translation memory
|
|
15
15
|
attr_accessor :shares_translation_memory
|
|
16
16
|
|
|
17
|
+
# List of TMS translation memory IDs, used to provide reference translations for the AI translation agent.
|
|
18
|
+
attr_accessor :tm_ids
|
|
19
|
+
|
|
20
|
+
# List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent.
|
|
21
|
+
attr_accessor :term_base_ids
|
|
22
|
+
|
|
17
23
|
# Image to identify the project
|
|
18
24
|
attr_accessor :project_image
|
|
19
25
|
|
|
@@ -74,6 +80,9 @@ module Phrase
|
|
|
74
80
|
# (Optional) Requires autotranslate_enabled to be true
|
|
75
81
|
attr_accessor :autotranslate_overwrite_unverified_translations
|
|
76
82
|
|
|
83
|
+
# (Optional) When enabled, the fallback locale's translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale.
|
|
84
|
+
attr_accessor :fallback_for_unverified_translations
|
|
85
|
+
|
|
77
86
|
# (Optional) Enable autocomplete-job behavior so that newly created keys and locales are automatically added to in-progress jobs.
|
|
78
87
|
attr_accessor :autocomplete_job_enabled
|
|
79
88
|
|
|
@@ -130,6 +139,8 @@ module Phrase
|
|
|
130
139
|
:'main_format' => :'main_format',
|
|
131
140
|
:'media' => :'media',
|
|
132
141
|
:'shares_translation_memory' => :'shares_translation_memory',
|
|
142
|
+
:'tm_ids' => :'tm_ids',
|
|
143
|
+
:'term_base_ids' => :'term_base_ids',
|
|
133
144
|
:'project_image' => :'project_image',
|
|
134
145
|
:'remove_project_image' => :'remove_project_image',
|
|
135
146
|
:'account_id' => :'account_id',
|
|
@@ -150,6 +161,7 @@ module Phrase
|
|
|
150
161
|
:'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
|
|
151
162
|
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
|
|
152
163
|
:'autotranslate_overwrite_unverified_translations' => :'autotranslate_overwrite_unverified_translations',
|
|
164
|
+
:'fallback_for_unverified_translations' => :'fallback_for_unverified_translations',
|
|
153
165
|
:'autocomplete_job_enabled' => :'autocomplete_job_enabled',
|
|
154
166
|
:'job_locking_enabled' => :'job_locking_enabled',
|
|
155
167
|
:'smart_suggest_enabled' => :'smart_suggest_enabled',
|
|
@@ -169,6 +181,8 @@ module Phrase
|
|
|
169
181
|
:'main_format' => :'String',
|
|
170
182
|
:'media' => :'String',
|
|
171
183
|
:'shares_translation_memory' => :'Boolean',
|
|
184
|
+
:'tm_ids' => :'Array<String>',
|
|
185
|
+
:'term_base_ids' => :'Array<String>',
|
|
172
186
|
:'project_image' => :'File',
|
|
173
187
|
:'remove_project_image' => :'Boolean',
|
|
174
188
|
:'account_id' => :'String',
|
|
@@ -189,6 +203,7 @@ module Phrase
|
|
|
189
203
|
:'autotranslate_use_machine_translation' => :'Boolean',
|
|
190
204
|
:'autotranslate_use_translation_memory' => :'Boolean',
|
|
191
205
|
:'autotranslate_overwrite_unverified_translations' => :'Boolean',
|
|
206
|
+
:'fallback_for_unverified_translations' => :'Boolean',
|
|
192
207
|
:'autocomplete_job_enabled' => :'Boolean',
|
|
193
208
|
:'job_locking_enabled' => :'Boolean',
|
|
194
209
|
:'smart_suggest_enabled' => :'Boolean',
|
|
@@ -238,6 +253,18 @@ module Phrase
|
|
|
238
253
|
self.shares_translation_memory = attributes[:'shares_translation_memory']
|
|
239
254
|
end
|
|
240
255
|
|
|
256
|
+
if attributes.key?(:'tm_ids')
|
|
257
|
+
if (value = attributes[:'tm_ids']).is_a?(Array)
|
|
258
|
+
self.tm_ids = value
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.key?(:'term_base_ids')
|
|
263
|
+
if (value = attributes[:'term_base_ids']).is_a?(Array)
|
|
264
|
+
self.term_base_ids = value
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
241
268
|
if attributes.key?(:'project_image')
|
|
242
269
|
self.project_image = attributes[:'project_image']
|
|
243
270
|
end
|
|
@@ -318,6 +345,10 @@ module Phrase
|
|
|
318
345
|
self.autotranslate_overwrite_unverified_translations = attributes[:'autotranslate_overwrite_unverified_translations']
|
|
319
346
|
end
|
|
320
347
|
|
|
348
|
+
if attributes.key?(:'fallback_for_unverified_translations')
|
|
349
|
+
self.fallback_for_unverified_translations = attributes[:'fallback_for_unverified_translations']
|
|
350
|
+
end
|
|
351
|
+
|
|
321
352
|
if attributes.key?(:'autocomplete_job_enabled')
|
|
322
353
|
self.autocomplete_job_enabled = attributes[:'autocomplete_job_enabled']
|
|
323
354
|
end
|
|
@@ -396,6 +427,8 @@ module Phrase
|
|
|
396
427
|
main_format == o.main_format &&
|
|
397
428
|
media == o.media &&
|
|
398
429
|
shares_translation_memory == o.shares_translation_memory &&
|
|
430
|
+
tm_ids == o.tm_ids &&
|
|
431
|
+
term_base_ids == o.term_base_ids &&
|
|
399
432
|
project_image == o.project_image &&
|
|
400
433
|
remove_project_image == o.remove_project_image &&
|
|
401
434
|
account_id == o.account_id &&
|
|
@@ -416,6 +449,7 @@ module Phrase
|
|
|
416
449
|
autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
|
|
417
450
|
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
|
|
418
451
|
autotranslate_overwrite_unverified_translations == o.autotranslate_overwrite_unverified_translations &&
|
|
452
|
+
fallback_for_unverified_translations == o.fallback_for_unverified_translations &&
|
|
419
453
|
autocomplete_job_enabled == o.autocomplete_job_enabled &&
|
|
420
454
|
job_locking_enabled == o.job_locking_enabled &&
|
|
421
455
|
smart_suggest_enabled == o.smart_suggest_enabled &&
|
|
@@ -436,7 +470,7 @@ module Phrase
|
|
|
436
470
|
# Calculates hash code according to all attributes.
|
|
437
471
|
# @return [Integer] Hash code
|
|
438
472
|
def hash
|
|
439
|
-
[name, main_format, media, shares_translation_memory, project_image, remove_project_image, account_id, point_of_contact, source_project_id, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, autocomplete_job_enabled, job_locking_enabled, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation, translation_keys_sort_collation, default_encoding, cldr_version, placeholder_styles].hash
|
|
473
|
+
[name, main_format, media, shares_translation_memory, tm_ids, term_base_ids, project_image, remove_project_image, account_id, point_of_contact, source_project_id, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, job_locking_enabled, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation, translation_keys_sort_collation, default_encoding, cldr_version, placeholder_styles].hash
|
|
440
474
|
end
|
|
441
475
|
|
|
442
476
|
# Builds the object from hash
|
|
@@ -54,6 +54,8 @@ module Phrase
|
|
|
54
54
|
|
|
55
55
|
attr_accessor :autotranslate_overwrite_unverified_translations
|
|
56
56
|
|
|
57
|
+
attr_accessor :fallback_for_unverified_translations
|
|
58
|
+
|
|
57
59
|
attr_accessor :autocomplete_job_enabled
|
|
58
60
|
|
|
59
61
|
attr_accessor :default_encoding
|
|
@@ -95,6 +97,7 @@ module Phrase
|
|
|
95
97
|
:'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
|
|
96
98
|
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
|
|
97
99
|
:'autotranslate_overwrite_unverified_translations' => :'autotranslate_overwrite_unverified_translations',
|
|
100
|
+
:'fallback_for_unverified_translations' => :'fallback_for_unverified_translations',
|
|
98
101
|
:'autocomplete_job_enabled' => :'autocomplete_job_enabled',
|
|
99
102
|
:'default_encoding' => :'default_encoding',
|
|
100
103
|
:'cldr_version' => :'cldr_version',
|
|
@@ -133,6 +136,7 @@ module Phrase
|
|
|
133
136
|
:'autotranslate_use_machine_translation' => :'Boolean',
|
|
134
137
|
:'autotranslate_use_translation_memory' => :'Boolean',
|
|
135
138
|
:'autotranslate_overwrite_unverified_translations' => :'Boolean',
|
|
139
|
+
:'fallback_for_unverified_translations' => :'Boolean',
|
|
136
140
|
:'autocomplete_job_enabled' => :'Boolean',
|
|
137
141
|
:'default_encoding' => :'String',
|
|
138
142
|
:'cldr_version' => :'String',
|
|
@@ -274,6 +278,10 @@ module Phrase
|
|
|
274
278
|
self.autotranslate_overwrite_unverified_translations = attributes[:'autotranslate_overwrite_unverified_translations']
|
|
275
279
|
end
|
|
276
280
|
|
|
281
|
+
if attributes.key?(:'fallback_for_unverified_translations')
|
|
282
|
+
self.fallback_for_unverified_translations = attributes[:'fallback_for_unverified_translations']
|
|
283
|
+
end
|
|
284
|
+
|
|
277
285
|
if attributes.key?(:'autocomplete_job_enabled')
|
|
278
286
|
self.autocomplete_job_enabled = attributes[:'autocomplete_job_enabled']
|
|
279
287
|
end
|
|
@@ -345,6 +353,7 @@ module Phrase
|
|
|
345
353
|
autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
|
|
346
354
|
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
|
|
347
355
|
autotranslate_overwrite_unverified_translations == o.autotranslate_overwrite_unverified_translations &&
|
|
356
|
+
fallback_for_unverified_translations == o.fallback_for_unverified_translations &&
|
|
348
357
|
autocomplete_job_enabled == o.autocomplete_job_enabled &&
|
|
349
358
|
default_encoding == o.default_encoding &&
|
|
350
359
|
cldr_version == o.cldr_version &&
|
|
@@ -362,7 +371,7 @@ module Phrase
|
|
|
362
371
|
# Calculates hash code according to all attributes.
|
|
363
372
|
# @return [Integer] Hash code
|
|
364
373
|
def hash
|
|
365
|
-
[id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, job_locking_enabled, placeholder_styles, branch].hash
|
|
374
|
+
[id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, job_locking_enabled, placeholder_styles, branch].hash
|
|
366
375
|
end
|
|
367
376
|
|
|
368
377
|
# Builds the object from hash
|
|
@@ -20,6 +20,12 @@ module Phrase
|
|
|
20
20
|
# (Optional) Indicates whether the project should share the account's translation memory
|
|
21
21
|
attr_accessor :shares_translation_memory
|
|
22
22
|
|
|
23
|
+
# List of TMS translation memory IDs, used to provide reference translations for the AI translation agent.
|
|
24
|
+
attr_accessor :tm_ids
|
|
25
|
+
|
|
26
|
+
# List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent.
|
|
27
|
+
attr_accessor :term_base_ids
|
|
28
|
+
|
|
23
29
|
# (Optional) Image to identify the project
|
|
24
30
|
attr_accessor :project_image
|
|
25
31
|
|
|
@@ -71,6 +77,9 @@ module Phrase
|
|
|
71
77
|
# (Optional) Requires autotranslate_enabled to be true
|
|
72
78
|
attr_accessor :autotranslate_overwrite_unverified_translations
|
|
73
79
|
|
|
80
|
+
# (Optional) When enabled, the fallback locale's translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale.
|
|
81
|
+
attr_accessor :fallback_for_unverified_translations
|
|
82
|
+
|
|
74
83
|
# (Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the [`file_encoding`](/en/api/strings/uploads/upload-a-new-file) parameter for Uploads.
|
|
75
84
|
attr_accessor :default_encoding
|
|
76
85
|
|
|
@@ -129,6 +138,8 @@ module Phrase
|
|
|
129
138
|
:'main_format' => :'main_format',
|
|
130
139
|
:'media' => :'media',
|
|
131
140
|
:'shares_translation_memory' => :'shares_translation_memory',
|
|
141
|
+
:'tm_ids' => :'tm_ids',
|
|
142
|
+
:'term_base_ids' => :'term_base_ids',
|
|
132
143
|
:'project_image' => :'project_image',
|
|
133
144
|
:'remove_project_image' => :'remove_project_image',
|
|
134
145
|
:'workflow' => :'workflow',
|
|
@@ -146,6 +157,7 @@ module Phrase
|
|
|
146
157
|
:'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
|
|
147
158
|
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
|
|
148
159
|
:'autotranslate_overwrite_unverified_translations' => :'autotranslate_overwrite_unverified_translations',
|
|
160
|
+
:'fallback_for_unverified_translations' => :'fallback_for_unverified_translations',
|
|
149
161
|
:'default_encoding' => :'default_encoding',
|
|
150
162
|
:'placeholder_styles' => :'placeholder_styles',
|
|
151
163
|
:'autocomplete_job_enabled' => :'autocomplete_job_enabled',
|
|
@@ -167,6 +179,8 @@ module Phrase
|
|
|
167
179
|
:'main_format' => :'String',
|
|
168
180
|
:'media' => :'String',
|
|
169
181
|
:'shares_translation_memory' => :'Boolean',
|
|
182
|
+
:'tm_ids' => :'Array<String>',
|
|
183
|
+
:'term_base_ids' => :'Array<String>',
|
|
170
184
|
:'project_image' => :'File',
|
|
171
185
|
:'remove_project_image' => :'Boolean',
|
|
172
186
|
:'workflow' => :'String',
|
|
@@ -184,6 +198,7 @@ module Phrase
|
|
|
184
198
|
:'autotranslate_use_machine_translation' => :'Boolean',
|
|
185
199
|
:'autotranslate_use_translation_memory' => :'Boolean',
|
|
186
200
|
:'autotranslate_overwrite_unverified_translations' => :'Boolean',
|
|
201
|
+
:'fallback_for_unverified_translations' => :'Boolean',
|
|
187
202
|
:'default_encoding' => :'String',
|
|
188
203
|
:'placeholder_styles' => :'Array<String>',
|
|
189
204
|
:'autocomplete_job_enabled' => :'Boolean',
|
|
@@ -241,6 +256,18 @@ module Phrase
|
|
|
241
256
|
self.shares_translation_memory = attributes[:'shares_translation_memory']
|
|
242
257
|
end
|
|
243
258
|
|
|
259
|
+
if attributes.key?(:'tm_ids')
|
|
260
|
+
if (value = attributes[:'tm_ids']).is_a?(Array)
|
|
261
|
+
self.tm_ids = value
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
if attributes.key?(:'term_base_ids')
|
|
266
|
+
if (value = attributes[:'term_base_ids']).is_a?(Array)
|
|
267
|
+
self.term_base_ids = value
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
244
271
|
if attributes.key?(:'project_image')
|
|
245
272
|
self.project_image = attributes[:'project_image']
|
|
246
273
|
end
|
|
@@ -309,6 +336,10 @@ module Phrase
|
|
|
309
336
|
self.autotranslate_overwrite_unverified_translations = attributes[:'autotranslate_overwrite_unverified_translations']
|
|
310
337
|
end
|
|
311
338
|
|
|
339
|
+
if attributes.key?(:'fallback_for_unverified_translations')
|
|
340
|
+
self.fallback_for_unverified_translations = attributes[:'fallback_for_unverified_translations']
|
|
341
|
+
end
|
|
342
|
+
|
|
312
343
|
if attributes.key?(:'default_encoding')
|
|
313
344
|
self.default_encoding = attributes[:'default_encoding']
|
|
314
345
|
end
|
|
@@ -384,6 +415,8 @@ module Phrase
|
|
|
384
415
|
main_format == o.main_format &&
|
|
385
416
|
media == o.media &&
|
|
386
417
|
shares_translation_memory == o.shares_translation_memory &&
|
|
418
|
+
tm_ids == o.tm_ids &&
|
|
419
|
+
term_base_ids == o.term_base_ids &&
|
|
387
420
|
project_image == o.project_image &&
|
|
388
421
|
remove_project_image == o.remove_project_image &&
|
|
389
422
|
workflow == o.workflow &&
|
|
@@ -401,6 +434,7 @@ module Phrase
|
|
|
401
434
|
autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
|
|
402
435
|
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
|
|
403
436
|
autotranslate_overwrite_unverified_translations == o.autotranslate_overwrite_unverified_translations &&
|
|
437
|
+
fallback_for_unverified_translations == o.fallback_for_unverified_translations &&
|
|
404
438
|
default_encoding == o.default_encoding &&
|
|
405
439
|
placeholder_styles == o.placeholder_styles &&
|
|
406
440
|
autocomplete_job_enabled == o.autocomplete_job_enabled &&
|
|
@@ -421,7 +455,7 @@ module Phrase
|
|
|
421
455
|
# Calculates hash code according to all attributes.
|
|
422
456
|
# @return [Integer] Hash code
|
|
423
457
|
def hash
|
|
424
|
-
[account_id, name, point_of_contact, main_format, media, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, default_encoding, placeholder_styles, autocomplete_job_enabled, job_locking_enabled, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation, translation_keys_sort_collation, cldr_version].hash
|
|
458
|
+
[account_id, name, point_of_contact, main_format, media, shares_translation_memory, tm_ids, term_base_ids, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, default_encoding, placeholder_styles, autocomplete_job_enabled, job_locking_enabled, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation, translation_keys_sort_collation, cldr_version].hash
|
|
425
459
|
end
|
|
426
460
|
|
|
427
461
|
# Builds the object from hash
|
data/lib/phrase/models/upload.rb
CHANGED
|
@@ -8,8 +8,12 @@ module Phrase
|
|
|
8
8
|
|
|
9
9
|
attr_accessor :format
|
|
10
10
|
|
|
11
|
+
# Processing state of the upload: `initialized`, `processing`, `success`, or `error`. `error` means processing failed — for example the file could not be parsed, or a provided `file_format` didn't match the file's actual content. Poll this field until it leaves `initialized`/`processing` to get the final outcome.
|
|
11
12
|
attr_accessor :state
|
|
12
13
|
|
|
14
|
+
# A user-facing message explaining why the upload failed, or `null` if the upload did not fail. This message is intended for display only. Its wording may change at any time and it should not be parsed or relied upon programmatically.
|
|
15
|
+
attr_accessor :error_message
|
|
16
|
+
|
|
13
17
|
# Unique tag of the upload
|
|
14
18
|
attr_accessor :tag
|
|
15
19
|
|
|
@@ -34,6 +38,7 @@ module Phrase
|
|
|
34
38
|
:'filename' => :'filename',
|
|
35
39
|
:'format' => :'format',
|
|
36
40
|
:'state' => :'state',
|
|
41
|
+
:'error_message' => :'error_message',
|
|
37
42
|
:'tag' => :'tag',
|
|
38
43
|
:'tags' => :'tags',
|
|
39
44
|
:'url' => :'url',
|
|
@@ -51,6 +56,7 @@ module Phrase
|
|
|
51
56
|
:'filename' => :'String',
|
|
52
57
|
:'format' => :'String',
|
|
53
58
|
:'state' => :'String',
|
|
59
|
+
:'error_message' => :'String',
|
|
54
60
|
:'tag' => :'String',
|
|
55
61
|
:'tags' => :'Array<String>',
|
|
56
62
|
:'url' => :'String',
|
|
@@ -64,6 +70,7 @@ module Phrase
|
|
|
64
70
|
# List of attributes with nullable: true
|
|
65
71
|
def self.openapi_nullable
|
|
66
72
|
Set.new([
|
|
73
|
+
:'error_message',
|
|
67
74
|
])
|
|
68
75
|
end
|
|
69
76
|
|
|
@@ -98,6 +105,10 @@ module Phrase
|
|
|
98
105
|
self.state = attributes[:'state']
|
|
99
106
|
end
|
|
100
107
|
|
|
108
|
+
if attributes.key?(:'error_message')
|
|
109
|
+
self.error_message = attributes[:'error_message']
|
|
110
|
+
end
|
|
111
|
+
|
|
101
112
|
if attributes.key?(:'tag')
|
|
102
113
|
self.tag = attributes[:'tag']
|
|
103
114
|
end
|
|
@@ -151,6 +162,7 @@ module Phrase
|
|
|
151
162
|
filename == o.filename &&
|
|
152
163
|
format == o.format &&
|
|
153
164
|
state == o.state &&
|
|
165
|
+
error_message == o.error_message &&
|
|
154
166
|
tag == o.tag &&
|
|
155
167
|
tags == o.tags &&
|
|
156
168
|
url == o.url &&
|
|
@@ -169,7 +181,7 @@ module Phrase
|
|
|
169
181
|
# Calculates hash code according to all attributes.
|
|
170
182
|
# @return [Integer] Hash code
|
|
171
183
|
def hash
|
|
172
|
-
[id, filename, format, state, tag, tags, url, user, summary, created_at, updated_at].hash
|
|
184
|
+
[id, filename, format, state, error_message, tag, tags, url, user, summary, created_at, updated_at].hash
|
|
173
185
|
end
|
|
174
186
|
|
|
175
187
|
# Builds the object from hash
|
data/lib/phrase/version.rb
CHANGED
data/lib/phrase.rb
CHANGED
|
@@ -36,6 +36,7 @@ require 'phrase/models/branch_merge_parameters'
|
|
|
36
36
|
require 'phrase/models/branch_name'
|
|
37
37
|
require 'phrase/models/branch_sync_parameters'
|
|
38
38
|
require 'phrase/models/branch_update_parameters'
|
|
39
|
+
require 'phrase/models/check_issue'
|
|
39
40
|
require 'phrase/models/comment'
|
|
40
41
|
require 'phrase/models/comment_create_parameters'
|
|
41
42
|
require 'phrase/models/comment_create_parameters1'
|
|
@@ -133,6 +134,10 @@ require 'phrase/models/locale_statistics'
|
|
|
133
134
|
require 'phrase/models/locale_team_preview'
|
|
134
135
|
require 'phrase/models/locale_update_parameters'
|
|
135
136
|
require 'phrase/models/locale_user_preview'
|
|
137
|
+
require 'phrase/models/machine_translation_locale_provider_mapping'
|
|
138
|
+
require 'phrase/models/machine_translation_locale_provider_mappings_create_parameters'
|
|
139
|
+
require 'phrase/models/machine_translation_settings'
|
|
140
|
+
require 'phrase/models/machine_translation_settings_update_parameters'
|
|
136
141
|
require 'phrase/models/member'
|
|
137
142
|
require 'phrase/models/member_project_detail'
|
|
138
143
|
require 'phrase/models/member_project_detail_project_roles_inner'
|
|
@@ -252,6 +257,7 @@ require 'phrase/api/automation_events_api'
|
|
|
252
257
|
require 'phrase/api/automations_api'
|
|
253
258
|
require 'phrase/api/blacklisted_keys_api'
|
|
254
259
|
require 'phrase/api/branches_api'
|
|
260
|
+
require 'phrase/api/checks_api'
|
|
255
261
|
require 'phrase/api/comment_reactions_api'
|
|
256
262
|
require 'phrase/api/comment_replies_api'
|
|
257
263
|
require 'phrase/api/comments_api'
|
|
@@ -277,6 +283,7 @@ require 'phrase/api/keys_figma_attachments_api'
|
|
|
277
283
|
require 'phrase/api/linked_keys_api'
|
|
278
284
|
require 'phrase/api/locale_downloads_api'
|
|
279
285
|
require 'phrase/api/locales_api'
|
|
286
|
+
require 'phrase/api/machine_translation_api'
|
|
280
287
|
require 'phrase/api/members_api'
|
|
281
288
|
require 'phrase/api/notification_groups_api'
|
|
282
289
|
require 'phrase/api/notifications_api'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
# Unit tests for Phrase::ChecksApi
|
|
5
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
6
|
+
# Please update as you see appropriate
|
|
7
|
+
describe 'ChecksApi' do
|
|
8
|
+
before do
|
|
9
|
+
# run before each test
|
|
10
|
+
@api_instance = Phrase::ChecksApi.new
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
after do
|
|
14
|
+
# run after each test
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of ChecksApi' do
|
|
18
|
+
it 'should create an instance of ChecksApi' do
|
|
19
|
+
expect(@api_instance).to be_instance_of(Phrase::ChecksApi)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# unit tests for check_issue_dismiss
|
|
24
|
+
# Dismiss a check issue
|
|
25
|
+
# **Note:** The Checks API is still in development and might change in subsequent releases. Mark a check issue as dismissed so it no longer appears on the list of active check issues.
|
|
26
|
+
# @param project_id Project ID
|
|
27
|
+
# @param id Check Issue ID
|
|
28
|
+
# @param [Hash] opts the optional parameters
|
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
|
+
# @return [CheckIssue]
|
|
31
|
+
describe 'check_issue_dismiss test' do
|
|
32
|
+
it 'should work' do
|
|
33
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# unit tests for check_issues_list
|
|
38
|
+
# List check issues
|
|
39
|
+
# **Note:** The Checks API is still in development and might change in subsequent releases. List check issues for the given project. Results can be filtered by locale, check name, and state.
|
|
40
|
+
# @param project_id Project ID
|
|
41
|
+
# @param [Hash] opts the optional parameters
|
|
42
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
43
|
+
# @option opts [Integer] :page Page number
|
|
44
|
+
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
45
|
+
# @option opts [String] :state Filter by state of the check issue. Can be one of: `active`, `solved`, `dismissed`, `all`. Defaults to `active`.
|
|
46
|
+
# @option opts [Array<String>] :locale_ids Filter by one or more locale IDs.
|
|
47
|
+
# @option opts [Array<String>] :check_names Filter by one or more check names. Valid values are: - `translation_content_length` — the translation exceeds the maximum character limit configured for the key. - `translation_placeholder_usage` — the translation is missing placeholders present in the source, or contains unexpected ones. - `translation_glossary_usage` — the translation does not follow the glossary term translations.
|
|
48
|
+
# @option opts [String] :created_since Return only check issues created on or after this ISO 8601 datetime. Returns 400 if the value is not a valid date-time.
|
|
49
|
+
# @return [Array<CheckIssue>]
|
|
50
|
+
describe 'check_issues_list test' do
|
|
51
|
+
it 'should work' do
|
|
52
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
# Unit tests for Phrase::MachineTranslationApi
|
|
5
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
6
|
+
# Please update as you see appropriate
|
|
7
|
+
describe 'MachineTranslationApi' do
|
|
8
|
+
before do
|
|
9
|
+
# run before each test
|
|
10
|
+
@api_instance = Phrase::MachineTranslationApi.new
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
after do
|
|
14
|
+
# run after each test
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of MachineTranslationApi' do
|
|
18
|
+
it 'should create an instance of MachineTranslationApi' do
|
|
19
|
+
expect(@api_instance).to be_instance_of(Phrase::MachineTranslationApi)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# unit tests for machine_translation_locale_provider_mappings_create
|
|
24
|
+
# Create a locale provider mapping
|
|
25
|
+
# Creates a locale-pair-specific machine translation provider override for the account. When a mapping exists for a given source/target locale pair, that provider is used instead of the account default. Only one mapping may exist per source/target locale pair; attempting to create a duplicate returns a validation error. The source and target locale codes must differ.
|
|
26
|
+
# @param account_id Account ID
|
|
27
|
+
# @param machine_translation_locale_provider_mappings_create_parameters
|
|
28
|
+
# @param [Hash] opts the optional parameters
|
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
|
+
# @return [MachineTranslationLocaleProviderMapping]
|
|
31
|
+
describe 'machine_translation_locale_provider_mappings_create test' do
|
|
32
|
+
it 'should work' do
|
|
33
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# unit tests for machine_translation_locale_provider_mappings_destroy
|
|
38
|
+
# Delete a locale provider mapping
|
|
39
|
+
# Removes the machine translation provider override for the specified source and target locale pair. The mapping is identified by locale codes supplied as query parameters rather than a path ID.
|
|
40
|
+
# @param account_id Account ID
|
|
41
|
+
# @param source_locale_code The locale code of the source language of the mapping to delete.
|
|
42
|
+
# @param target_locale_code The locale code of the target language of the mapping to delete.
|
|
43
|
+
# @param [Hash] opts the optional parameters
|
|
44
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
45
|
+
# @return [nil]
|
|
46
|
+
describe 'machine_translation_locale_provider_mappings_destroy test' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# unit tests for machine_translation_settings_show
|
|
53
|
+
# Get machine translation settings
|
|
54
|
+
# Returns the machine translation configuration for the account, including the default translation service, current machine translation unit usage, and any locale-pair-specific provider mappings.
|
|
55
|
+
# @param account_id Account ID
|
|
56
|
+
# @param [Hash] opts the optional parameters
|
|
57
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
58
|
+
# @return [MachineTranslationSettings]
|
|
59
|
+
describe 'machine_translation_settings_show test' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# unit tests for machine_translation_settings_update
|
|
66
|
+
# Update machine translation settings
|
|
67
|
+
# Sets the default machine translation service for the account. Requires write access to the account's machine translation settings. Passing an empty or absent value for `default_service` resets the account to its plan default (Microsoft Translate).
|
|
68
|
+
# @param account_id Account ID
|
|
69
|
+
# @param machine_translation_settings_update_parameters
|
|
70
|
+
# @param [Hash] opts the optional parameters
|
|
71
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
72
|
+
# @return [MachineTranslationSettings]
|
|
73
|
+
describe 'machine_translation_settings_update test' do
|
|
74
|
+
it 'should work' do
|
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::CheckIssue
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'CheckIssue' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::CheckIssue.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of CheckIssue' do
|
|
19
|
+
it 'should create an instance of CheckIssue' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::CheckIssue)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "id"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "check_name"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["translation_content_length", "translation_placeholder_usage", "translation_glossary_usage"])
|
|
33
|
+
# validator.allowable_values.each do |value|
|
|
34
|
+
# expect { @instance.check_name = value }.not_to raise_error
|
|
35
|
+
# end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe 'test attribute "state"' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
42
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "solved", "dismissed"])
|
|
43
|
+
# validator.allowable_values.each do |value|
|
|
44
|
+
# expect { @instance.state = value }.not_to raise_error
|
|
45
|
+
# end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
describe 'test attribute "description"' do
|
|
50
|
+
it 'should work' do
|
|
51
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "dismissed_at"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
describe 'test attribute "solved_at"' do
|
|
62
|
+
it 'should work' do
|
|
63
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
describe 'test attribute "created_at"' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
describe 'test attribute "updated_at"' do
|
|
74
|
+
it 'should work' do
|
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
describe 'test attribute "translation"' do
|
|
80
|
+
it 'should work' do
|
|
81
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
@@ -80,6 +80,12 @@ describe 'LocaleCreateParameters' do
|
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
+
describe 'test attribute "unverify_on_source_changes"' do
|
|
84
|
+
it 'should work' do
|
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
83
89
|
describe 'test attribute "autotranslate"' do
|
|
84
90
|
it 'should work' do
|
|
85
91
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -86,6 +86,24 @@ describe 'LocaleDetails' do
|
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
describe 'test attribute "unverify_new_translations"' do
|
|
90
|
+
it 'should work' do
|
|
91
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
describe 'test attribute "unverify_updated_translations"' 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
|
+
|
|
101
|
+
describe 'test attribute "unverify_on_source_changes"' do
|
|
102
|
+
it 'should work' do
|
|
103
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
89
107
|
describe 'test attribute "created_at"' do
|
|
90
108
|
it 'should work' do
|
|
91
109
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|