phrase 4.25.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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +26 -4
  4. data/docs/AutomationEvent.md +33 -0
  5. data/docs/AutomationEventProject.md +19 -0
  6. data/docs/AutomationEventsApi.md +168 -0
  7. data/docs/AutomationsCreateParameters.md +1 -1
  8. data/docs/AutomationsCreateParameters1.md +1 -1
  9. data/docs/CheckIssue.md +33 -0
  10. data/docs/ChecksApi.md +146 -0
  11. data/docs/DocumentsApi.md +4 -4
  12. data/docs/ICUApi.md +1 -1
  13. data/docs/IcuSkeletonError.md +17 -0
  14. data/docs/IcuSkeletonParameters.md +11 -11
  15. data/docs/JobCreateParameters.md +1 -1
  16. data/docs/JobsApi.md +2 -2
  17. data/docs/KeyCreateParameters.md +1 -1
  18. data/docs/KeyFormatAnnotationsApi.md +74 -0
  19. data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
  20. data/docs/KeyLinksBatchDestroyParameters.md +6 -4
  21. data/docs/KeyLinksCreateParameters.md +2 -2
  22. data/docs/KeyUpdateParameters.md +1 -1
  23. data/docs/LinkedKeysApi.md +14 -13
  24. data/docs/Locale.md +6 -0
  25. data/docs/LocaleCreateParameters.md +2 -0
  26. data/docs/LocaleDetails.md +6 -0
  27. data/docs/LocaleUpdateParameters.md +2 -0
  28. data/docs/MachineTranslationApi.md +263 -0
  29. data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
  30. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
  31. data/docs/MachineTranslationSettings.md +23 -0
  32. data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
  33. data/docs/PreTranslation.md +29 -0
  34. data/docs/PreTranslationCreateParameters.md +19 -0
  35. data/docs/PreTranslationsApi.md +210 -0
  36. data/docs/ProjectCreateParameters.md +8 -2
  37. data/docs/ProjectDetails.md +3 -1
  38. data/docs/ProjectUpdateParameters.md +8 -2
  39. data/docs/ScreenshotUpdateParameters.md +1 -1
  40. data/docs/ScreenshotsApi.md +2 -2
  41. data/docs/Upload.md +3 -1
  42. data/docs/UploadsApi.md +4 -4
  43. data/lib/phrase/api/automation_events_api.rb +215 -0
  44. data/lib/phrase/api/checks_api.rb +174 -0
  45. data/lib/phrase/api/documents_api.rb +6 -6
  46. data/lib/phrase/api/icu_api.rb +2 -6
  47. data/lib/phrase/api/key_format_annotations_api.rb +85 -0
  48. data/lib/phrase/api/linked_keys_api.rb +19 -23
  49. data/lib/phrase/api/machine_translation_api.rb +302 -0
  50. data/lib/phrase/api/pre_translations_api.rb +240 -0
  51. data/lib/phrase/api/screenshots_api.rb +4 -4
  52. data/lib/phrase/api/uploads_api.rb +6 -6
  53. data/lib/phrase/models/automation_event.rb +325 -0
  54. data/lib/phrase/models/automation_event_project.rb +208 -0
  55. data/lib/phrase/models/automations_create_parameters.rb +1 -1
  56. data/lib/phrase/models/automations_create_parameters1.rb +1 -1
  57. data/lib/phrase/models/check_issue.rb +319 -0
  58. data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
  59. data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
  60. data/lib/phrase/models/job_create_parameters.rb +1 -1
  61. data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
  62. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
  63. data/lib/phrase/models/key_links_create_parameters.rb +1 -1
  64. data/lib/phrase/models/locale.rb +31 -1
  65. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  66. data/lib/phrase/models/locale_details.rb +31 -1
  67. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  68. data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
  69. data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
  70. data/lib/phrase/models/machine_translation_settings.rb +230 -0
  71. data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
  72. data/lib/phrase/models/pre_translation.rb +301 -0
  73. data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
  74. data/lib/phrase/models/project_create_parameters.rb +35 -1
  75. data/lib/phrase/models/project_details.rb +10 -1
  76. data/lib/phrase/models/project_update_parameters.rb +35 -1
  77. data/lib/phrase/models/upload.rb +13 -1
  78. data/lib/phrase/response.rb +2 -2
  79. data/lib/phrase/version.rb +1 -1
  80. data/lib/phrase.rb +16 -1
  81. data/phrase.gemspec +1 -1
  82. data/spec/api/automation_events_api_spec.rb +67 -0
  83. data/spec/api/checks_api_spec.rb +56 -0
  84. data/spec/api/documents_api_spec.rb +3 -3
  85. data/spec/api/icu_api_spec.rb +1 -1
  86. data/spec/api/key_format_annotations_api_spec.rb +38 -0
  87. data/spec/api/linked_keys_api_spec.rb +7 -7
  88. data/spec/api/machine_translation_api_spec.rb +79 -0
  89. data/spec/api/pre_translations_api_spec.rb +70 -0
  90. data/spec/api/screenshots_api_spec.rb +2 -2
  91. data/spec/models/automation_event_project_spec.rb +35 -0
  92. data/spec/models/automation_event_spec.rb +85 -0
  93. data/spec/models/check_issue_spec.rb +85 -0
  94. data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
  95. data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
  96. data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
  97. data/spec/models/locale_create_parameters_spec.rb +6 -0
  98. data/spec/models/locale_details_spec.rb +18 -0
  99. data/spec/models/locale_spec.rb +18 -0
  100. data/spec/models/locale_update_parameters_spec.rb +6 -0
  101. data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
  102. data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
  103. data/spec/models/machine_translation_settings_spec.rb +47 -0
  104. data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
  105. data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
  106. data/spec/models/pre_translation_spec.rb +73 -0
  107. data/spec/models/project_create_parameters_spec.rb +18 -0
  108. data/spec/models/project_details_spec.rb +6 -0
  109. data/spec/models/project_update_parameters_spec.rb +18 -0
  110. data/spec/models/upload_spec.rb +6 -0
  111. data/spec/response_spec.rb +53 -0
  112. metadata +313 -251
  113. data/docs/KeyLinksIndex400Response.md +0 -17
