You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 1.crrequire"option_parser"moduleTranslater
target_language : String? =nilOptionParser.parse do |parser|
parser.banner =<<-USAGEUsage: translater <option> contentUSAGE
parser.on(
"-t TARGET",
"--target=TARGET",
"Specify target language, support zh-CN|en for now.default is translate English to Chinese.Youdao don't support this option."
) do |target|
case target
when"zh-CN"
target_language ="Chinese"when"en"
target_language ="English"elseSTDERR.puts "Supported options: -t zh-CN|en"exitendendendp target_language
end
When run with ameba 1.cr, get following unexpected message:
Following is a code example:
When run with
ameba 1.cr
, get following unexpected message:But, this is wrong, if move all code out of module
Translater
, ameba is fine, but it is same for those two cases.The text was updated successfully, but these errors were encountered: