phrase 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -21
  3. data/docs/BlacklistedKeyCreateParameters.md +1 -1
  4. data/docs/BlacklistedKeyUpdateParameters.md +1 -1
  5. data/docs/BlacklistedKeysApi.md +20 -20
  6. data/docs/DistributionCreateParameters.md +2 -0
  7. data/docs/DistributionUpdateParameters.md +2 -0
  8. data/docs/GlossariesApi.md +20 -20
  9. data/docs/GlossaryTermTranslationsApi.md +12 -12
  10. data/docs/GlossaryTermsApi.md +20 -20
  11. data/docs/Locale.md +2 -0
  12. data/docs/LocaleCreateParameters.md +2 -0
  13. data/docs/LocaleDetails.md +2 -0
  14. data/docs/LocaleUpdateParameters.md +2 -0
  15. data/docs/VersionsHistoryApi.md +1 -1
  16. data/lib/phrase/api/blacklisted_keys_api.rb +20 -20
  17. data/lib/phrase/api/glossaries_api.rb +20 -20
  18. data/lib/phrase/api/glossary_term_translations_api.rb +12 -12
  19. data/lib/phrase/api/glossary_terms_api.rb +20 -20
  20. data/lib/phrase/api/versions_history_api.rb +2 -2
  21. data/lib/phrase/models/blacklisted_key_create_parameters.rb +1 -1
  22. data/lib/phrase/models/blacklisted_key_update_parameters.rb +1 -1
  23. data/lib/phrase/models/distribution_create_parameters.rb +11 -1
  24. data/lib/phrase/models/distribution_update_parameters.rb +11 -1
  25. data/lib/phrase/models/locale.rb +10 -1
  26. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  27. data/lib/phrase/models/locale_details.rb +10 -1
  28. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  29. data/lib/phrase/version.rb +1 -1
  30. data/spec/api/blacklisted_keys_api_spec.rb +10 -10
  31. data/spec/api/glossaries_api_spec.rb +10 -10
  32. data/spec/api/glossary_term_translations_api_spec.rb +6 -6
  33. data/spec/api/glossary_terms_api_spec.rb +10 -10
  34. data/spec/api/versions_history_api_spec.rb +1 -1
  35. data/spec/models/distribution_create_parameters_spec.rb +6 -0
  36. data/spec/models/distribution_update_parameters_spec.rb +6 -0
  37. data/spec/models/locale_create_parameters_spec.rb +6 -0
  38. data/spec/models/locale_details_spec.rb +6 -0
  39. data/spec/models/locale_spec.rb +6 -0
  40. data/spec/models/locale_update_parameters_spec.rb +6 -0
  41. metadata +200 -200
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
11
11
  **main** | **Boolean** | Indicates whether locale is a main locale. Main locales are part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Verification System</a> feature. | [optional]
12
12
  **rtl** | **Boolean** | Indicates whether locale is a RTL (Right-to-Left) locale. | [optional]
13
13
  **source_locale_id** | **String** | Source locale. Can be the name or public id of the locale. Preferred is the public id. | [optional]
14
+ **fallback_locale_id** | **String** | Fallback locale for empty translations. Can be a locale name or id. | [optional]
14
15
  **unverify_new_translations** | **Boolean** | Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature. | [optional]
15
16
  **unverify_updated_translations** | **Boolean** | Indicates that updated translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature. | [optional]
16
17
  **autotranslate** | **Boolean** | If set, translations for this locale will be fetched automatically, right after creation. | [optional]
@@ -27,6 +28,7 @@ instance = Phrase::LocaleUpdateParameters.new(branch: my-feature-branch,
27
28
  main: null,
28
29
  rtl: null,
29
30
  source_locale_id: abcd1234abcd1234abcd1234abcd1234,
31
+ fallback_locale_id: abcd1234abcd1234abcd1234abcd1234,
30
32
  unverify_new_translations: null,
31
33
  unverify_updated_translations: null,
32
34
  autotranslate: null)
@@ -82,7 +82,7 @@ Response<([**TranslationVersionWithUser**](TranslationVersionWithUser.md))>
82
82
 
83
83
  List all versions
84
84
 
85
- List all versions for the given translation.
85
+ List all changes done to a given translation.
86
86
 
87
87
  ### Example
88
88
 
@@ -7,8 +7,8 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
- # Create a blacklisted key
11
- # Create a new rule for blacklisting keys.
10
+ # Create a blocked key
11
+ # Create a new rule for blocking keys.
12
12
  # @param project_id [String] Project ID
13
13
  # @param blacklisted_key_create_parameters [BlacklistedKeyCreateParameters]
14
14
  # @param [Hash] opts the optional parameters
@@ -19,8 +19,8 @@ module Phrase
19
19
  data
20
20
  end
21
21
 
22
- # Create a blacklisted key
23
- # Create a new rule for blacklisting keys.
22
+ # Create a blocked key
23
+ # Create a new rule for blocking keys.
24
24
  # @param project_id [String] Project ID
25
25
  # @param blacklisted_key_create_parameters [BlacklistedKeyCreateParameters]
26
26
  # @param [Hash] opts the optional parameters
@@ -81,8 +81,8 @@ module Phrase
81
81
  return response, status_code, headers
82
82
  end
83
83
 
84
- # Delete a blacklisted key
85
- # Delete an existing rule for blacklisting keys.
84
+ # Delete a blocked key
85
+ # Delete an existing rule for blocking keys.
86
86
  # @param project_id [String] Project ID
87
87
  # @param id [String] ID
88
88
  # @param [Hash] opts the optional parameters
@@ -93,8 +93,8 @@ module Phrase
93
93
  data
94
94
  end
95
95
 
96
- # Delete a blacklisted key
97
- # Delete an existing rule for blacklisting keys.
96
+ # Delete a blocked key
97
+ # Delete an existing rule for blocking keys.
98
98
  # @param project_id [String] Project ID
99
99
  # @param id [String] ID
100
100
  # @param [Hash] opts the optional parameters
@@ -151,8 +151,8 @@ module Phrase
151
151
  return response, status_code, headers
152
152
  end
153
153
 
154
- # Get a single blacklisted key
155
- # Get details on a single rule for blacklisting keys for a given project.
154
+ # Get a single blocked key
155
+ # Get details on a single rule for blocking keys for a given project.
156
156
  # @param project_id [String] Project ID
157
157
  # @param id [String] ID
158
158
  # @param [Hash] opts the optional parameters
@@ -163,8 +163,8 @@ module Phrase
163
163
  data
164
164
  end
165
165
 
166
- # Get a single blacklisted key
167
- # Get details on a single rule for blacklisting keys for a given project.
166
+ # Get a single blocked key
167
+ # Get details on a single rule for blocking keys for a given project.
168
168
  # @param project_id [String] Project ID
169
169
  # @param id [String] ID
170
170
  # @param [Hash] opts the optional parameters
@@ -223,8 +223,8 @@ module Phrase
223
223
  return response, status_code, headers
224
224
  end
225
225
 
226
- # Update a blacklisted key
227
- # Update an existing rule for blacklisting keys.
226
+ # Update a blocked key
227
+ # Update an existing rule for blocking keys.
228
228
  # @param project_id [String] Project ID
229
229
  # @param id [String] ID
230
230
  # @param blacklisted_key_update_parameters [BlacklistedKeyUpdateParameters]
@@ -236,8 +236,8 @@ module Phrase
236
236
  data
237
237
  end
238
238
 
239
- # Update a blacklisted key
240
- # Update an existing rule for blacklisting keys.
239
+ # Update a blocked key
240
+ # Update an existing rule for blocking keys.
241
241
  # @param project_id [String] Project ID
242
242
  # @param id [String] ID
