diff --git a/README.md b/README.md index 90862ee3..0e7bd092 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,13 @@ setuptools installs a script, called easy_install. You can find it in the python * arrow==0.6 * markdown * winpaths -* microsofttranslator * PySocks * win_inet_pton +* yandex.translate easy_install will automatically get the additional libraries that these packages need to work properly. -Run the following command to quickly install and upgrade all packages and their dependencies: -easy_install -Z --upgrade six configobj goslate markdown future suds requests oauthlib requests-oauthlib requests-toolbelt pypubsub==3.3.0 pygeocoder arrow==0.6 python-dateutil futures microsofttranslator winpaths PySocks win_inet_pton +Run the following command to quickly install and upgrade all packages and their dependencies: +easy_install -Z --upgrade six configobj goslate markdown future suds requests oauthlib requests-oauthlib requests-toolbelt pypubsub==3.3.0 pygeocoder arrow==0.6 python-dateutil futures winpaths PySocks win_inet_pton yandex.translate #### Other dependencies diff --git a/doc/changelog.md b/doc/changelog.md index 8c51ee8f..8ce3dae9 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -4,6 +4,8 @@ * TWBlue will show an error when trying to open a timeline for a suspended user. ([#128](https://github.com/manuelcortez/TWBlue/issues/128)) * Removed TwUp as service as it no longer exists. ([#112](https://github.com/manuelcortez/TWBlue/issues/112)) +* Release audio files after uploading them. ([#130](https://github.com/manuelcortez/TWBlue/issues/130)) +* Now TWBlue will use Yandex's translation services instead microsoft translator. ([#132](https://github.com/manuelcortez/TWBlue/issues/132)) ## Changes in version 0.90 diff --git a/src/extra/translator/translator.py b/src/extra/translator/translator.py index 0ec6e4c1..9caa697d 100644 --- a/src/extra/translator/translator.py +++ b/src/extra/translator/translator.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from microsofttranslator import Translator +from yandex_translate import YandexTranslate def translate(text="", source="auto", target="en"): - t = Translator("twblue", "4KZA26GYIfmVAqQA/z16Hlucbg64hVSDTIpRjT2FqIU=") - return t.translate(text, target) + t = YandexTranslate("trnsl.1.1.20161012T134532Z.d01b9c75fc39aa74.7d1be75a5166a80583eeb020e10f584168da6bf7") + return t.translate(text, target)["text"][0] languages = {