huzheng001 / stardict-3

Automatically exported from code.google.com/p/stardict-3
GNU General Public License v3.0
304 stars 65 forks source link

Google translation don't work #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
OS Debian Sqeeze
Program installed from reps

Steps:
 1. Stardict
 2. Full-text translation
 3. choose "Google translate": "English" to "Russian"
 4. write any text in text field
 5. push "Translate" button
 6. "Not found" in result filed

And Yahoo and other don't work too...

Original issue reported on code.google.com by Jey.G...@gmail.com on 10 Nov 2012 at 5:53

bircoph commented 7 years ago

Concerning Google translation I see these problems:

  1. Response format changed a bit.
  2. Request format also changed (though older format is still supported()
  3. Google now forces https and returns HTTP redirect (code 301) for http requests. This is a major problem, since stardict implements its own http handling and have neither redirect, nor https support.

Issues 1 and 2 should be fixed by commit https://github.com/bircoph/stardict-3/commit/11152b606798adb60a0e6a6578754b6f5ca30d77, though I had not updated language listings there.

As for issue 3, I recommend to use any http(s) library of your choice instead of reinventing wheel, because https reimplementation from scratch will be PITA.