243
243
  # @param blacklisted_key_update_parameters [BlacklistedKeyUpdateParameters]
@@ -303,8 +303,8 @@ module Phrase
303
303
  return response, status_code, headers
304
304
  end
305
305
 
306
- # List blacklisted keys
307
- # List all rules for blacklisting keys for the given project.
306
+ # List blocked keys
307
+ # List all rules for blocking keys for the given project.
308
308
  # @param project_id [String] Project ID
309
309
  # @param [Hash] opts the optional parameters
310
310
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -317,8 +317,8 @@ module Phrase
317
317
  data
318
318
  end
319
319
 
320
- # List blacklisted keys
321
- # List all rules for blacklisting keys for the given project.
320
+ # List blocked keys
321
+ # List all rules for blocking keys for the given project.
322
322
  # @param project_id [String] Project ID
323
323
  # @param [Hash] opts the optional parameters
324
324
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -7,8 +7,8 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
- # List glossaries
11
- # List all glossaries the current user has access to.
10
+ # List term bases
11
+ # List all term bases (previously: glossaries) the current user has access to.
12
12
  # @param account_id [String] Account ID
13
13
  # @param [Hash] opts the optional parameters
14
14
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -20,8 +20,8 @@ module Phrase
20
20
  data
21
21
  end
22
22
 
23
- # List glossaries
24
- # List all glossaries the current user has access to.
23
+ # List term bases
24
+ # List all term bases (previously: glossaries) the current user has access to.
25
25
  # @param account_id [String] Account ID
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -79,8 +79,8 @@ module Phrase
79
79
  return response, status_code, headers
80
80
  end
81
81
 
82
- # Create a glossary
83
- # Create a new glossary.
82
+ # Create a term base
83
+ # Create a new term base (previously: glossary).
84
84
  # @param account_id [String] Account ID
85
85
  # @param glossary_create_parameters [GlossaryCreateParameters]
86
86
  # @param [Hash] opts the optional parameters
@@ -91,8 +91,8 @@ module Phrase
91
91
  data
92
92
  end
93
93
 
94
- # Create a glossary
95
- # Create a new glossary.
94
+ # Create a term base
95
+ # Create a new term base (previously: glossary).
96
96
  # @param account_id [String] Account ID
97
97
  # @param glossary_create_parameters [GlossaryCreateParameters]
98
98
  # @param [Hash] opts the optional parameters
@@ -153,8 +153,8 @@ module Phrase
153
153
  return response, status_code, headers
154
154
  end
155
155
 
156
- # Delete a glossary
157
- # Delete an existing glossary.
156
+ # Delete a term base
157
+ # Delete an existing term base (previously: glossary).
158
158
  # @param account_id [String] Account ID
159
159
  # @param id [String] ID
160
160
  # @param [Hash] opts the optional parameters
@@ -165,8 +165,8 @@ module Phrase
165
165
  data
166
166
  end
167
167
 
168
- # Delete a glossary
169
- # Delete an existing glossary.
168
+ # Delete a term base
169
+ # Delete an existing term base (previously: glossary).
170
170
  # @param account_id [String] Account ID
171
171
  # @param id [String] ID
172
172
  # @param [Hash] opts the optional parameters
@@ -223,8 +223,8 @@ module Phrase
223
223
  return response, status_code, headers
224
224
  end
225
225
 
226
- # Get a single glossary
227
- # Get details on a single glossary.
226
+ # Get a single term base
227
+ # Get details on a single term base (previously: glossary).
228
228
  # @param account_id [String] Account ID
229
229
  # @param id [String] ID
230
230
  # @param [Hash] opts the optional parameters
@@ -235,8 +235,8 @@ module Phrase
235
235
  data
236
236
  end
237
237
 
238
- # Get a single glossary
239
- # Get details on a single glossary.
238
+ # Get a single term base
239
+ # Get details on a single term base (previously: glossary).
240
240
  # @param account_id [String] Account ID
