lib/phrase/api/uploads_api.rb in phrase-3.5.0 vs lib/phrase/api/uploads_api.rb in phrase-3.6.0
- old
+ new
@@ -28,10 +28,11 @@
# @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
# @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 `false` (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)
data
end
@@ -57,10 +58,11 @@
# @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
# @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 `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 [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
@api_client.config.logger.debug 'Calling API: UploadsApi.upload_create ...'
end
@@ -112,9 +114,10 @@
form_params['locale_mapping'] = opts[:'locale_mapping'] if !opts[:'locale_mapping'].nil?
form_params['format_options'] = opts[:'format_options'] if !opts[:'format_options'].nil?
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]
# return_type