phrase 4.5.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +12 -3
- data/docs/BranchesApi.md +3 -3
- data/docs/DistributionCreateParameters.md +1 -1
- data/docs/DistributionUpdateParameters.md +1 -1
- data/docs/InvitationCreateParameters.md +2 -2
- data/docs/InvitationsApi.md +7 -7
- data/docs/JobAnnotation.md +23 -0
- data/docs/JobAnnotationShort.md +19 -0
- data/docs/JobAnnotationUpdateParameters.md +19 -0
- data/docs/JobAnnotationsApi.md +416 -0
- data/docs/JobDetails.md +3 -1
- data/docs/JobLocale.md +3 -1
- data/docs/JobLocalesApi.md +6 -2
- data/docs/JobsApi.md +8 -6
- data/docs/KeyCreateParameters.md +3 -1
- data/docs/KeyPreview.md +3 -1
- data/docs/KeyUpdateParameters.md +3 -1
- data/docs/KeysApi.md +4 -4
- data/docs/KeysExcludeParameters.md +1 -1
- data/docs/KeysIncludeParameters.md +1 -1
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/Locale.md +2 -0
- data/docs/LocaleCreateParameters.md +3 -3
- data/docs/LocaleDetails.md +2 -0
- data/docs/LocaleDownloadCreateParameters.md +7 -5
- data/docs/LocaleDownloadsApi.md +8 -8
- data/docs/LocaleUpdateParameters.md +3 -3
- data/docs/LocalesApi.md +17 -15
- data/docs/MemberUpdateParameters.md +1 -1
- data/docs/MembersApi.md +5 -5
- data/docs/OrdersApi.md +1 -1
- data/docs/ProjectCreateParameters.md +5 -5
- data/docs/ProjectUpdateParameters.md +6 -6
- data/docs/ReleaseTriggersApi.md +1 -1
- data/docs/ScreenshotMarkerCreateParameters.md +1 -1
- data/docs/ScreenshotMarkerUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/SearchApi.md +1 -1
- data/docs/TagsApi.md +2 -0
- data/docs/TranslationCreateParameters.md +1 -1
- data/docs/TranslationKey.md +2 -0
- data/docs/TranslationKeyDetails.md +2 -0
- data/docs/TranslationUpdateParameters.md +1 -1
- data/docs/TranslationsApi.md +13 -13
- data/docs/TranslationsExcludeParameters.md +1 -1
- data/docs/TranslationsIncludeParameters.md +1 -1
- data/docs/TranslationsReviewParameters.md +1 -1
- data/docs/TranslationsSearchParameters.md +1 -1
- data/docs/TranslationsUnreviewParameters.md +1 -1
- data/docs/TranslationsUnverifyParameters.md +1 -1
- data/docs/TranslationsVerifyParameters.md +1 -1
- data/lib/phrase/api/branches_api.rb +6 -6
- data/lib/phrase/api/invitations_api.rb +14 -14
- data/lib/phrase/api/job_annotations_api.rb +508 -0
- data/lib/phrase/api/job_locales_api.rb +6 -0
- data/lib/phrase/api/jobs_api.rb +9 -6
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locale_downloads_api.rb +8 -8
- data/lib/phrase/api/locales_api.rb +17 -14
- data/lib/phrase/api/members_api.rb +10 -10
- data/lib/phrase/api/orders_api.rb +2 -2
- data/lib/phrase/api/release_triggers_api.rb +2 -2
- data/lib/phrase/api/search_api.rb +2 -2
- data/lib/phrase/api/tags_api.rb +3 -0
- data/lib/phrase/api/translations_api.rb +16 -16
- data/lib/phrase/models/distribution_create_parameters.rb +1 -1
- data/lib/phrase/models/distribution_update_parameters.rb +1 -1
- data/lib/phrase/models/invitation_create_parameters.rb +2 -2
- data/lib/phrase/models/job_annotation.rb +233 -0
- data/lib/phrase/models/job_annotation_short.rb +215 -0
- data/lib/phrase/models/job_annotation_update_parameters.rb +207 -0
- data/lib/phrase/models/job_details.rb +15 -4
- data/lib/phrase/models/job_locale.rb +15 -4
- data/lib/phrase/models/key_create_parameters.rb +11 -1
- data/lib/phrase/models/key_preview.rb +13 -4
- data/lib/phrase/models/key_update_parameters.rb +11 -1
- data/lib/phrase/models/keys_exclude_parameters.rb +1 -1
- data/lib/phrase/models/keys_include_parameters.rb +1 -1
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/locale.rb +12 -1
- data/lib/phrase/models/locale_create_parameters.rb +3 -3
- data/lib/phrase/models/locale_details.rb +12 -1
- data/lib/phrase/models/locale_download_create_parameters.rb +18 -8
- data/lib/phrase/models/locale_update_parameters.rb +3 -3
- data/lib/phrase/models/member_update_parameters.rb +1 -1
- data/lib/phrase/models/project_create_parameters.rb +4 -4
- data/lib/phrase/models/project_update_parameters.rb +5 -5
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +1 -1
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +1 -1
- data/lib/phrase/models/translation_create_parameters.rb +1 -1
- data/lib/phrase/models/translation_key.rb +10 -1
- data/lib/phrase/models/translation_key_details.rb +10 -1
- data/lib/phrase/models/translation_update_parameters.rb +1 -1
- data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
- data/lib/phrase/models/translations_include_parameters.rb +1 -1
- data/lib/phrase/models/translations_review_parameters.rb +1 -1
- data/lib/phrase/models/translations_search_parameters.rb +1 -1
- data/lib/phrase/models/translations_unreview_parameters.rb +1 -1
- data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
- data/lib/phrase/models/translations_verify_parameters.rb +1 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +4 -0
- data/spec/api/branches_api_spec.rb +3 -3
- data/spec/api/invitations_api_spec.rb +7 -7
- data/spec/api/job_annotations_api_spec.rb +120 -0
- data/spec/api/job_locales_api_spec.rb +2 -0
- data/spec/api/jobs_api_spec.rb +4 -3
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locale_downloads_api_spec.rb +4 -4
- data/spec/api/members_api_spec.rb +5 -5
- data/spec/api/orders_api_spec.rb +1 -1
- data/spec/api/release_triggers_api_spec.rb +1 -1
- data/spec/api/search_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +1 -0
- data/spec/api/translations_api_spec.rb +8 -8
- data/spec/models/job_annotation_short_spec.rb +35 -0
- data/spec/models/job_annotation_spec.rb +47 -0
- data/spec/models/job_annotation_update_parameters_spec.rb +35 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/job_locale_spec.rb +6 -0
- data/spec/models/key_create_parameters_spec.rb +6 -0
- data/spec/models/key_preview_spec.rb +6 -0
- data/spec/models/key_update_parameters_spec.rb +6 -0
- data/spec/models/locale_details_spec.rb +6 -0
- data/spec/models/locale_download_create_parameters_spec.rb +6 -0
- data/spec/models/locale_spec.rb +6 -0
- data/spec/models/translation_key_details_spec.rb +6 -0
- data/spec/models/translation_key_spec.rb +6 -0
- metadata +247 -231
@@ -18,6 +18,8 @@ module Phrase
|
|
18
18
|
|
19
19
|
attr_accessor :review_completed_at
|
20
20
|
|
21
|
+
attr_accessor :annotations
|
22
|
+
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
@@ -28,7 +30,8 @@ module Phrase
|
|
28
30
|
:'teams' => :'teams',
|
29
31
|
:'completed' => :'completed',
|
30
32
|
:'translation_completed_at' => :'translation_completed_at',
|
31
|
-
:'review_completed_at' => :'review_completed_at'
|
33
|
+
:'review_completed_at' => :'review_completed_at',
|
34
|
+
:'annotations' => :'annotations'
|
32
35
|
}
|
33
36
|
end
|
34
37
|
|
@@ -42,7 +45,8 @@ module Phrase
|
|
42
45
|
:'teams' => :'Array<LocaleTeamPreview>',
|
43
46
|
:'completed' => :'Boolean',
|
44
47
|
:'translation_completed_at' => :'DateTime',
|
45
|
-
:'review_completed_at' => :'DateTime'
|
48
|
+
:'review_completed_at' => :'DateTime',
|
49
|
+
:'annotations' => :'Array<JobAnnotationShort>'
|
46
50
|
}
|
47
51
|
end
|
48
52
|
|
@@ -102,6 +106,12 @@ module Phrase
|
|
102
106
|
if attributes.key?(:'review_completed_at')
|
103
107
|
self.review_completed_at = attributes[:'review_completed_at']
|
104
108
|
end
|
109
|
+
|
110
|
+
if attributes.key?(:'annotations')
|
111
|
+
if (value = attributes[:'annotations']).is_a?(Array)
|
112
|
+
self.annotations = value
|
113
|
+
end
|
114
|
+
end
|
105
115
|
end
|
106
116
|
|
107
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -129,7 +139,8 @@ module Phrase
|
|
129
139
|
teams == o.teams &&
|
130
140
|
completed == o.completed &&
|
131
141
|
translation_completed_at == o.translation_completed_at &&
|
132
|
-
review_completed_at == o.review_completed_at
|
142
|
+
review_completed_at == o.review_completed_at &&
|
143
|
+
annotations == o.annotations
|
133
144
|
end
|
134
145
|
|
135
146
|
# @see the `==` method
|
@@ -141,7 +152,7 @@ module Phrase
|
|
141
152
|
# Calculates hash code according to all attributes.
|
142
153
|
# @return [Integer] Hash code
|
143
154
|
def hash
|
144
|
-
[id, job, locale, users, teams, completed, translation_completed_at, review_completed_at].hash
|
155
|
+
[id, job, locale, users, teams, completed, translation_completed_at, review_completed_at, annotations].hash
|
145
156
|
end
|
146
157
|
|
147
158
|
# Builds the object from hash
|
@@ -14,6 +14,9 @@ module Phrase
|
|
14
14
|
# Indicates whether key supports pluralization
|
15
15
|
attr_accessor :plural
|
16
16
|
|
17
|
+
# Indicates whether key uses ordinal rules for pluralization
|
18
|
+
attr_accessor :use_ordinal_rules
|
19
|
+
|
17
20
|
# Plural name for the key (used in some file formats, e.g. Gettext)
|
18
21
|
attr_accessor :name_plural
|
19
22
|
|
@@ -63,6 +66,7 @@ module Phrase
|
|
63
66
|
:'name' => :'name',
|
64
67
|
:'description' => :'description',
|
65
68
|
:'plural' => :'plural',
|
69
|
+
:'use_ordinal_rules' => :'use_ordinal_rules',
|
66
70
|
:'name_plural' => :'name_plural',
|
67
71
|
:'data_type' => :'data_type',
|
68
72
|
:'tags' => :'tags',
|
@@ -87,6 +91,7 @@ module Phrase
|
|
87
91
|
:'name' => :'String',
|
88
92
|
:'description' => :'String',
|
89
93
|
:'plural' => :'Boolean',
|
94
|
+
:'use_ordinal_rules' => :'Boolean',
|
90
95
|
:'name_plural' => :'String',
|
91
96
|
:'data_type' => :'String',
|
92
97
|
:'tags' => :'String',
|
@@ -141,6 +146,10 @@ module Phrase
|
|
141
146
|
self.plural = attributes[:'plural']
|
142
147
|
end
|
143
148
|
|
149
|
+
if attributes.key?(:'use_ordinal_rules')
|
150
|
+
self.use_ordinal_rules = attributes[:'use_ordinal_rules']
|
151
|
+
end
|
152
|
+
|
144
153
|
if attributes.key?(:'name_plural')
|
145
154
|
self.name_plural = attributes[:'name_plural']
|
146
155
|
end
|
@@ -225,6 +234,7 @@ module Phrase
|
|
225
234
|
name == o.name &&
|
226
235
|
description == o.description &&
|
227
236
|
plural == o.plural &&
|
237
|
+
use_ordinal_rules == o.use_ordinal_rules &&
|
228
238
|
name_plural == o.name_plural &&
|
229
239
|
data_type == o.data_type &&
|
230
240
|
tags == o.tags &&
|
@@ -250,7 +260,7 @@ module Phrase
|
|
250
260
|
# Calculates hash code according to all attributes.
|
251
261
|
# @return [Integer] Hash code
|
252
262
|
def hash
|
253
|
-
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
263
|
+
[branch, name, description, plural, use_ordinal_rules, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
254
264
|
end
|
255
265
|
|
256
266
|
# Builds the object from hash
|
@@ -8,12 +8,15 @@ module Phrase
|
|
8
8
|
|
9
9
|
attr_accessor :plural
|
10
10
|
|
11
|
+
attr_accessor :use_ordinal_rules
|
12
|
+
|
11
13
|
# Attribute mapping from ruby-style variable name to JSON key.
|
12
14
|
def self.attribute_map
|
13
15
|
{
|
14
16
|
:'id' => :'id',
|
15
17
|
:'name' => :'name',
|
16
|
-
:'plural' => :'plural'
|
18
|
+
:'plural' => :'plural',
|
19
|
+
:'use_ordinal_rules' => :'use_ordinal_rules'
|
17
20
|
}
|
18
21
|
end
|
19
22
|
|
@@ -22,7 +25,8 @@ module Phrase
|
|
22
25
|
{
|
23
26
|
:'id' => :'String',
|
24
27
|
:'name' => :'String',
|
25
|
-
:'plural' => :'Boolean'
|
28
|
+
:'plural' => :'Boolean',
|
29
|
+
:'use_ordinal_rules' => :'Boolean'
|
26
30
|
}
|
27
31
|
end
|
28
32
|
|
@@ -58,6 +62,10 @@ module Phrase
|
|
58
62
|
if attributes.key?(:'plural')
|
59
63
|
self.plural = attributes[:'plural']
|
60
64
|
end
|
65
|
+
|
66
|
+
if attributes.key?(:'use_ordinal_rules')
|
67
|
+
self.use_ordinal_rules = attributes[:'use_ordinal_rules']
|
68
|
+
end
|
61
69
|
end
|
62
70
|
|
63
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -80,7 +88,8 @@ module Phrase
|
|
80
88
|
self.class == o.class &&
|
81
89
|
id == o.id &&
|
82
90
|
name == o.name &&
|
83
|
-
plural == o.plural
|
91
|
+
plural == o.plural &&
|
92
|
+
use_ordinal_rules == o.use_ordinal_rules
|
84
93
|
end
|
85
94
|
|
86
95
|
# @see the `==` method
|
@@ -92,7 +101,7 @@ module Phrase
|
|
92
101
|
# Calculates hash code according to all attributes.
|
93
102
|
# @return [Integer] Hash code
|
94
103
|
def hash
|
95
|
-
[id, name, plural].hash
|
104
|
+
[id, name, plural, use_ordinal_rules].hash
|
96
105
|
end
|
97
106
|
|
98
107
|
# Builds the object from hash
|
@@ -14,6 +14,9 @@ module Phrase
|
|
14
14
|
# Indicates whether key supports pluralization
|
15
15
|
attr_accessor :plural
|
16
16
|
|
17
|
+
# Indicates whether key uses ordinal rules for pluralization
|
18
|
+
attr_accessor :use_ordinal_rules
|
19
|
+
|
17
20
|
# Plural name for the key (used in some file formats, e.g. Gettext)
|
18
21
|
attr_accessor :name_plural
|
19
22
|
|
@@ -57,6 +60,7 @@ module Phrase
|
|
57
60
|
:'name' => :'name',
|
58
61
|
:'description' => :'description',
|
59
62
|
:'plural' => :'plural',
|
63
|
+
:'use_ordinal_rules' => :'use_ordinal_rules',
|
60
64
|
:'name_plural' => :'name_plural',
|
61
65
|
:'data_type' => :'data_type',
|
62
66
|
:'tags' => :'tags',
|
@@ -79,6 +83,7 @@ module Phrase
|
|
79
83
|
:'name' => :'String',
|
80
84
|
:'description' => :'String',
|
81
85
|
:'plural' => :'Boolean',
|
86
|
+
:'use_ordinal_rules' => :'Boolean',
|
82
87
|
:'name_plural' => :'String',
|
83
88
|
:'data_type' => :'String',
|
84
89
|
:'tags' => :'String',
|
@@ -131,6 +136,10 @@ module Phrase
|
|
131
136
|
self.plural = attributes[:'plural']
|
132
137
|
end
|
133
138
|
|
139
|
+
if attributes.key?(:'use_ordinal_rules')
|
140
|
+
self.use_ordinal_rules = attributes[:'use_ordinal_rules']
|
141
|
+
end
|
142
|
+
|
134
143
|
if attributes.key?(:'name_plural')
|
135
144
|
self.name_plural = attributes[:'name_plural']
|
136
145
|
end
|
@@ -202,6 +211,7 @@ module Phrase
|
|
202
211
|
name == o.name &&
|
203
212
|
description == o.description &&
|
204
213
|
plural == o.plural &&
|
214
|
+
use_ordinal_rules == o.use_ordinal_rules &&
|
205
215
|
name_plural == o.name_plural &&
|
206
216
|
data_type == o.data_type &&
|
207
217
|
tags == o.tags &&
|
@@ -225,7 +235,7 @@ module Phrase
|
|
225
235
|
# Calculates hash code according to all attributes.
|
226
236
|
# @return [Integer] Hash code
|
227
237
|
def hash
|
228
|
-
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
238
|
+
[branch, name, description, plural, use_ordinal_rules, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
229
239
|
end
|
230
240
|
|
231
241
|
# Builds the object from hash
|
@@ -5,7 +5,7 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
-
# Specify a query to do broad search for keys by name (including wildcards)
|
8
|
+
# Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: - `ids:key_id,...` for queries on a comma-separated list of ids - `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes - `tags:tag_name` to filter for keys with certain tags - `translated:{true|false}` for translation status (also requires `locale_id` to be specified) - `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries - `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
|
9
9
|
attr_accessor :q
|
10
10
|
|
11
11
|
# Locale used to exlcude or include keys.
|
@@ -5,7 +5,7 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
-
# Specify a query to do broad search for keys by name (including wildcards)
|
8
|
+
# Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name` to filter for keys with certain tags * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
|
9
9
|
attr_accessor :q
|
10
10
|
|
11
11
|
# Locale used to exlcude or include keys.
|
@@ -11,7 +11,7 @@ module Phrase
|
|
11
11
|
# Order direction. Can be one of: asc, desc.
|
12
12
|
attr_accessor :order
|
13
13
|
|
14
|
-
# Specify a query to do broad search for keys by name (including wildcards)
|
14
|
+
# Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name,...` for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name,...` to filter for keys with certain comma-seperated list of tags * `uploads:upload_id,...` to filter for keys with certain comma-seperated list of uploads * `job:{true|false}` to filter for keys mentioned in an active job * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples). Please note: If `tags` are added to filter the search, the search will be limited to a maximum of 65,536 tagged keys.
|
15
15
|
attr_accessor :q
|
16
16
|
|
17
17
|
# Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
@@ -5,7 +5,7 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
-
# Specify a query to do broad search for keys by name (including wildcards)
|
8
|
+
# Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name` to filter for keys with certain tags * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
|
9
9
|
attr_accessor :q
|
10
10
|
|
11
11
|
# Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
@@ -5,7 +5,7 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
-
# Specify a query to do broad search for keys by name (including wildcards)
|
8
|
+
# Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name` to filter for keys with certain tags * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
|
9
9
|
attr_accessor :q
|
10
10
|
|
11
11
|
# Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
data/lib/phrase/models/locale.rb
CHANGED
@@ -16,6 +16,8 @@ module Phrase
|
|
16
16
|
|
17
17
|
attr_accessor :plural_forms
|
18
18
|
|
19
|
+
attr_accessor :ordinal_plural_forms
|
20
|
+
|
19
21
|
attr_accessor :source_locale
|
20
22
|
|
21
23
|
attr_accessor :fallback_locale
|
@@ -34,6 +36,7 @@ module Phrase
|
|
34
36
|
:'main' => :'main',
|
35
37
|
:'rtl' => :'rtl',
|
36
38
|
:'plural_forms' => :'plural_forms',
|
39
|
+
:'ordinal_plural_forms' => :'ordinal_plural_forms',
|
37
40
|
:'source_locale' => :'source_locale',
|
38
41
|
:'fallback_locale' => :'fallback_locale',
|
39
42
|
:'created_at' => :'created_at',
|
@@ -51,6 +54,7 @@ module Phrase
|
|
51
54
|
:'main' => :'Boolean',
|
52
55
|
:'rtl' => :'Boolean',
|
53
56
|
:'plural_forms' => :'Array<String>',
|
57
|
+
:'ordinal_plural_forms' => :'Array<String>',
|
54
58
|
:'source_locale' => :'LocalePreview',
|
55
59
|
:'fallback_locale' => :'LocalePreview',
|
56
60
|
:'created_at' => :'DateTime',
|
@@ -109,6 +113,12 @@ module Phrase
|
|
109
113
|
end
|
110
114
|
end
|
111
115
|
|
116
|
+
if attributes.key?(:'ordinal_plural_forms')
|
117
|
+
if (value = attributes[:'ordinal_plural_forms']).is_a?(Array)
|
118
|
+
self.ordinal_plural_forms = value
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
112
122
|
if attributes.key?(:'source_locale')
|
113
123
|
self.source_locale = attributes[:'source_locale']
|
114
124
|
end
|
@@ -151,6 +161,7 @@ module Phrase
|
|
151
161
|
main == o.main &&
|
152
162
|
rtl == o.rtl &&
|
153
163
|
plural_forms == o.plural_forms &&
|
164
|
+
ordinal_plural_forms == o.ordinal_plural_forms &&
|
154
165
|
source_locale == o.source_locale &&
|
155
166
|
fallback_locale == o.fallback_locale &&
|
156
167
|
created_at == o.created_at &&
|
@@ -166,7 +177,7 @@ module Phrase
|
|
166
177
|
# Calculates hash code according to all attributes.
|
167
178
|
# @return [Integer] Hash code
|
168
179
|
def hash
|
169
|
-
[id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
|
180
|
+
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, created_at, updated_at].hash
|
170
181
|
end
|
171
182
|
|
172
183
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ module Phrase
|
|
14
14
|
# Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
|
15
15
|
attr_accessor :default
|
16
16
|
|
17
|
-
# Indicates whether locale is a main locale. Main locales are part of the
|
17
|
+
# Indicates whether locale is a main locale. Main locales are part of the [Verification System](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
18
18
|
attr_accessor :main
|
19
19
|
|
20
20
|
# Indicates whether locale is a RTL (Right-to-Left) locale.
|
@@ -26,10 +26,10 @@ module Phrase
|
|
26
26
|
# Fallback locale for empty translations. Can be a locale name or id.
|
27
27
|
attr_accessor :fallback_locale_id
|
28
28
|
|
29
|
-
# Indicates that new translations for this locale should be marked as unverified. Part of the
|
29
|
+
# Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
30
30
|
attr_accessor :unverify_new_translations
|
31
31
|
|
32
|
-
# Indicates that updated translations for this locale should be marked as unverified. Part of the
|
32
|
+
# Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
33
33
|
attr_accessor :unverify_updated_translations
|
34
34
|
|
35
35
|
# If set, translations for this locale will be fetched automatically, right after creation.
|
@@ -16,6 +16,8 @@ module Phrase
|
|
16
16
|
|
17
17
|
attr_accessor :plural_forms
|
18
18
|
|
19
|
+
attr_accessor :ordinal_plural_forms
|
20
|
+
|
19
21
|
attr_accessor :source_locale
|
20
22
|
|
21
23
|
attr_accessor :fallback_locale
|
@@ -36,6 +38,7 @@ module Phrase
|
|
36
38
|
:'main' => :'main',
|
37
39
|
:'rtl' => :'rtl',
|
38
40
|
:'plural_forms' => :'plural_forms',
|
41
|
+
:'ordinal_plural_forms' => :'ordinal_plural_forms',
|
39
42
|
:'source_locale' => :'source_locale',
|
40
43
|
:'fallback_locale' => :'fallback_locale',
|
41
44
|
:'created_at' => :'created_at',
|
@@ -54,6 +57,7 @@ module Phrase
|
|
54
57
|
:'main' => :'Boolean',
|
55
58
|
:'rtl' => :'Boolean',
|
56
59
|
:'plural_forms' => :'Array<String>',
|
60
|
+
:'ordinal_plural_forms' => :'Array<String>',
|
57
61
|
:'source_locale' => :'LocalePreview',
|
58
62
|
:'fallback_locale' => :'LocalePreview',
|
59
63
|
:'created_at' => :'DateTime',
|
@@ -120,6 +124,12 @@ module Phrase
|
|
120
124
|
end
|
121
125
|
end
|
122
126
|
|
127
|
+
if attributes.key?(:'ordinal_plural_forms')
|
128
|
+
if (value = attributes[:'ordinal_plural_forms']).is_a?(Array)
|
129
|
+
self.ordinal_plural_forms = value
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
123
133
|
if attributes.key?(:'source_locale')
|
124
134
|
self.source_locale = attributes[:'source_locale']
|
125
135
|
end
|
@@ -166,6 +176,7 @@ module Phrase
|
|
166
176
|
main == o.main &&
|
167
177
|
rtl == o.rtl &&
|
168
178
|
plural_forms == o.plural_forms &&
|
179
|
+
ordinal_plural_forms == o.ordinal_plural_forms &&
|
169
180
|
source_locale == o.source_locale &&
|
170
181
|
fallback_locale == o.fallback_locale &&
|
171
182
|
created_at == o.created_at &&
|
@@ -182,7 +193,7 @@ module Phrase
|
|
182
193
|
# Calculates hash code according to all attributes.
|
183
194
|
# @return [Integer] Hash code
|
184
195
|
def hash
|
185
|
-
[id, name, code, default, main, rtl, plural_forms, source_locale, fallback_locale, created_at, updated_at, statistics].hash
|
196
|
+
[id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, created_at, updated_at, statistics].hash
|
186
197
|
end
|
187
198
|
|
188
199
|
# Builds the object from hash
|
@@ -2,7 +2,7 @@ require 'date'
|
|
2
2
|
|
3
3
|
module Phrase
|
4
4
|
class LocaleDownloadCreateParameters
|
5
|
-
# File format name. See the
|
5
|
+
# File format name. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364) for all supported file formats.
|
6
6
|
attr_accessor :file_format
|
7
7
|
|
8
8
|
# specify the branch to use
|
@@ -23,7 +23,7 @@ module Phrase
|
|
23
23
|
# Indicates whether [NOTRANSLATE] tags should be kept.
|
24
24
|
attr_accessor :keep_notranslate_tags
|
25
25
|
|
26
|
-
# Additional formatting and render options. See the
|
26
|
+
# Additional formatting and render options. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364) for a list of options available for each format. Specify format options like this: `...&format_options[foo]=bar`
|
27
27
|
attr_accessor :format_options
|
28
28
|
|
29
29
|
# Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".
|
@@ -38,15 +38,18 @@ module Phrase
|
|
38
38
|
# Locale IDs or locale names
|
39
39
|
attr_accessor :locale_ids
|
40
40
|
|
41
|
-
# If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to
|
41
|
+
# If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
|
42
42
|
attr_accessor :fallback_locale_id
|
43
43
|
|
44
|
-
# Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a
|
44
|
+
# Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
|
45
45
|
attr_accessor :source_locale_id
|
46
46
|
|
47
47
|
# Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
|
48
48
|
attr_accessor :custom_metadata_filters
|
49
49
|
|
50
|
+
# Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
|
51
|
+
attr_accessor :updated_since
|
52
|
+
|
50
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
54
|
def self.attribute_map
|
52
55
|
{
|
@@ -64,7 +67,8 @@ module Phrase
|
|
64
67
|
:'locale_ids' => :'locale_ids',
|
65
68
|
:'fallback_locale_id' => :'fallback_locale_id',
|
66
69
|
:'source_locale_id' => :'source_locale_id',
|
67
|
-
:'custom_metadata_filters' => :'custom_metadata_filters'
|
70
|
+
:'custom_metadata_filters' => :'custom_metadata_filters',
|
71
|
+
:'updated_since' => :'updated_since'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -85,7 +89,8 @@ module Phrase
|
|
85
89
|
:'locale_ids' => :'Array<String>',
|
86
90
|
:'fallback_locale_id' => :'String',
|
87
91
|
:'source_locale_id' => :'String',
|
88
|
-
:'custom_metadata_filters' => :'Object'
|
92
|
+
:'custom_metadata_filters' => :'Object',
|
93
|
+
:'updated_since' => :'String'
|
89
94
|
}
|
90
95
|
end
|
91
96
|
|
@@ -171,6 +176,10 @@ module Phrase
|
|
171
176
|
if attributes.key?(:'custom_metadata_filters')
|
172
177
|
self.custom_metadata_filters = attributes[:'custom_metadata_filters']
|
173
178
|
end
|
179
|
+
|
180
|
+
if attributes.key?(:'updated_since')
|
181
|
+
self.updated_since = attributes[:'updated_since']
|
182
|
+
end
|
174
183
|
end
|
175
184
|
|
176
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -210,7 +219,8 @@ module Phrase
|
|
210
219
|
locale_ids == o.locale_ids &&
|
211
220
|
fallback_locale_id == o.fallback_locale_id &&
|
212
221
|
source_locale_id == o.source_locale_id &&
|
213
|
-
custom_metadata_filters == o.custom_metadata_filters
|
222
|
+
custom_metadata_filters == o.custom_metadata_filters &&
|
223
|
+
updated_since == o.updated_since
|
214
224
|
end
|
215
225
|
|
216
226
|
# @see the `==` method
|
@@ -222,7 +232,7 @@ module Phrase
|
|
222
232
|
# Calculates hash code according to all attributes.
|
223
233
|
# @return [Integer] Hash code
|
224
234
|
def hash
|
225
|
-
[file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, source_locale_id, custom_metadata_filters].hash
|
235
|
+
[file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, source_locale_id, custom_metadata_filters, updated_since].hash
|
226
236
|
end
|
227
237
|
|
228
238
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ module Phrase
|
|
14
14
|
# Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
|
15
15
|
attr_accessor :default
|
16
16
|
|
17
|
-
# Indicates whether locale is a main locale. Main locales are part of the
|
17
|
+
# Indicates whether locale is a main locale. Main locales are part of the [Verification System](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
18
18
|
attr_accessor :main
|
19
19
|
|
20
20
|
# Indicates whether locale is a RTL (Right-to-Left) locale.
|
@@ -26,10 +26,10 @@ module Phrase
|
|
26
26
|
# Fallback locale for empty translations. Can be a locale name or id.
|
27
27
|
attr_accessor :fallback_locale_id
|
28
28
|
|
29
|
-
# Indicates that new translations for this locale should be marked as unverified. Part of the
|
29
|
+
# Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
30
30
|
attr_accessor :unverify_new_translations
|
31
31
|
|
32
|
-
# Indicates that updated translations for this locale should be marked as unverified. Part of the
|
32
|
+
# Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
|
33
33
|
attr_accessor :unverify_updated_translations
|
34
34
|
|
35
35
|
# If set, translations for this locale will be fetched automatically, right after creation.
|
@@ -20,7 +20,7 @@ module Phrase
|
|
20
20
|
# List of spaces the user is assigned to.
|
21
21
|
attr_accessor :space_ids
|
22
22
|
|
23
|
-
# Additional permissions depending on member role. Available permissions are
|
23
|
+
# Additional permissions depending on member role. Available permissions are `create_upload` and `review_translations`
|
24
24
|
attr_accessor :permissions
|
25
25
|
|
26
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -5,7 +5,7 @@ module Phrase
|
|
5
5
|
# Name of the project
|
6
6
|
attr_accessor :name
|
7
7
|
|
8
|
-
# 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
|
8
|
+
# 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).
|
9
9
|
attr_accessor :main_format
|
10
10
|
|
11
11
|
# (Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: `Ruby`, `JavaScript`, `AngularJS`, `React`, `iOS`, `Android`, `Python`, `PHP`, `Java`, `Go`, `Windows Phone`, `Rails`, `Node.js`, `.NET`, `Django`, `Symfony`, `Yii Framework`, `Zend Framework`, `Apple App Store Description`, `Google Play Description`, but it can also take any other value.
|
@@ -29,7 +29,7 @@ module Phrase
|
|
29
29
|
# When a source project ID is given, a clone of that project will be created, including all locales, keys and translations as well as the main project settings if they are not defined otherwise through the params.
|
30
30
|
attr_accessor :source_project_id
|
31
31
|
|
32
|
-
# (Optional) Review Workflow. \"simple\" / \"review\".
|
32
|
+
# (Optional) Review Workflow. \"simple\" / \"review\". [Read more](https://support.phrase.com/hc/en-us/articles/5784094755484)
|
33
33
|
attr_accessor :workflow
|
34
34
|
|
35
35
|
# (Optional) Enable machine translation support in the project. Required for Pre-Translation
|
@@ -44,13 +44,13 @@ module Phrase
|
|
44
44
|
# (Optional) Otherwise, translators are not allowed to edit translations other than strings
|
45
45
|
attr_accessor :enable_all_data_type_translation_keys_for_translators
|
46
46
|
|
47
|
-
# (Optional) We can validate and highlight your ICU messages.
|
47
|
+
# (Optional) We can validate and highlight your ICU messages. [Read more](https://support.phrase.com/hc/en-us/articles/5822319545116)
|
48
48
|
attr_accessor :enable_icu_message_format
|
49
49
|
|
50
50
|
# (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
|
51
51
|
attr_accessor :zero_plural_form_enabled
|
52
52
|
|
53
|
-
# (Optional) Autopilot, requires machine_translation_enabled.
|
53
|
+
# (Optional) Autopilot, requires machine_translation_enabled. [Read more](https://support.phrase.com/hc/en-us/articles/5822187934364)
|
54
54
|
attr_accessor :autotranslate_enabled
|
55
55
|
|
56
56
|
# (Optional) Requires autotranslate_enabled to be true
|
@@ -11,7 +11,7 @@ module Phrase
|
|
11
11
|
# (Optional) User ID of the point of contact for the project. Pass `null` to unset.
|
12
12
|
attr_accessor :point_of_contact
|
13
13
|
|
14
|
-
# (Optional) 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
|
14
|
+
# (Optional) 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](#formats).
|
15
15
|
attr_accessor :main_format
|
16
16
|
|
17
17
|
# (Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: `Ruby`, `JavaScript`, `AngularJS`, `React`, `iOS`, `Android`, `Python`, `PHP`, `Java`, `Go`, `Windows Phone`, `Rails`, `Node.js`, `.NET`, `Django`, `Symfony`, `Yii Framework`, `Zend Framework`, `Apple App Store Description`, `Google Play Description`, but it can also take any other value.
|
@@ -26,7 +26,7 @@ module Phrase
|
|
26
26
|
# (Optional) Indicates whether the project image should be deleted.
|
27
27
|
attr_accessor :remove_project_image
|
28
28
|
|
29
|
-
# (Optional) Review Workflow. \"simple\" / \"review\".
|
29
|
+
# (Optional) Review Workflow. \"simple\" / \"review\". [Read more](https://support.phrase.com/hc/en-us/articles/5784094755484)
|
30
30
|
attr_accessor :workflow
|
31
31
|
|
32
32
|
# (Optional) Enable machine translation support in the project. Required for Pre-Translation
|
@@ -41,13 +41,13 @@ module Phrase
|
|
41
41
|
# (Optional) Otherwise, translators are not allowed to edit translations other than strings
|
42
42
|
attr_accessor :enable_all_data_type_translation_keys_for_translators
|
43
43
|
|
44
|
-
# (Optional) We can validate and highlight your ICU messages.
|
44
|
+
# (Optional) We can validate and highlight your ICU messages. [Read more](https://support.phrase.com/hc/en-us/articles/5822319545116)
|
45
45
|
attr_accessor :enable_icu_message_format
|
46
46
|
|
47
47
|
# (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
|
48
48
|
attr_accessor :zero_plural_form_enabled
|
49
49
|
|
50
|
-
# (Optional) Autopilot, requires machine_translation_enabled.
|
50
|
+
# (Optional) Autopilot, requires machine_translation_enabled. [Read more](https://support.phrase.com/hc/en-us/articles/5822187934364)
|
51
51
|
attr_accessor :autotranslate_enabled
|
52
52
|
|
53
53
|
# (Optional) Requires autotranslate_enabled to be true
|
@@ -68,7 +68,7 @@ module Phrase
|
|
68
68
|
# (Optional) Requires autotranslate_enabled to be true
|
69
69
|
attr_accessor :autotranslate_use_translation_memory
|
70
70
|
|
71
|
-
# (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
|
71
|
+
# (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.
|
72
72
|
attr_accessor :default_encoding
|
73
73
|
|
74
74
|
class EnumAttributeValidator
|
@@ -8,7 +8,7 @@ module Phrase
|
|
8
8
|
# Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project.
|
9
9
|
attr_accessor :key_id
|
10
10
|
|
11
|
-
# Presentation details of the screenshot marker in JSON format
|
11
|
+
# Presentation details of the screenshot marker in JSON format. Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (`x`-axis and `y`-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (`w` and `h` in pixels).
|
12
12
|
attr_accessor :presentation
|
13
13
|
|
14
14
|
# Attribute mapping from ruby-style variable name to JSON key.
|