antoviaque/languagelearning — pull request #20 by antoviaque (2013-06-03 21:15:16+00:00)
Title: gt-bad-language-pair: Unsupported translations consistency check

When Google Translate doesn't support translating from one language to
another, it returns an error - this behavior differs from what happens
when it does support a language pair but can't translate a specific
sentence.

In the later, which is the most common scenario, it returns the source
expression in the translation result. To make the behavior consistent in
both scenarios, and allow the user to still see any definitions/images,
mirror the later scenario when a language pair is not supported.

Return the results normally, replacing the language detection normally
done by the `translate()` call by a specific call to `detect()` (also
from Google Translate).

Note: Also removed the dirty hack the googletranslate library was using
in that scenario, since Google Translate will never be able to translate
the sentence when the language pair is unsupported.