241
241
  # @param id [String] ID
242
242
  # @param [Hash] opts the optional parameters
@@ -295,8 +295,8 @@ module Phrase
295
295
  return response, status_code, headers
296
296
  end
297
297
 
298
- # Update a glossary
299
- # Update an existing glossary.
298
+ # Update a term base
299
+ # Update an existing term base (previously: glossary).
300
300
  # @param account_id [String] Account ID
301
301
  # @param id [String] ID
302
302
  # @param glossary_update_parameters [GlossaryUpdateParameters]
@@ -308,8 +308,8 @@ module Phrase
308
308
  data
309
309
  end
310
310
 
311
- # Update a glossary
312
- # Update an existing glossary.
311
+ # Update a term base
312
+ # Update an existing term base (previously: glossary).
313
313
  # @param account_id [String] Account ID
314
314
  # @param id [String] ID
315
315
  # @param glossary_update_parameters [GlossaryUpdateParameters]
@@ -7,8 +7,8 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
- # Create a glossary term translation
11
- # Create a new glossary term translation.
10
+ # Create a translation for a term
11
+ # Create a new translation for a term in a term base (previously: glossary).
12
12
  # @param account_id [String] Account ID
13
13
  # @param glossary_id [String] Glossary ID
14
14
  # @param term_id [String] Term ID
@@ -21,8 +21,8 @@ module Phrase
21
21
  data
22
22
  end
23
23
 
24
- # Create a glossary term translation
25
- # Create a new glossary term translation.
24
+ # Create a translation for a term
25
+ # Create a new translation for a term in a term base (previously: glossary).
26
26
  # @param account_id [String] Account ID
27
27
  # @param glossary_id [String] Glossary ID
28
28
  # @param term_id [String] Term ID
@@ -93,8 +93,8 @@ module Phrase
93
93
  return response, status_code, headers
94
94
  end
95
95
 
96
- # Delete a glossary term translation
97
- # Delete an existing glossary term translation.
96
+ # Delete a translation for a term
97
+ # Delete an existing translation of a term in a term base (previously: glossary).
98
98
  # @param account_id [String] Account ID
99
99
  # @param glossary_id [String] Glossary ID
100
100
  # @param term_id [String] Term ID
@@ -107,8 +107,8 @@ module Phrase
107
107
  data
108
108
  end
109
109
 
110
- # Delete a glossary term translation
111
- # Delete an existing glossary term translation.
110
+ # Delete a translation for a term
111
+ # Delete an existing translation of a term in a term base (previously: glossary).
112
112
  # @param account_id [String] Account ID
113
113
  # @param glossary_id [String] Glossary ID
114
114
  # @param term_id [String] Term ID
@@ -175,8 +175,8 @@ module Phrase
175
175
  return response, status_code, headers
176
176
  end
177
177
 
178
- # Update a glossary term translation
179
- # Update an existing glossary term translation.
178
+ # Update a translation for a term
179
+ # Update an existing translation for a term in a term base (previously: glossary).
180
180
  # @param account_id [String] Account ID
181
181
  # @param glossary_id [String] Glossary ID
182
182
  # @param term_id [String] Term ID
@@ -190,8 +190,8 @@ module Phrase
190
190
  data
191
191
  end
192
192
 
193
- # Update a glossary term translation
194
- # Update an existing glossary term translation.
193
+ # Update a translation for a term
194
+ # Update an existing translation for a term in a term base (previously: glossary).
195
195
  # @param account_id [String] Account ID
196
196
  # @param glossary_id [String] Glossary ID
197
197
  # @param term_id [String] Term ID
@@ -7,8 +7,8 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
- # Create a glossary term
11
- # Create a new glossary term.
10
+ # Create a term
11
+ # Create a new term in a term base (previously: glossary).
12
12
  # @param account_id [String] Account ID
