Skip to content

Commit

Permalink
Deploying from phrase/openapi@9c9c9598
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Oct 2, 2024
1 parent aea7454 commit 1aaf099
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/KeyCreateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
data_type: number,
tags: awesome-feature,needs-proofreading,
max_characters_allowed: 140,
screenshot: [B@39876e1f,
screenshot: [B@210d1b45,
remove_screenshot: null,
unformatted: null,
default_translation_content: Default translation content,
Expand Down
2 changes: 1 addition & 1 deletion docs/KeyUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
data_type: number,
tags: awesome-feature,needs-proofreading,
max_characters_allowed: 140,
screenshot: [B@1c8ab147,
screenshot: [B@29862f60,
remove_screenshot: null,
unformatted: null,
xml_space_preserve: null,
Expand Down
4 changes: 4 additions & 0 deletions docs/LocalesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ opts = {
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.
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 ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
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.
translation_key_prefix: 'prefix_', # String | Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
filter_by_prefix: true, # Boolean | Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
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.
}

Expand Down Expand Up @@ -291,6 +293,8 @@ Name | Type | Description | Notes
**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]
**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 ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;. | [optional]
**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 &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job. | [optional]
**translation_key_prefix** | **String**| Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed. | [optional]
**filter_by_prefix** | **Boolean**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. | [optional]
**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]

### Return type
Expand Down
2 changes: 1 addition & 1 deletion docs/ProjectCreateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
main_format: yml,
media: Python,
shares_translation_memory: true,
project_image: [B@9bd7c1,
project_image: [B@776609b,
remove_project_image: null,
account_id: abcd1234,
point_of_contact: abcd1234,
Expand Down
2 changes: 1 addition & 1 deletion docs/ProjectUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
main_format: yml,
media: Python,
shares_translation_memory: true,
project_image: [B@6028b018,
project_image: [B@58da1b27,
remove_project_image: false,
workflow: review,
machine_translation_enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/ScreenshotUpdateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require 'Phrase'
instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
name: A screenshot name,
description: A screenshot description,
filename: [B@67fc98fe)
filename: [B@154bc3cf)
```


4 changes: 3 additions & 1 deletion docs/UploadsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ opts = {
format_options: { ... }, # Object | Additional options available for specific formats. See our format guide for complete list.
autotranslate: true, # Boolean | If set, translations for the uploaded language will be fetched automatically.
mark_reviewed: true, # Boolean | Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
tag_only_affected_keys: true # Boolean | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
tag_only_affected_keys: true, # Boolean | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
translation_key_prefix: 'translation_key_prefix_example' # String | This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
}

begin
Expand Down Expand Up @@ -92,6 +93,7 @@ Name | Type | Description | Notes
**autotranslate** | **Boolean**| If set, translations for the uploaded language will be fetched automatically. | [optional]
**mark_reviewed** | **Boolean**| Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. | [optional]
**tag_only_affected_keys** | **Boolean**| Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; | [optional] [default to false]
**translation_key_prefix** | **String**| This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized. | [optional]

### Return type

Expand Down
6 changes: 6 additions & 0 deletions lib/phrase/api/locales_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def locale_delete_with_http_info(project_id, id, opts = {})
# @option opts [Boolean] :use_last_reviewed_version 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.
# @option opts [String] :fallback_locale_id 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 &lt;code&gt;true&lt;/code&gt;.
# @option opts [String] :source_locale_id 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 &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
# @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
# @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
# @option opts [Object] :custom_metadata_filters 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.
# @return [File]
def locale_download(project_id, id, opts = {})
Expand Down Expand Up @@ -281,6 +283,8 @@ def locale_download(project_id, id, opts = {})
# @option opts [Boolean] :use_last_reviewed_version 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.
# @option opts [String] :fallback_locale_id 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 &lt;code&gt;true&lt;/code&gt;.
# @option opts [String] :source_locale_id 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 &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
# @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
# @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
# @option opts [Object] :custom_metadata_filters 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.
# @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
def locale_download_with_http_info(project_id, id, opts = {})
Expand Down Expand Up @@ -316,6 +320,8 @@ def locale_download_with_http_info(project_id, id, opts = {})
query_params[:'use_last_reviewed_version'] = opts[:'use_last_reviewed_version'] if !opts[:'use_last_reviewed_version'].nil?
query_params[:'fallback_locale_id'] = opts[:'fallback_locale_id'] if !opts[:'fallback_locale_id'].nil?
query_params[:'source_locale_id'] = opts[:'source_locale_id'] if !opts[:'source_locale_id'].nil?
query_params[:'translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?
query_params[:'filter_by_prefix'] = opts[:'filter_by_prefix'] if !opts[:'filter_by_prefix'].nil?
query_params[:'custom_metadata_filters'] = opts[:'custom_metadata_filters'] if !opts[:'custom_metadata_filters'].nil?

# header parameters
Expand Down
3 changes: 3 additions & 0 deletions lib/phrase/api/uploads_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def initialize(api_client = ApiClient.default)
# @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
# @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; (default to false)
# @option opts [String] :translation_key_prefix This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
# @return [Upload]
def upload_create(project_id, file, file_format, locale_id, opts = {})
data, _status_code, _headers = upload_create_with_http_info(project_id, file, file_format, locale_id, opts)
Expand Down Expand Up @@ -59,6 +60,7 @@ def upload_create(project_id, file, file_format, locale_id, opts = {})
# @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
# @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60;
# @option opts [String] :translation_key_prefix This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.
# @return [Array<(Response<(Upload)>, Integer, Hash)>] Response<(Upload)> data, response status code and response headers
def upload_create_with_http_info(project_id, file, file_format, locale_id, opts = {})
if @api_client.config.debugging
Expand Down Expand Up @@ -114,6 +116,7 @@ def upload_create_with_http_info(project_id, file, file_format, locale_id, opts
form_params['autotranslate'] = opts[:'autotranslate'] if !opts[:'autotranslate'].nil?
form_params['mark_reviewed'] = opts[:'mark_reviewed'] if !opts[:'mark_reviewed'].nil?
form_params['tag_only_affected_keys'] = opts[:'tag_only_affected_keys'] if !opts[:'tag_only_affected_keys'].nil?
form_params['translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?

# http body (model)
post_body = opts[:body]
Expand Down

0 comments on commit 1aaf099

Please sign in to comment.