Commit Graph

18 Commits

Author SHA1 Message Date
Suhun Han
ee02d4b6fd
feat(http2): add http2 support (#213)
* feat(client): add http2 option

* chore(deps): update httpx

* refactor(gtoken): gtoken should always accept client argument in order to follow client's options

* chore(ci): change dist to ubuntu 18.04 bionic

* chore:test available service_urls and multi-lang result in different service_urls (#216)

* feat(models): add Base model

* test: reuse test client

* feat(client): return Translated and Detected with the original response

* test(client): ConnectError has been replaced with httpx.ConnectTimeout

* fix: possible merge conflict

* chore(docs): add a description for checking http2

* chore(deps): add sphinx to dev deps

* test(client): httpx will raise ConnectError in some conditions

omg i missed

Co-authored-by: Terry Zhuo <terryzhuo25@gmail.com>
2020-09-05 13:00:21 +10:00
Terry Zhuo
0e1c9d1d52
feature: format detection outputs (#207)
* feature: format detection output

* feature: format detection outputs

* feature: format detection outputs
2020-07-29 19:46:29 +10:00
SuHun Han
e10c5e8fa7
chore: v3.0.0 (#181)
Co-authored-by: Kirill Bobrov <miaplanedo@gmail.com>
Co-authored-by: Zhuopsticks <36221214+terryyz@users.noreply.github.com>
2020-06-14 15:42:32 +09:00
SuHun Han
312f36ad87 fix(client): pronunciation is None for some languages (#175) 2020-06-09 09:35:25 +09:00
SuHun Han
4f312649f2 test(client): add a test for emojis 2020-06-09 00:26:29 +09:00
SuHun Han
5e66692eff test(client): fix a test for special cases where google returns many kinds of results 2020-06-09 00:23:30 +09:00
Mateusz Susik
004f40ceb8 feat(adapters): print statement removal (#53)
* adapters: print statement removal

Signed-off-by: Mateusz Susik <mateusz.susik@sigmoidal.io>

* test fix - read timeout added

Signed-off-by: Mateusz Susik <mateusz.susik@sigmoidal.io>
2018-05-06 21:17:21 +09:00
Mateusz Susik
57076b5ad8 timeout implementation (#52)
Signed-off-by: Mateusz Susik <mateusz.susik@sigmoidal.io>
2017-12-30 22:56:50 +09:00
ssut
15549dcdf8 Refactor googletrans to work properly (#40)
* Fix for invalid token array of the text

* Remove unused compacted-json decoder

because Google apparently now does not send like that before. This
commit refers the issue #37.

* Remove a test case for multiline text

This is a temporary fix: will be reverted after mocking tests.

* Add pipenv supports

* Update README
2017-10-02 23:26:34 +09:00
Encrylize
066eff6293 Update language names to match Google Translate (#33)
* Change language names to match Google Translate

This commit also fixes an issue introduced by commit 04a0e6df (issue #26),
where language names with underscores in them would not work, because
everything after an underscore is ignored.

* Add test for language names with spaces in them
2017-08-09 20:58:08 +09:00
Encrylize
034646e289 Fix incorrect source language and pronunciation (#29)
* Fix incorrect source language and pronunciation

* Add tests for source language and pronunciation
2017-08-08 20:42:22 +09:00
Walter Purcaro
04a0e6dfbb Support languages names and RFC 1766 codes (#26)
* Update client.py

Accept languages names as dest/src params in the `translate` routine.
Move dest/src params check to the `translate` routine.

* Update constants.py

Add LANGCODES dict

* Update __init__.py

Import LANGCODES

* Update test_client.py

Add tests

* Update constants.py

Fix typo
2017-06-01 22:50:13 +09:00
SuHun Han
286593607e Fix invalid tokenizer due to the complexity of the obfuscated code
This commit solves #14 and bumps the version to 2.1.2
2017-04-07 22:43:48 +09:00
SuHun Han
d991f5e3e3 Fix invalid tokenizer issued by #13, bump version to 2.1.1 2017-04-03 23:05:19 +09:00
SuHun Han
eaac0f1130 Fix an issue where the result text is not returned completely (cut off)
This solves issues #10 and #12, and adds a test case for it.
2017-04-01 19:58:17 +09:00
SuHun Han
0f943b6a64 Add support for customizable service url 2017-03-11 22:37:03 +09:00
SuHun Han
b128722a0d Fix tests that occurs unicode error in python 2.x 2017-03-10 23:43:06 +09:00
SuHun Han
afc4006f3e test: rearrange this for covering extensive number of codes 2017-03-10 23:43:06 +09:00