phrase 2.19.0 → 2.21.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 +17 -0
- data/README.md +16 -5
- data/docs/CustomMetadataApi.md +353 -0
- data/docs/CustomMetadataDataType.md +16 -0
- data/docs/CustomMetadataProperty.md +33 -0
- data/docs/CustomMetadataPropertyCreate422Response.md +19 -0
- data/docs/{InvitationCreate422ResponseErrorsInner.md → CustomMetadataPropertyCreate422ResponseErrorsInner.md} +2 -2
- data/docs/KeyCreateParameters.md +4 -2
- data/docs/KeyUpdateParameters.md +4 -2
- data/docs/KeysApi.md +2 -2
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/LocaleReport.md +43 -0
- data/docs/LocalesApi.md +4 -2
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectReport.md +31 -0
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ReportsApi.md +144 -0
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/TranslationKeyDetails.md +3 -1
- data/docs/Upload.md +2 -0
- data/lib/phrase/api/custom_metadata_api.rb +409 -0
- data/lib/phrase/api/keys_api.rb +2 -2
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/reports_api.rb +160 -0
- data/lib/phrase/models/custom_metadata_data_type.rb +30 -0
- data/lib/phrase/models/custom_metadata_property.rb +294 -0
- data/lib/phrase/models/{invitation_create422_response.rb → custom_metadata_property_create422_response.rb} +4 -4
- data/lib/phrase/models/{invitation_create422_response_errors_inner.rb → custom_metadata_property_create422_response_errors_inner.rb} +3 -3
- data/lib/phrase/models/key_create_parameters.rb +14 -4
- data/lib/phrase/models/key_update_parameters.rb +14 -4
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/locale_report.rb +313 -0
- data/lib/phrase/models/project_report.rb +259 -0
- data/lib/phrase/models/translation_key_details.rb +15 -4
- data/lib/phrase/models/upload.rb +11 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -2
- data/spec/api/custom_metadata_api_spec.rb +106 -0
- data/spec/api/keys_api_spec.rb +1 -1
- data/spec/api/reports_api_spec.rb +55 -0
- data/spec/models/custom_metadata_data_type_spec.rb +23 -0
- data/spec/models/{invitation_create422_response_errors_inner_spec.rb → custom_metadata_property_create422_response_errors_inner_spec.rb} +6 -6
- data/spec/models/{invitation_create422_response_spec.rb → custom_metadata_property_create422_response_spec.rb} +6 -6
- data/spec/models/custom_metadata_property_spec.rb +77 -0
- data/spec/models/key_create_parameters_spec.rb +6 -0
- data/spec/models/key_update_parameters_spec.rb +6 -0
- data/spec/models/locale_report_spec.rb +107 -0
- data/spec/models/project_report_spec.rb +71 -0
- data/spec/models/translation_key_details_spec.rb +6 -0
- data/spec/models/upload_spec.rb +6 -0
- metadata +244 -220
- data/docs/InvitationCreate422Response.md +0 -19
@@ -0,0 +1,43 @@
|
|
1
|
+
# Phrase::LocaleReport
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**keys_count** | **Integer** | | [optional]
|
8
|
+
**translated_translations_percentage** | **Integer** | | [optional]
|
9
|
+
**unverified_translations_percentage** | **Integer** | | [optional]
|
10
|
+
**reviewed_translations_percentage** | **Integer** | | [optional]
|
11
|
+
**untranslated_keys_percentage** | **Integer** | | [optional]
|
12
|
+
**completed_translations_count** | **Integer** | | [optional]
|
13
|
+
**untranslated_keys_count** | **Integer** | | [optional]
|
14
|
+
**unverified_translations_count** | **Integer** | | [optional]
|
15
|
+
**reviewed_translations_count** | **Integer** | | [optional]
|
16
|
+
**source_word_count** | **Integer** | | [optional]
|
17
|
+
**word_count** | **Integer** | | [optional]
|
18
|
+
**word_count_unverified** | **Integer** | | [optional]
|
19
|
+
**word_count_missing** | **Integer** | | [optional]
|
20
|
+
**locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
|
21
|
+
|
22
|
+
## Code Sample
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'Phrase'
|
26
|
+
|
27
|
+
instance = Phrase::LocaleReport.new(keys_count: null,
|
28
|
+
translated_translations_percentage: null,
|
29
|
+
unverified_translations_percentage: null,
|
30
|
+
reviewed_translations_percentage: null,
|
31
|
+
untranslated_keys_percentage: null,
|
32
|
+
completed_translations_count: null,
|
33
|
+
untranslated_keys_count: null,
|
34
|
+
unverified_translations_count: null,
|
35
|
+
reviewed_translations_count: null,
|
36
|
+
source_word_count: null,
|
37
|
+
word_count: null,
|
38
|
+
word_count_unverified: null,
|
39
|
+
word_count_missing: null,
|
40
|
+
locale: null)
|
41
|
+
```
|
42
|
+
|
43
|
+
|
data/docs/LocalesApi.md
CHANGED
@@ -246,13 +246,14 @@ opts = {
|
|
246
246
|
include_translated_keys: true, # Boolean | Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
247
247
|
keep_notranslate_tags: true, # Boolean | Indicates whether [NOTRANSLATE] tags should be kept.
|
248
248
|
convert_emoji: true, # Boolean | This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
249
|
-
format_options: {
|
249
|
+
format_options: { key: 3.56}, # Object | Additional formatting and render options. See the <a href=\"https://support.phrase.com/hc/en-us/sections/6111343326364\">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code>
|
250
250
|
encoding: 'encoding_example', # String | Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".
|
251
251
|
skip_unverified_translations: true, # Boolean | Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with <code>include_unverified_translations</code>.
|
252
252
|
include_unverified_translations: true, # Boolean | if set to false unverified translations are excluded
|
253
253
|
use_last_reviewed_version: true, # Boolean | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
|
254
254
|
fallback_locale_id: 'fallback_locale_id_example', # String | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
|
255
|
-
source_locale_id: 'source_locale_id_example' # String | 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 <code>tag</code> parameter indicating a specific job.
|
255
|
+
source_locale_id: 'source_locale_id_example', # String | 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 <code>tag</code> parameter indicating a specific job.
|
256
|
+
custom_metadata_filters: { key: 3.56} # Object | 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.
|
256
257
|
}
|
257
258
|
|
258
259
|
begin
|
@@ -290,6 +291,7 @@ Name | Type | Description | Notes
|
|
290
291
|
**use_last_reviewed_version** | **Boolean**| If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional]
|
291
292
|
**fallback_locale_id** | **String**| If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>. | [optional]
|
292
293
|
**source_locale_id** | **String**| 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 <code>tag</code> parameter indicating a specific job. | [optional]
|
294
|
+
**custom_metadata_filters** | [**Object**](.md)| 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. | [optional]
|
293
295
|
|
294
296
|
### Return type
|
295
297
|
|
@@ -40,7 +40,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
40
40
|
main_format: yml,
|
41
41
|
media: Python,
|
42
42
|
shares_translation_memory: true,
|
43
|
-
project_image: [B@
|
43
|
+
project_image: [B@5c96d290,
|
44
44
|
remove_project_image: null,
|
45
45
|
account_id: abcd1234,
|
46
46
|
point_of_contact: abcd1234,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Phrase::ProjectReport
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**locales_count** | **Integer** | | [optional]
|
8
|
+
**keys_count** | **Integer** | | [optional]
|
9
|
+
**translations_count** | **Integer** | | [optional]
|
10
|
+
**untranslated_keys_count** | **Integer** | | [optional]
|
11
|
+
**unverified_translations_count** | **Integer** | | [optional]
|
12
|
+
**reviewed_translations_count** | **Integer** | | [optional]
|
13
|
+
**managed_words_count** | **Integer** | | [optional]
|
14
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'Phrase'
|
20
|
+
|
21
|
+
instance = Phrase::ProjectReport.new(locales_count: null,
|
22
|
+
keys_count: null,
|
23
|
+
translations_count: null,
|
24
|
+
untranslated_keys_count: null,
|
25
|
+
unverified_translations_count: null,
|
26
|
+
reviewed_translations_count: null,
|
27
|
+
managed_words_count: null,
|
28
|
+
project: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
@@ -41,7 +41,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
41
41
|
main_format: yml,
|
42
42
|
media: Python,
|
43
43
|
shares_translation_memory: true,
|
44
|
-
project_image: [B@
|
44
|
+
project_image: [B@3e908a0b,
|
45
45
|
remove_project_image: false,
|
46
46
|
workflow: review,
|
47
47
|
machine_translation_enabled: true,
|
data/docs/ReportsApi.md
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
# Phrase::ReportsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**report_locales_list**](ReportsApi.md#report_locales_list) | **GET** /projects/{project_id}/report/locales | List Locale Reports
|
8
|
+
[**report_show**](ReportsApi.md#report_show) | **GET** /projects/{project_id}/report | Get Project Report
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
## report_locales_list
|
13
|
+
|
14
|
+
> Array<LocaleReport> report_locales_list(project_id, opts)
|
15
|
+
|
16
|
+
List Locale Reports
|
17
|
+
|
18
|
+
List all locale reports for the given project
|
19
|
+
|
20
|
+
### Example
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'phrase'
|
25
|
+
# setup authorization
|
26
|
+
Phrase.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: Basic
|
28
|
+
config.username = 'YOUR USERNAME'
|
29
|
+
config.password = 'YOUR PASSWORD'
|
30
|
+
|
31
|
+
# Configure API key authorization: Token
|
32
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
33
|
+
config.api_key_prefix['Authorization'] = 'token'
|
34
|
+
end
|
35
|
+
|
36
|
+
api_instance = Phrase::ReportsApi.new
|
37
|
+
project_id = 'project_id_example' # String | Project ID
|
38
|
+
opts = {
|
39
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
40
|
+
page: 1, # Integer | Page number
|
41
|
+
per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
42
|
+
locale_codes: 'locale_codes_example', # String | Locale Code
|
43
|
+
tag: 'tag_example', # String | tag
|
44
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
45
|
+
}
|
46
|
+
|
47
|
+
begin
|
48
|
+
#List Locale Reports
|
49
|
+
result = api_instance.report_locales_list(project_id, opts)
|
50
|
+
pp result
|
51
|
+
rescue Phrase::ApiError => e
|
52
|
+
puts "Exception when calling ReportsApi->report_locales_list: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
|
59
|
+
Name | Type | Description | Notes
|
60
|
+
------------- | ------------- | ------------- | -------------
|
61
|
+
**project_id** | **String**| Project ID |
|
62
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
63
|
+
**page** | **Integer**| Page number | [optional]
|
64
|
+
**per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
|
65
|
+
**locale_codes** | **String**| Locale Code | [optional]
|
66
|
+
**tag** | **String**| tag | [optional]
|
67
|
+
**branch** | **String**| specify the branch to use | [optional]
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
Response<([**Array<LocaleReport>**](LocaleReport.md))>
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## report_show
|
84
|
+
|
85
|
+
> ProjectReport report_show(project_id, opts)
|
86
|
+
|
87
|
+
Get Project Report
|
88
|
+
|
89
|
+
Get report of a single project.
|
90
|
+
|
91
|
+
### Example
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
# load the gem
|
95
|
+
require 'phrase'
|
96
|
+
# setup authorization
|
97
|
+
Phrase.configure do |config|
|
98
|
+
# Configure HTTP basic authorization: Basic
|
99
|
+
config.username = 'YOUR USERNAME'
|
100
|
+
config.password = 'YOUR PASSWORD'
|
101
|
+
|
102
|
+
# Configure API key authorization: Token
|
103
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
104
|
+
config.api_key_prefix['Authorization'] = 'token'
|
105
|
+
end
|
106
|
+
|
107
|
+
api_instance = Phrase::ReportsApi.new
|
108
|
+
project_id = 'project_id_example' # String | Project ID
|
109
|
+
opts = {
|
110
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
111
|
+
branch: 'my-feature-branch' # String | specify the branch to use
|
112
|
+
}
|
113
|
+
|
114
|
+
begin
|
115
|
+
#Get Project Report
|
116
|
+
result = api_instance.report_show(project_id, opts)
|
117
|
+
pp result
|
118
|
+
rescue Phrase::ApiError => e
|
119
|
+
puts "Exception when calling ReportsApi->report_show: #{e}"
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
### Parameters
|
124
|
+
|
125
|
+
|
126
|
+
Name | Type | Description | Notes
|
127
|
+
------------- | ------------- | ------------- | -------------
|
128
|
+
**project_id** | **String**| Project ID |
|
129
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
130
|
+
**branch** | **String**| specify the branch to use | [optional]
|
131
|
+
|
132
|
+
### Return type
|
133
|
+
|
134
|
+
Response<([**ProjectReport**](ProjectReport.md))>
|
135
|
+
|
136
|
+
### Authorization
|
137
|
+
|
138
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
139
|
+
|
140
|
+
### HTTP request headers
|
141
|
+
|
142
|
+
- **Content-Type**: Not defined
|
143
|
+
- **Accept**: application/json
|
144
|
+
|
@@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
|
22
22
|
**original_file** | **String** | | [optional]
|
23
23
|
**format_value_type** | **String** | | [optional]
|
24
24
|
**creator** | [**UserPreview**](UserPreview.md) | | [optional]
|
25
|
+
**custom_metadata** | **Hash<String, String>** | | [optional]
|
25
26
|
|
26
27
|
## Code Sample
|
27
28
|
|
@@ -45,7 +46,8 @@ instance = Phrase::TranslationKeyDetails.new(id: null,
|
|
45
46
|
xml_space_preserve: null,
|
46
47
|
original_file: null,
|
47
48
|
format_value_type: null,
|
48
|
-
creator: null
|
49
|
+
creator: null,
|
50
|
+
custom_metadata: null)
|
49
51
|
```
|
50
52
|
|
51
53
|
|
data/docs/Upload.md
CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**format** | **String** | | [optional]
|
10
10
|
**state** | **String** | | [optional]
|
11
11
|
**tag** | **String** | | [optional]
|
12
|
+
**url** | **String** | The URL to the upload in Phrase Strings app. | [optional]
|
12
13
|
**summary** | [**UploadSummary**](UploadSummary.md) | | [optional]
|
13
14
|
**created_at** | **Time** | | [optional]
|
14
15
|
**updated_at** | **Time** | | [optional]
|
@@ -23,6 +24,7 @@ instance = Phrase::Upload.new(id: null,
|
|
23
24
|
format: null,
|
24
25
|
state: null,
|
25
26
|
tag: null,
|
27
|
+
url: null,
|
26
28
|
summary: null,
|
27
29
|
created_at: null,
|
28
30
|
updated_at: null)
|