[3] pry(main)> ::Google::Cloud::Translate.new.translate('ใ่
นใใใ', to: 'en')
=> #<Google::Cloud::Translate::Translation:0x00007f82b4b987a8 @detected=true, @from="ja", @model=nil, @origin="ใ่
นใใใ", @text="I'm hungry", @to="en">
the @text should be "I'm hungry" like below

I did some debugging, looks like Faraday is returning the escaped string? ๐ค
From: google-cloud-translate-1.3.0/lib/google/cloud/translate/service.rb @ line 55 Google::Cloud::Translate::Service#translate:
47: def translate text, to: nil, from: nil, format: nil, model: nil,
48: cid: nil
49: body = {
50: q: Array(text), target: to, source: from, format: format,
51: model: model, cid: cid
52: }.delete_if { |_k, v| v.nil? }.to_json
53:
54: require 'pry'; binding.pry
=> 55: post "/language/translate/v2", body
56: end
[1] pry(#<Google::Cloud::Translate::Service>)> body
=> "{\"q\":[\"ใ่
นใใใ\"],\"target\":\"en\"}"
[2] pry(#<Google::Cloud::Translate::Service>)> post '/language/translate/v2', body
=> {"translations"=>[{"translatedText"=>"I'm hungry", "detectedSourceLanguage"=>"ja"}]}
Sorry if this is already fixed in 2.X :( I'll try to upgrade the gem to 2.X if so.
@take Thank you for reporting this. Can you try google-cloud-translate 2.1.1? If for some reason you can't, let me know and I'll try to check soon if it's fixed in the latest version.
@quartzmo
looks like the problem does exist in 2.1.1 as well :(
2] pry(main)> ::Google::Cloud::Translate.new(version: :v2).translate('ใ่
นใใใ', to: 'en')
=> #<Google::Cloud::Translate::V2::Translation:0x00007f85d54ffd50 @detected=true, @from="ja", @model=nil, @origin="ใ่
นใใใ", @text="I'm hungry", @to="en">
@take Thank you, I'll look into this as soon as I can. If you find a solution before I do, please feel free to submit a pull request.
I have also encountered this issue. While looking for a solution I have found this (for api version 3) -
@param mime_type [::String]
# Optional. The format of the source text, for example, "text/html",
# "text/plain". If left blank, the MIME type defaults to "text/html".
I have added a param mime_type: 'text/plain' to translate_text method and it works fine now.
Most helpful comment
@take Thank you, I'll look into this as soon as I can. If you find a solution before I do, please feel free to submit a pull request.