13
13
  # @param glossary_id [String] Glossary ID
14
14
  # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
@@ -20,8 +20,8 @@ module Phrase
20
20
  data
21
21
  end
22
22
 
23
- # Create a glossary term
24
- # Create a new glossary term.
23
+ # Create a term
24
+ # Create a new term in a term base (previously: glossary).
25
25
  # @param account_id [String] Account ID
26
26
  # @param glossary_id [String] Glossary ID
27
27
  # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
@@ -87,8 +87,8 @@ module Phrase
87
87
  return response, status_code, headers
88
88
  end
89
89
 
90
- # Delete a glossary term
91
- # Delete an existing glossary term.
90
+ # Delete a term
91
+ # Delete an existing term in a term base (previously: glossary).
92
92
  # @param account_id [String] Account ID
93
93
  # @param glossary_id [String] Glossary ID
94
94
  # @param id [String] ID
@@ -100,8 +100,8 @@ module Phrase
100
100
  data
101
101
  end
102
102
 
103
- # Delete a glossary term
104
- # Delete an existing glossary term.
103
+ # Delete a term
104
+ # Delete an existing term in a term base (previously: glossary).
105
105
  # @param account_id [String] Account ID
106
106
  # @param glossary_id [String] Glossary ID
107
107
  # @param id [String] ID
@@ -163,8 +163,8 @@ module Phrase
163
163
  return response, status_code, headers
164
164
  end
165
165
 
166
- # Get a single glossary term
167
- # Get details on a single glossary term.
166
+ # Get a single term
167
+ # Get details for a single term in the term base (previously: glossary).
168
168
  # @param account_id [String] Account ID
169
169
  # @param glossary_id [String] Glossary ID
170
170
  # @param id [String] ID
@@ -176,8 +176,8 @@ module Phrase
176
176
  data
177
177
  end
178
178
 
179
- # Get a single glossary term
180
- # Get details on a single glossary term.
179
+ # Get a single term
180
+ # Get details for a single term in the term base (previously: glossary).
181
181
  # @param account_id [String] Account ID
182
182
  # @param glossary_id [String] Glossary ID
183
183
  # @param id [String] ID
@@ -241,8 +241,8 @@ module Phrase
241
241
  return response, status_code, headers
242
242
  end
243
243
 
244
- # Update a glossary term
245
- # Update an existing glossary term.
244
+ # Update a term
245
+ # Update an existing term in a term base (previously: glossary).
246
246
  # @param account_id [String] Account ID
247
247
  # @param glossary_id [String] Glossary ID
248
248
  # @param id [String] ID
@@ -255,8 +255,8 @@ module Phrase
255
255
  data
256
256
  end
257
257
 
258
- # Update a glossary term
259
- # Update an existing glossary term.
258
+ # Update a term
259
+ # Update an existing term in a term base (previously: glossary).
260
260
  # @param account_id [String] Account ID
261
261
  # @param glossary_id [String] Glossary ID
262
262
  # @param id [String] ID
@@ -327,8 +327,8 @@ module Phrase
327
327
  return response, status_code, headers
328
328
  end
329
329
 
330
- # List glossary terms
331
- # List all glossary terms the current user has access to.
330
+ # List terms
331
+ # List all terms in term bases (previously: glossary) that the current user has access to.
332
332
  # @param account_id [String] Account ID
333
333
  # @param glossary_id [String] Glossary ID
334
334
  # @param [Hash] opts the optional parameters
@@ -341,8 +341,8 @@ module Phrase
341
341
  data
342
342
  end
343
343
 
344
- # List glossary terms
345
- # List all glossary terms the current user has access to.
344
+ # List terms
345
+ # List all terms in term bases (previously: glossary) that the current user has access to.
346
346
  # @param account_id [String] Account ID
347
347
  # @param glossary_id [String] Glossary ID
348
348
  # @param [Hash] opts the optional parameters
@@ -89,7 +89,7 @@ module Phrase
89
89
  end
90
90
 
91
91
  # List all versions
92
- # List all versions for the given translation.
92
+ # List all changes done to a given translation.
93
93
  # @param project_id [String] Project ID
94
94
  # @param translation_id [String] Translation ID
95
95
  # @param [Hash] opts the optional parameters
@@ -104,7 +104,7 @@ module Phrase
104
104
  end
105
105
 
106
106
  # List all versions
107
- # List all versions for the given translation.
107
+ # List all changes done to a given translation.
108
108
  # @param project_id [String] Project ID
109
109
  # @param translation_id [String] Translation ID
110
110
  # @param [Hash] opts the optional parameters
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class BlacklistedKeyCreateParameters
5
- # Blacklisted key name
5
+ # Blocked key name
6
6
  attr_accessor :name
7
7
 
8
8
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class BlacklistedKeyUpdateParameters
5
- # Blacklisted key name
5
+ # Blocked key name
6
6
  attr_accessor :name
7
7
 
8
8
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -17,6 +17,9 @@ module Phrase
17
17
  # Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
18
18
  attr_accessor :format_options
19
19
 
20
+ # Use fallback locale if there is no translation in the current locale.
21
+ attr_accessor :fallback_locales_enabled
22
+
20
23
  # Indicates whether to fallback to non regional locale when locale can not be found
21
24
  attr_accessor :fallback_to_non_regional_locale
22
25
 
@@ -34,6 +37,7 @@ module Phrase
34
37
  :'platforms' => :'platforms',
35
38
  :'locale_ids' => :'locale_ids',
36
39
  :'format_options' => :'format_options',
40
+ :'fallback_locales_enabled' => :'fallback_locales_enabled',
37
41
  :'fallback_to_non_regional_locale' => :'fallback_to_non_regional_locale',
38
42
  :'fallback_to_default_locale' => :'fallback_to_default_locale',
39
43
  :'use_last_reviewed_version' => :'use_last_reviewed_version'
@@ -48,6 +52,7 @@ module Phrase
48
52
  :'platforms' => :'Array<String>',
49
53
  :'locale_ids' => :'Array<String>',
50
54
  :'format_options' => :'Hash<String, String>',
55
+ :'fallback_locales_enabled' => :'Boolean',
51
56
  :'fallback_to_non_regional_locale' => :'Boolean',
52
57
  :'fallback_to_default_locale' => :'Boolean',
53
58
  :'use_last_reviewed_version' => :'Boolean'
@@ -101,6 +106,10 @@ module Phrase
101
106
  end
102
107
  end
103
108
 
109
+ if attributes.key?(:'fallback_locales_enabled')
110
+ self.fallback_locales_enabled = attributes[:'fallback_locales_enabled']
111
+ end
112
+
104
113
  if attributes.key?(:'fallback_to_non_regional_locale')
105
114
  self.fallback_to_non_regional_locale = attributes[:'fallback_to_non_regional_locale']
106
115
  end
@@ -137,6 +146,7 @@ module Phrase
137
146
  platforms == o.platforms &&
138
147
  locale_ids == o.locale_ids &&
139
148
  format_options == o.format_options &&
149
+ fallback_locales_enabled == o.fallback_locales_enabled &&
140
150
  fallback_to_non_regional_locale == o.fallback_to_non_regional_locale &&
141
151
  fallback_to_default_locale == o.fallback_to_default_locale &&
142
152
  use_last_reviewed_version == o.use_last_reviewed_version
@@ -151,7 +161,7 @@ module Phrase
151
161
  # Calculates hash code according to all attributes.
152
162
  # @return [Integer] Hash code
153
163
  def hash
