Skip to content

Commit

Permalink
Friendlier message
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Oct 19, 2024
1 parent 5ac3b5d commit c2f654c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/deepl/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@ module DeepL
end

def upload_document_to_translate
raise "Not implemented"
raise NotImplementedError.new("This action is not implemented yet")
end

def check_document_translation_status
translator = DeepL::Translator.new
if option.document_id.nil? || option.document_key.nil?
raise "Document ID or key is not specified"
end
document_id = option.document_id.not_nil!
document_key = option.document_key.not_nil!
document_handle = DocumentHandle.new(document_id, document_key)
Expand All @@ -184,6 +187,12 @@ module DeepL

def download_translated_document
translator = DeepL::Translator.new
if option.document_id.nil? || option.document_key.nil?
raise "Document ID or key is not specified"
end
if option.output_file.nil?
raise "Output file is not specified"
end
document_id = option.document_id.not_nil!
document_key = option.document_key.not_nil!
output_file = option.output_file.not_nil!
Expand Down

0 comments on commit c2f654c

Please sign in to comment.