@@ -0,0 +1,263 @@
1
+ # Phrase::MachineTranslationApi
2
+
3
+ All URIs are relative to *https://api.phrase.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**machine_translation_locale_provider_mappings_create**](MachineTranslationApi.md#machine_translation_locale_provider_mappings_create) | **POST** /accounts/{account_id}/machine_translation_locale_provider_mappings | Create a locale provider mapping
8
+ [**machine_translation_locale_provider_mappings_destroy**](MachineTranslationApi.md#machine_translation_locale_provider_mappings_destroy) | **DELETE** /accounts/{account_id}/machine_translation_locale_provider_mappings | Delete a locale provider mapping
9
+ [**machine_translation_settings_show**](MachineTranslationApi.md#machine_translation_settings_show) | **GET** /accounts/{account_id}/machine_translation_settings | Get machine translation settings
10
+ [**machine_translation_settings_update**](MachineTranslationApi.md#machine_translation_settings_update) | **PATCH** /accounts/{account_id}/machine_translation_settings | Update machine translation settings
11
+
12
+
13
+
14
+ ## machine_translation_locale_provider_mappings_create
15
+
16
+ > MachineTranslationLocaleProviderMapping machine_translation_locale_provider_mappings_create(account_id, machine_translation_locale_provider_mappings_create_parameters, opts)
17
+
18
+ Create a locale provider mapping
19
+
20
+ 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.
21
+
22
+ ### Example
23
+
24
+ ```ruby
25
+ # load the gem
26
+ require 'phrase'
27
+ # setup authorization
28
+ Phrase.configure do |config|
29
+ # Configure HTTP basic authorization: Basic
30
+ config.username = 'YOUR USERNAME'
31
+ config.password = 'YOUR PASSWORD'
32
+
33
+ # Configure API key authorization: Token
34
+ config.api_key['Authorization'] = 'YOUR API KEY'
35
+ config.api_key_prefix['Authorization'] = 'token'
36
+ end
37
+
38
+ api_instance = Phrase::MachineTranslationApi.new
39
+ account_id = 'account_id_example' # String | Account ID
40
+ machine_translation_locale_provider_mappings_create_parameters = Phrase::MachineTranslationLocaleProviderMappingsCreateParameters.new({source_locale_code: 'en', target_locale_code: 'de', service: 'google_translate'}) # MachineTranslationLocaleProviderMappingsCreateParameters |
41
+ opts = {
42
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
43
+ }
44
+
45
+ begin
46
+ #Create a locale provider mapping
47
+ result = api_instance.machine_translation_locale_provider_mappings_create(account_id, machine_translation_locale_provider_mappings_create_parameters, opts)
48
+ pp result
49
+ rescue Phrase::ApiError => e
50
+ puts "Exception when calling MachineTranslationApi->machine_translation_locale_provider_mappings_create: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+
57
+ Name | Type | Description | Notes
58
+ ------------- | ------------- | ------------- | -------------
59
+ **account_id** | **String**| Account ID |
60
+ **machine_translation_locale_provider_mappings_create_parameters** | [**MachineTranslationLocaleProviderMappingsCreateParameters**](MachineTranslationLocaleProviderMappingsCreateParameters.md)| |
61
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
62
+
63
+ ### Return type
64
+
65
+ Response<([**MachineTranslationLocaleProviderMapping**](MachineTranslationLocaleProviderMapping.md))>
66
+
67
+ ### Authorization
68
+
69
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: application/json
74
+ - **Accept**: application/json
75
+
76
+
77
+ ## machine_translation_locale_provider_mappings_destroy
78
+
79
+ > machine_translation_locale_provider_mappings_destroy(account_id, source_locale_code, target_locale_code, opts)
80
+
81
+ Delete a locale provider mapping
82
+
83
+ 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.
84
+
85
+ ### Example
86
+
87
+ ```ruby
88
+ # load the gem
89
+ require 'phrase'
90
+ # setup authorization
91
+ Phrase.configure do |config|
92
+ # Configure HTTP basic authorization: Basic
93
+ config.username = 'YOUR USERNAME'
94
+ config.password = 'YOUR PASSWORD'
95
+
96
+ # Configure API key authorization: Token
97
+ config.api_key['Authorization'] = 'YOUR API KEY'
98
+ config.api_key_prefix['Authorization'] = 'token'
99
+ end
100
+
101
+ api_instance = Phrase::MachineTranslationApi.new
102
+ account_id = 'account_id_example' # String | Account ID
103
+ source_locale_code = 'en' # String | The locale code of the source language of the mapping to delete.
104
+ target_locale_code = 'de' # String | The locale code of the target language of the mapping to delete.
105
+ opts = {
106
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
107
+ }
108
+
109
+ begin
110
+ #Delete a locale provider mapping
111
+ api_instance.machine_translation_locale_provider_mappings_destroy(account_id, source_locale_code, target_locale_code, opts)
112
+ rescue Phrase::ApiError => e
113
+ puts "Exception when calling MachineTranslationApi->machine_translation_locale_provider_mappings_destroy: #{e}"
114
+ end
115
+ ```
116
+
117
+ ### Parameters
118
+
119
+
120
+ Name | Type | Description | Notes
121
+ ------------- | ------------- | ------------- | -------------
122
+ **account_id** | **String**| Account ID |
123
+ **source_locale_code** | **String**| The locale code of the source language of the mapping to delete. |
124
+ **target_locale_code** | **String**| The locale code of the target language of the mapping to delete. |
125
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
126
+
127
+ ### Return type
128
+
129
+ Response<(nil (empty response body))>
130
+
131
+ ### Authorization
132
+
133
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
134
+
135
+ ### HTTP request headers
136
+
137
+ - **Content-Type**: Not defined
138
+ - **Accept**: Not defined
139
+
140
+
141
+ ## machine_translation_settings_show
142
+
143
+ > MachineTranslationSettings machine_translation_settings_show(account_id, opts)
144
+
145
+ Get machine translation settings
146
+
147
+ 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.
148
+
149
+ ### Example
150
+
151
+ ```ruby
152
+ # load the gem
153
+ require 'phrase'
154
+ # setup authorization
155
+ Phrase.configure do |config|
156
+ # Configure HTTP basic authorization: Basic
157
+ config.username = 'YOUR USERNAME'
158
+ config.password = 'YOUR PASSWORD'
159
+
160
+ # Configure API key authorization: Token
161
+ config.api_key['Authorization'] = 'YOUR API KEY'
162
+ config.api_key_prefix['Authorization'] = 'token'
163
+ end
164
+
165
+ api_instance = Phrase::MachineTranslationApi.new
166
+ account_id = 'account_id_example' # String | Account ID
167
+ opts = {
168
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
169
+ }
170
+
171
+ begin
172
+ #Get machine translation settings
173
+ result = api_instance.machine_translation_settings_show(account_id, opts)
174
+ pp result
175
+ rescue Phrase::ApiError => e
176
+ puts "Exception when calling MachineTranslationApi->machine_translation_settings_show: #{e}"
177
+ end
178
+ ```
179
+
180
+ ### Parameters
181
+
182
+
183
+ Name | Type | Description | Notes
184
+ ------------- | ------------- | ------------- | -------------
185
+ **account_id** | **String**| Account ID |
186
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
187
+
188
+ ### Return type
189
+
190
+ Response<([**MachineTranslationSettings**](MachineTranslationSettings.md))>
191
+
192
+ ### Authorization
193
+
194
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
195
+
196
+ ### HTTP request headers
197
+
198
+ - **Content-Type**: Not defined
199
+ - **Accept**: application/json
200
+
201
+
202
+ ## machine_translation_settings_update
203
+
204
+ > MachineTranslationSettings machine_translation_settings_update(account_id, machine_translation_settings_update_parameters, opts)
205
+
206
+ Update machine translation settings
207
+
208
+ 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).
209
+
210
+ ### Example
211
+
212
+ ```ruby
213
+ # load the gem
214
+ require 'phrase'
215
+ # setup authorization
216
+ Phrase.configure do |config|
217
+ # Configure HTTP basic authorization: Basic
218
+ config.username = 'YOUR USERNAME'
219
+ config.password = 'YOUR PASSWORD'
220
+
221
+ # Configure API key authorization: Token
222
+ config.api_key['Authorization'] = 'YOUR API KEY'
223
+ config.api_key_prefix['Authorization'] = 'token'
224
+ end
225
+
226
+ api_instance = Phrase::MachineTranslationApi.new
227
+ account_id = 'account_id_example' # String | Account ID
228
+ machine_translation_settings_update_parameters = Phrase::MachineTranslationSettingsUpdateParameters.new # MachineTranslationSettingsUpdateParameters |
229
+ opts = {
230
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
231
+ }
232
+
233
+ begin
234
+ #Update machine translation settings
235
+ result = api_instance.machine_translation_settings_update(account_id, machine_translation_settings_update_parameters, opts)
236
+ pp result
237
+ rescue Phrase::ApiError => e
238
+ puts "Exception when calling MachineTranslationApi->machine_translation_settings_update: #{e}"
239
+ end
240
+ ```
241
+
242
+ ### Parameters
243
+
244
+
245
+ Name | Type | Description | Notes
246
+ ------------- | ------------- | ------------- | -------------
247
+ **account_id** | **String**| Account ID |
248
+ **machine_translation_settings_update_parameters** | [**MachineTranslationSettingsUpdateParameters**](MachineTranslationSettingsUpdateParameters.md)| |
249
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
250
+
251
+ ### Return type
252
+
253
+ Response<([**MachineTranslationSettings**](MachineTranslationSettings.md))>
254
+
255
+ ### Authorization
256
+
257
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
258
+
259
+ ### HTTP request headers
260
+
261
+ - **Content-Type**: application/json
262
+ - **Accept**: application/json
263
+
@@ -0,0 +1,21 @@
1
+ # Phrase::MachineTranslationLocaleProviderMapping
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **source_locale_code** | **String** | The locale code of the source language for this mapping. | [optional]
8
+ **target_locale_code** | **String** | The locale code of the target language for this mapping. | [optional]
9
+ **service** | **String** | The translation service applied when translating from source to target locale. | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'Phrase'
15
+
16
+ instance = Phrase::MachineTranslationLocaleProviderMapping.new(source_locale_code: en,
17
+ target_locale_code: de,
18
+ service: google_translate)
19
+ ```
20
+
21
+
@@ -0,0 +1,21 @@
1
+ # Phrase::MachineTranslationLocaleProviderMappingsCreateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **source_locale_code** | **String** | The locale code of the source language (e.g. \&quot;en\&quot;). |
8
+ **target_locale_code** | **String** | The locale code of the target language (e.g. \&quot;de\&quot;). Must differ from source_locale_code. |
9
+ **service** | **String** | The machine translation service to use for this locale pair. Must be a service enabled for the account. |
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'Phrase'
15
+
16
+ instance = Phrase::MachineTranslationLocaleProviderMappingsCreateParameters.new(source_locale_code: en,
17
+ target_locale_code: de,
18
+ service: google_translate)
19
+ ```
20
+
21
+
@@ -0,0 +1,23 @@
1
+ # Phrase::MachineTranslationSettings
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **default_service** | **String** | The default machine translation engine configured for the account. Returns \&quot;microsoft_translate\&quot; when no service has been explicitly configured. Supported values: language_ai_translate, aita_translate, microsoft_translate, google_translate, amazon_translate, intento_translate, gpt_translate. | [optional]
8
+ **machine_translation_units_used** | **Integer** | Number of machine translation characters consumed in the current billing period. | [optional]
9
+ **machine_translation_units_total** | **Integer** | Total machine translation character quota granted for the current billing period. | [optional]
10
+ **locale_provider_mappings** | [**Array&lt;MachineTranslationLocaleProviderMapping&gt;**](MachineTranslationLocaleProviderMapping.md) | Per-locale-pair provider overrides. When a matching mapping exists for a source/target locale pair, that provider takes precedence over the account default. | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'Phrase'
16
+
17
+ instance = Phrase::MachineTranslationSettings.new(default_service: google_translate,
18
+ machine_translation_units_used: 12500,
19
+ machine_translation_units_total: 1000000,
20
+ locale_provider_mappings: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,17 @@
1
+ # Phrase::MachineTranslationSettingsUpdateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **default_service** | **String** | The machine translation engine to use as the account default. Supported values: language_ai_translate, aita_translate, microsoft_translate, google_translate, amazon_translate, intento_translate, gpt_translate. Pass null or an empty string to reset to the plan default. | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'Phrase'
13
+
14
+ instance = Phrase::MachineTranslationSettingsUpdateParameters.new(default_service: google_translate)
15
+ ```
16
+
17
+
@@ -0,0 +1,29 @@
1
+ # Phrase::PreTranslation
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | | [optional]
8
+ **status** | **String** | Current execution state of the pre-translation job. Jobs start as &#x60;pending&#x60; while queued, transition to &#x60;running&#x60; while executing, and settle to &#x60;success&#x60; or &#x60;error&#x60;. | [optional]
9
+ **translatable_type** | **String** | Resource type that was pre-translated. | [optional]
10
+ **translatable_id** | **String** | ID of the targeted resource (locale ID, job ID, key ID, or upload ID). | [optional]
11
+ **error** | **String** | Error message. &#x60;null&#x60; unless the job&#39;s status is &#x60;error&#x60;. | [optional]
12
+ **created_at** | **Time** | | [optional]
13
+ **updated_at** | **Time** | | [optional]
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'Phrase'
19
+
20
+ instance = Phrase::PreTranslation.new(id: abcd1234cdef1234abcd1234cdef1234,
21
+ status: null,
22
+ translatable_type: null,
23
+ translatable_id: abcd1234cdef1234abcd1234cdef1234,
24
+ error: null,
25
+ created_at: null,
26
+ updated_at: null)
27
+ ```
28
+
29
+
@@ -0,0 +1,19 @@
1
+ # Phrase::PreTranslationCreateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **translatable_type** | **String** | Resource type to pre-translate. | [optional]
8
+ **translatable_id** | **String** | ID of the targeted resource: locale ID for &#x60;locale&#x60;, job ID for &#x60;job&#x60;, key ID for &#x60;translation_key&#x60;, upload ID for &#x60;upload&#x60;. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'Phrase'
14
+
15
+ instance = Phrase::PreTranslationCreateParameters.new(translatable_type: null,
16
+ translatable_id: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,210 @@
1
+ # Phrase::PreTranslationsApi
2
+
3
+ All URIs are relative to *https://api.phrase.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**pre_translation_create**](PreTranslationsApi.md#pre_translation_create) | **POST** /projects/{project_id}/pre_translations | Create a pre-translation job
8
+ [**pre_translation_show**](PreTranslationsApi.md#pre_translation_show) | **GET** /projects/{project_id}/pre_translations/{id} | Get a single pre-translation job
9
+ [**pre_translations_list**](PreTranslationsApi.md#pre_translations_list) | **GET** /projects/{project_id}/pre_translations | List pre-translation jobs
10
+
11
+
12
+
13
+ ## pre_translation_create
14
+
15
+ > PreTranslation pre_translation_create(project_id, pre_translation_create_parameters, opts)
16
+
17
+ Create a pre-translation job
18
+
19
+ Triggers a pre-translation job for a resource within a project, addressed by `translatable_type` (`locale`, `job`, `translation_key`, or `upload`) and `translatable_id` (its ID). Enqueues machine translation using the project's configured MT engine.
20
+
21
+ ### Example
22
+
23
+ ```ruby
24
+ # load the gem
25
+ require 'phrase'
26
+ # setup authorization
27
+ Phrase.configure do |config|
28
+ # Configure HTTP basic authorization: Basic
29
+ config.username = 'YOUR USERNAME'
30
+ config.password = 'YOUR PASSWORD'
31
+
32
+ # Configure API key authorization: Token
33
+ config.api_key['Authorization'] = 'YOUR API KEY'
34
+ config.api_key_prefix['Authorization'] = 'token'
35
+ end
36
+
37
+ api_instance = Phrase::PreTranslationsApi.new
38
+ project_id = 'project_id_example' # String | Project ID
39
+ pre_translation_create_parameters = Phrase::PreTranslationCreateParameters.new # PreTranslationCreateParameters |
40
+ opts = {
41
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
42
+ }
43
+
44
+ begin
45
+ #Create a pre-translation job
46
+ result = api_instance.pre_translation_create(project_id, pre_translation_create_parameters, opts)
47
+ pp result
48
+ rescue Phrase::ApiError => e
49
+ puts "Exception when calling PreTranslationsApi->pre_translation_create: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **project_id** | **String**| Project ID |
59
+ **pre_translation_create_parameters** | [**PreTranslationCreateParameters**](PreTranslationCreateParameters.md)| |
60
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
61
+
62
+ ### Return type
63
+
64
+ Response<([**PreTranslation**](PreTranslation.md))>
65
+
66
+ ### Authorization
67
+
68
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: application/json
74
+
75
+
76
+ ## pre_translation_show
77
+
78
+ > PreTranslation pre_translation_show(project_id, id, opts)
79
+
80
+ Get a single pre-translation job
81
+
82
+ Returns a single pre-translation job identified by its ID.
83
+
84
+ ### Example
85
+
86
+ ```ruby
87
+ # load the gem
88
+ require 'phrase'
89
+ # setup authorization
90
+ Phrase.configure do |config|
91
+ # Configure HTTP basic authorization: Basic
92
+ config.username = 'YOUR USERNAME'
93
+ config.password = 'YOUR PASSWORD'
94
+
95
+ # Configure API key authorization: Token
96
+ config.api_key['Authorization'] = 'YOUR API KEY'
97
+ config.api_key_prefix['Authorization'] = 'token'
98
+ end
99
+
100
+ api_instance = Phrase::PreTranslationsApi.new
101
+ project_id = 'project_id_example' # String | Project ID
102
+ id = 'id_example' # String | ID
103
+ opts = {
104
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
105
+ if_modified_since: 'if_modified_since_example', # String | Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
106
+ if_none_match: 'if_none_match_example' # String | ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
107
+ }
108
+
109
+ begin
110
+ #Get a single pre-translation job
111
+ result = api_instance.pre_translation_show(project_id, id, opts)
112
+ pp result
113
+ rescue Phrase::ApiError => e
114
+ puts "Exception when calling PreTranslationsApi->pre_translation_show: #{e}"
115
+ end
116
+ ```
117
+
118
+ ### Parameters
119
+
120
+
121
+ Name | Type | Description | Notes
122
+ ------------- | ------------- | ------------- | -------------
123
+ **project_id** | **String**| Project ID |
124
+ **id** | **String**| ID |
125
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
126
+ **if_modified_since** | **String**| Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional) | [optional]
127
+ **if_none_match** | **String**| ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional) | [optional]
128
+
129
+ ### Return type
130
+
131
+ Response<([**PreTranslation**](PreTranslation.md))>
132
+
133
+ ### Authorization
134
+
135
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
136
+
137
+ ### HTTP request headers
138
+
139
+ - **Content-Type**: Not defined
140
+ - **Accept**: application/json
141
+
142
+
143
+ ## pre_translations_list
144
+
145
+ > Array&lt;PreTranslation&gt; pre_translations_list(project_id, opts)
146
+
147
+ List pre-translation jobs
148
+
149
+ Returns all pre-translation jobs scoped to a project, ordered by creation date descending.
150
+
151
+ ### Example
152
+
153
+ ```ruby
154
+ # load the gem
155
+ require 'phrase'
156
+ # setup authorization
157
+ Phrase.configure do |config|
158
+ # Configure HTTP basic authorization: Basic
159
+ config.username = 'YOUR USERNAME'
160
+ config.password = 'YOUR PASSWORD'
161
+
162
+ # Configure API key authorization: Token
163
+ config.api_key['Authorization'] = 'YOUR API KEY'
164
+ config.api_key_prefix['Authorization'] = 'token'
165
+ end
166
+
167
+ api_instance = Phrase::PreTranslationsApi.new
168
+ project_id = 'project_id_example' # String | Project ID
169
+ opts = {
170
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
171
+ if_modified_since: 'if_modified_since_example', # String | Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
172
+ if_none_match: 'if_none_match_example', # String | ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
173
+ page: 1, # Integer | Page number
174
+ per_page: 25 # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
175
+ }
176
+
177
+ begin
178
+ #List pre-translation jobs
179
+ result = api_instance.pre_translations_list(project_id, opts)
180
+ pp result
181
+ rescue Phrase::ApiError => e
182
+ puts "Exception when calling PreTranslationsApi->pre_translations_list: #{e}"
183
+ end
184
+ ```
185
+
186
+ ### Parameters
187
+
188
+
189
+ Name | Type | Description | Notes
190
+ ------------- | ------------- | ------------- | -------------
191
+ **project_id** | **String**| Project ID |
192
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
193
+ **if_modified_since** | **String**| Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional) | [optional]
194
+ **if_none_match** | **String**| ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional) | [optional]
195
+ **page** | **Integer**| Page number | [optional]
196
+ **per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
197
+
198
+ ### Return type
199
+
200
+ Response<([**Array&lt;PreTranslation&gt;**](PreTranslation.md))>
201
+
202
+ ### Authorization
203
+
204
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
205
+
206
+ ### HTTP request headers
207
+
208
+ - **Content-Type**: Not defined
209
+ - **Accept**: application/json
210
+
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
8
8
  **main_format** | **String** | Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see [Format Guide](https://support.phrase.com/hc/en-us/sections/6111343326364) or our [Formats API Endpoint](/en/api/strings/formats/list-formats). | [optional]
9
9
  **media** | **String** | (Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: &#x60;Ruby&#x60;, &#x60;JavaScript&#x60;, &#x60;AngularJS&#x60;, &#x60;React&#x60;, &#x60;iOS&#x60;, &#x60;Android&#x60;, &#x60;Python&#x60;, &#x60;PHP&#x60;, &#x60;Java&#x60;, &#x60;Go&#x60;, &#x60;Windows Phone&#x60;, &#x60;Rails&#x60;, &#x60;Node.js&#x60;, &#x60;.NET&#x60;, &#x60;Django&#x60;, &#x60;Symfony&#x60;, &#x60;Yii Framework&#x60;, &#x60;Zend Framework&#x60;, &#x60;Apple App Store Description&#x60;, &#x60;Google Play Description&#x60;, but it can also take any other value. | [optional]
10
10
  **shares_translation_memory** | **Boolean** | Indicates whether the project should share the account&#39;s translation memory | [optional]
11
+ **tm_ids** | **Array&lt;String&gt;** | List of TMS translation memory IDs, used to provide reference translations for the AI translation agent. | [optional]
12
+ **term_base_ids** | **Array&lt;String&gt;** | List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent. | [optional]
11
13
  **project_image** | **File** | Image to identify the project | [optional]
12
14
  **remove_project_image** | **Boolean** | Indicates whether the project image should be deleted. | [optional]
13
15
  **account_id** | **String** | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. | [optional]
@@ -28,6 +30,7 @@ Name | Type | Description | Notes
28
30
  **autotranslate_use_machine_translation** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
29
31
  **autotranslate_use_translation_memory** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
30
32
  **autotranslate_overwrite_unverified_translations** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
33
+ **fallback_for_unverified_translations** | **Boolean** | (Optional) When enabled, the fallback locale&#39;s translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale. | [optional]
31
34
  **autocomplete_job_enabled** | **Boolean** | (Optional) Enable autocomplete-job behavior so that newly created keys and locales are automatically added to in-progress jobs. | [optional]
32
35
  **job_locking_enabled** | **Boolean** | (Optional) When enabled, translations are locked once a job moves into review. | [optional]
33
36
  **smart_suggest_enabled** | **Boolean** | (Optional) Enable Smart Suggest for the project. Defaults to &#x60;true&#x60; when omitted. | [optional]
@@ -47,7 +50,9 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
47
50
  main_format: yml,
48
51
  media: Python,
49
52
  shares_translation_memory: true,
50
- project_image: [B@1e92420f,
53
+ tm_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
54
+ term_base_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
55
+ project_image: [B@36dada39,
51
56
  remove_project_image: null,
52
57
  account_id: abcd1234,
53
58
  point_of_contact: abcd1234,
@@ -67,6 +72,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
67
72
  autotranslate_use_machine_translation: true,
68
73
  autotranslate_use_translation_memory: true,
69
74
  autotranslate_overwrite_unverified_translations: true,
75
+ fallback_for_unverified_translations: false,
70
76
  autocomplete_job_enabled: false,
71
77
  job_locking_enabled: false,
72
78
  smart_suggest_enabled: true,
@@ -75,7 +81,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
75
81
  translation_keys_sort_collation: unicode_ci,
76
82
  default_encoding: UTF-8,
77
83
  cldr_version: cldr48,
78
- placeholder_styles: [&quot;angular&quot;,&quot;iOS&quot;])
84
+ placeholder_styles: [&quot;rails_i18n&quot;,&quot;java_properties&quot;])
79
85
  ```
80
86
 
81
87
 
@@ -30,6 +30,7 @@ Name | Type | Description | Notes
30
30
  **autotranslate_use_machine_translation** | **Boolean** | | [optional]
31
31
  **autotranslate_use_translation_memory** | **Boolean** | | [optional]
32
32
  **autotranslate_overwrite_unverified_translations** | **Boolean** | | [optional]
33
+ **fallback_for_unverified_translations** | **Boolean** | | [optional]
33
34
  **autocomplete_job_enabled** | **Boolean** | | [optional]
34
35
  **default_encoding** | **String** | | [optional]
35
36
  **cldr_version** | **String** | | [optional]
@@ -68,11 +69,12 @@ instance = Phrase::ProjectDetails.new(id: null,
68
69
  autotranslate_use_machine_translation: false,
69
70
  autotranslate_use_translation_memory: true,
70
71
  autotranslate_overwrite_unverified_translations: false,
72
+ fallback_for_unverified_translations: false,
71
73
  autocomplete_job_enabled: false,
72
74
  default_encoding: UTF-8,
73
75
  cldr_version: legacy,
74
76
  job_locking_enabled: false,
75
- placeholder_styles: [&quot;angular&quot;,&quot;iOS&quot;],
77
+ placeholder_styles: [&quot;rails_i18n&quot;,&quot;java_properties&quot;],
76
78
  branch: null)
77
79
  ```
78
80