154
- [name, project_id, platforms, locale_ids, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
164
+ [name, project_id, platforms, locale_ids, format_options, fallback_locales_enabled, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
155
165
  end
156
166
 
157
167
  # Builds the object from hash
@@ -17,6 +17,9 @@ module Phrase
17
17
  # Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
18
18
  attr_accessor :format_options
19
19
 
20
+ # Use fallback locale if there is no translation in the current locale.
21
+ attr_accessor :fallback_locales_enabled
22
+
20
23
  # Indicates whether to fallback to non regional locale when locale can not be found
21
24
  attr_accessor :fallback_to_non_regional_locale
22
25
 
@@ -34,6 +37,7 @@ module Phrase
34
37
  :'platforms' => :'platforms',
35
38
  :'locale_ids' => :'locale_ids',
36
39
  :'format_options' => :'format_options',
40
+ :'fallback_locales_enabled' => :'fallback_locales_enabled',
37
41
  :'fallback_to_non_regional_locale' => :'fallback_to_non_regional_locale',
38
42
  :'fallback_to_default_locale' => :'fallback_to_default_locale',
39
43
  :'use_last_reviewed_version' => :'use_last_reviewed_version'
@@ -48,6 +52,7 @@ module Phrase
48
52
  :'platforms' => :'Array<String>',
49
53
  :'locale_ids' => :'Array<String>',
50
54
  :'format_options' => :'Hash<String, String>',
55
+ :'fallback_locales_enabled' => :'Boolean',
51
56
  :'fallback_to_non_regional_locale' => :'Boolean',
52
57
  :'fallback_to_default_locale' => :'Boolean',
53
58
  :'use_last_reviewed_version' => :'Boolean'
@@ -101,6 +106,10 @@ module Phrase
101
106
  end
102
107
  end
103
108
 
109
+ if attributes.key?(:'fallback_locales_enabled')
110
+ self.fallback_locales_enabled = attributes[:'fallback_locales_enabled']
111
+ end
112
+
104
113
  if attributes.key?(:'fallback_to_non_regional_locale')
105
114
  self.fallback_to_non_regional_locale = attributes[:'fallback_to_non_regional_locale']
106
115
  end
@@ -137,6 +146,7 @@ module Phrase
137
146
  platforms == o.platforms &&
138
147
  locale_ids == o.locale_ids &&
139
148
  format_options == o.format_options &&
149
+ fallback_locales_enabled == o.fallback_locales_enabled &&
140
150
  fallback_to_non_regional_locale == o.fallback_to_non_regional_locale &&
141
151
  fallback_to_default_locale == o.fallback_to_default_locale &&
142
152
  use_last_reviewed_version == o.use_last_reviewed_version
@@ -151,7 +161,7 @@ module Phrase
151
161
  # Calculates hash code according to all attributes.
152
162
  # @return [Integer] Hash code
153
163
  def hash
154
- [name, project_id, platforms, locale_ids, format_options, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
164
+ [name, project_id, platforms, locale_ids, format_options, fallback_locales_enabled, fallback_to_non_regional_locale, fallback_to_default_locale, use_last_reviewed_version].hash
155
165
  end
156
166
 
157
167
  # Builds the object from hash
@@ -18,6 +18,8 @@ module Phrase
18
18
 
19
19
  attr_accessor :source_locale
20
20
 
21
+ attr_accessor :fallback_locale
22
+
21
23
  attr_accessor :created_at
22
24
 
23
25
  attr_accessor :updated_at
@@ -33,6 +35,7 @@ module Phrase
33
35
  :'rtl' => :'rtl',
34
36
  :'plural_forms' => :'plural_forms',
35
37
  :'source_locale' => :'source_locale',
38
+ :'fallback_locale' => :'fallback_locale',
36
39
  :'created_at' => :'created_at',
37
40
  :'updated_at' => :'updated_at'
38
41
  }
@@ -49,6 +52,7 @@ module Phrase
49
52
  :'rtl' => :'Boolean',
50
53
  :'plural_forms' => :'Array<String>',
51
54
  :'source_locale' => :'LocalePreview',
55
+ :'fallback_locale' => :'LocalePreview',
52
56
  :'created_at' => :'DateTime',
53
57
  :'updated_at' => :'DateTime'
54
58
  }
@@ -109,6 +113,10 @@ module Phrase
109
113
  self.source_locale = attributes[:'source_locale']
110
114
  end
111
115
 
116
+ if attributes.key?(:'fallback_locale')
117
+ self.fallback_locale = attributes[:'fallback_locale']
118
+ end
119
+
112
120
  if attributes.key?(:'created_at')
113
121
  self.created_at = attributes[:'created_at']
114
122
  end
@@ -144,6 +152,7 @@ module Phrase
144
152
  rtl == o.rtl &&
145
153
  plural_forms == o.plural_forms &&
146
154
  source_locale == o.source_locale &&
155
+ fallback_locale == o.fallback_locale &&
147
156
  created_at == o.created_at &&
148
157
  updated_at == o.updated_at
149
158
  end
@@ -157,7 +166,7 @@ module Phrase
157
166
  # Calculates hash code according to all attributes.
158
167
  # @return [Integer] Hash code
159
168
  def hash
160
- [id, name, code, default, main, rtl, plural_forms, source_locale, created_at, updated_at].hash
169
+ [id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
161
170
  end
162
171
 
163
172
  # Builds the object from hash
@@ -23,6 +23,9 @@ module Phrase
23
23
  # Source locale. Can be the name or public id of the locale. Preferred is the public id.
24
24
  attr_accessor :source_locale_id
25
25
 
26
+ # Fallback locale for empty translations. Can be a locale name or id.
27
+ attr_accessor :fallback_locale_id
28
+
26
29
  # Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
27
30
  attr_accessor :unverify_new_translations
28
31
 
@@ -42,6 +45,7 @@ module Phrase
42
45
  :'main' => :'main',
43
46
  :'rtl' => :'rtl',
44
47
  :'source_locale_id' => :'source_locale_id',
48
+ :'fallback_locale_id' => :'fallback_locale_id',
45
49
  :'unverify_new_translations' => :'unverify_new_translations',
46
50
  :'unverify_updated_translations' => :'unverify_updated_translations',
47
51
  :'autotranslate' => :'autotranslate'
@@ -58,6 +62,7 @@ module Phrase
58
62
  :'main' => :'Boolean',
59
63
  :'rtl' => :'Boolean',
60
64
  :'source_locale_id' => :'String',
65
+ :'fallback_locale_id' => :'String',
61
66
  :'unverify_new_translations' => :'Boolean',
62
67
  :'unverify_updated_translations' => :'Boolean',
63
68
  :'autotranslate' => :'Boolean'
@@ -113,6 +118,10 @@ module Phrase
113
118
  self.source_locale_id = attributes[:'source_locale_id']
114
119
  end
115
120
 
121
+ if attributes.key?(:'fallback_locale_id')
122
+ self.fallback_locale_id = attributes[:'fallback_locale_id']
123
+ end
124
+
116
125
  if attributes.key?(:'unverify_new_translations')
117
126
  self.unverify_new_translations = attributes[:'unverify_new_translations']
118
127
  end
@@ -151,6 +160,7 @@ module Phrase
151
160
  main == o.main &&
152
161
  rtl == o.rtl &&
153
162
  source_locale_id == o.source_locale_id &&
163
+ fallback_locale_id == o.fallback_locale_id &&
154
164
  unverify_new_translations == o.unverify_new_translations &&
155
165
  unverify_updated_translations == o.unverify_updated_translations &&
156
166
  autotranslate == o.autotranslate
@@ -165,7 +175,7 @@ module Phrase
165
175
  # Calculates hash code according to all attributes.
166
176
  # @return [Integer] Hash code
167
177
  def hash
168
- [branch, name, code, default, main, rtl, source_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
178
+ [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate].hash
169
179
  end
170
180
 
171
181
  # Builds the object from hash