def upload_translation(files, language, params = {})
      params[:files] = Hash[files.map { |f| [
        f[:dest]               || raise(ArgumentError, "`:dest` is required"),
        ::File.open(f[:source] || raise(ArgumentError, "`:source` is required"))
      ] }]

      params[:language] = language

      request(
        :method => :post,
        :path   => "/api/project/#{@project_id}/upload-translation",
        :query  => params,
      )
    end
def upload_translation(files, language, params = {})
      params[:files] = Hash[files.map { |f| [
        f[:dest]               || raise(ArgumentError, "`:dest` is required"),
        ::File.open(f[:source] || raise(ArgumentError, "`:source` is required"))
      ] }]

      params[:language] = language

      request(
        :method => :post,
        :path   => "/api/project/#{@project_id}/upload-translation",
        :query  => params,
      )
    end
Upload existing translations to your Crowdin project.

 == Parameters

 files - Array of files that should be added to Crowdin project.
 file is a Hash { :dest, :source }
   * :dest - file name with path in Crowdin project (required)
   * :source - path for uploaded file (required)
 language - Target language. With a single call it's possible to upload translations for several
   files but only into one of the languages. (required)

 Optional:
 * :import_duplicates (default: false)
 * :import_eq_suggestions (default: false)
 * :auto_approve_imported (default: false)
 * :branch - a branch name

 == Request

 POST https://api.crowdin.com/api/project/{project-identifier}/upload-translation?key={project-key}