mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Switched to yandex.translate. Fixes #132
This commit is contained in:
parent
7e6103473f
commit
6f622bdeba
@ -67,13 +67,13 @@ setuptools installs a script, called easy_install. You can find it in the python
|
|||||||
* arrow==0.6
|
* arrow==0.6
|
||||||
* markdown
|
* markdown
|
||||||
* winpaths
|
* winpaths
|
||||||
* microsofttranslator
|
|
||||||
* PySocks
|
* PySocks
|
||||||
* win_inet_pton
|
* win_inet_pton
|
||||||
|
* yandex.translate
|
||||||
|
|
||||||
easy_install will automatically get the additional libraries that these packages need to work properly.
|
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:
|
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
|
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
|
#### Other dependencies
|
||||||
|
|
||||||
|
@ -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))
|
* 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))
|
* 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
|
## Changes in version 0.90
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from microsofttranslator import Translator
|
from yandex_translate import YandexTranslate
|
||||||
|
|
||||||
def translate(text="", source="auto", target="en"):
|
def translate(text="", source="auto", target="en"):
|
||||||
t = Translator("twblue", "4KZA26GYIfmVAqQA/z16Hlucbg64hVSDTIpRjT2FqIU=")
|
t = YandexTranslate("trnsl.1.1.20161012T134532Z.d01b9c75fc39aa74.7d1be75a5166a80583eeb020e10f584168da6bf7")
|
||||||
return t.translate(text, target)
|
return t.translate(text, target)["text"][0]
|
||||||
|
|
||||||
|
|
||||||
languages = {
|
languages = {
|
||||||
|
Loading…
Reference in New Issue
Block a user