Commit Graph

115 Commits

Author SHA1 Message Date
Terry Zhuo 4f7c0798fe
Revert "fix:change name to pass the doc build (#228)" (#229)
This reverts commit 1d8ce5581b.
2020-10-03 05:30:09 +10:00
Terry Zhuo 0af14aa6cb
fix: revert the file name (#230)
* fix:change name to pass the doc build

* fix:revert the file name
2020-10-03 05:21:08 +10:00
Terry Zhuo 1d8ce5581b
fix:change name to pass the doc build (#228) 2020-10-03 05:13:33 +10:00
Terry Zhuo 3d2e775855
doc: update the sphinx docs (#224)
* doc: update Readthedoc

* doc: update Readthedoc

* doc: update Readthedoc
2020-10-03 04:59:42 +10:00
Terry Zhuo 10d9135ecb
Revert "fix(client): add an empty array to allow iterating over an array containing newline (#222)" (#225)
This reverts commit 77980b298a.
2020-09-12 01:56:20 +10:00
adipose 77980b298a
fix(client): add an empty array to allow iterating over an array containing newline (#222)
An array containing simply a newline ['\n','other text'] will error on this line.  Adding an empty array to allow it to iterate solves it.
2020-09-10 13:40:15 +09:00
Martin Michlmayr 5dd9bc5819
doc: fix typos (#220) 2020-09-09 01:03:31 +10:00
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 9ff4aaecc8
chore:test available service_urls and multi-lang result in different service_urls (#216) 2020-09-02 20:04:55 +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
Terry Zhuo e5c9505559
doc: update ISSUE_TEMPLATE.md 2020-07-11 20:18:42 +10:00
Terry Zhuo 990b74b8db
doc: update the format 2020-07-11 20:15:00 +10:00
Terry Zhuo 919db3c7b2
doc: update the document (#199) 2020-07-11 19:35:24 +10:00
Terry Zhuo 69e26336c6
doc: upload contributing document and update (#197) 2020-07-11 19:23:18 +10:00
Terry Zhuo cfa90ac7f4
chore: add Python version checking (#195)
chore: add python version checking
2020-07-09 02:37:44 +10:00
SuHun Han 34b81cce94 chore(stale): exclude some more labels 2020-07-06 01:21:10 +09:00
Terry Zhuo 15b613d305
Typo Fixed (#192)
Readme Typo FIxed
2020-07-04 02:22:25 +10:00
Ojas Sinha f7b8811b14
readme: fix typo (#191) 2020-07-04 01:57:32 +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
Zhuopsticks 2f83668b2f
chore(constants): add default service_urls (#183)
* storing available urls as constant
2020-06-10 18:33:54 +09:00
SuHun Han 9fdb2346f0 chore(github): add stale app 2020-06-10 16:38:59 +09:00
SuHun Han 312f36ad87 fix(client): pronunciation is None for some languages (#175) 2020-06-09 09:35:25 +09:00
Soumendra kumar sahoo 704e8617a0
feat(languages): add Odia (lang code: or) language (#159)
Co-authored-by: Soumendra Kumar Sahoo <soumend1@in.ibm.com>
2020-06-09 00:28:52 +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
SuHun Han 9ca9c95230 chore(deps): update pip lockfile 2020-06-09 00:22:21 +09:00
clinjie 8bc69fe654
fix: emoji bug (#134) 2020-06-09 00:15:09 +09:00
Abduroid 37febe1ef0
feat(languages): add language code ug (#173) 2020-06-08 19:09:59 +09:00
Bastien Vallet 778b00758e
chore: Remove python 2.7 support and various cleanup (#179)
Co-authored-by: Bastien Vallet <b.vallet@criteo.com>
2020-06-08 19:09:24 +09:00
Artur Aleksanyan afb17c76bf Add ability to pass translation api params dinamically (#136)
* fix googletrans emoji bug

use py-gogoletrans translate text, if contains emoji, will raise JSONDecodeError.

* add ability to pass translation api params dinamically

* fix batch translate

Co-authored-by: clinjie <mlinjie@foxmail.com>
2020-02-08 17:17:31 +09:00
Nieole 4aebfb18fa Update utils (#102) 2019-02-05 17:30:09 +09:00
SuHun Han 194d65a2e2 chore: bump to 2.4.0 2018-12-20 01:04:17 +09:00
elzeard91 94bd300e75 Update gtoken.py (#95) 2018-12-20 00:26:04 +09:00
Sarah Fletcher 759a0baf46 fix: token generation for text > 0x10000 (#75)
* Fix token generation for text > 0x10000

Also minor optimizations.

* Missed a var rename
2018-12-20 00:15:37 +09:00
SuHun Han 48653332ef chore: bump to 2.3.0 2018-06-12 22:41:25 +09:00
Sebastian Stabinger 8ebf364a44 fix: link to API documentation (#68) 2018-06-12 00:17:38 +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
Jakub Molinski 2c85a4a976 feat: add an extra_data field to Translation containing the whole gtranslate response (#59) 2018-05-06 21:14:06 +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
Xiao Meifeng 8105d07269 add proxy support (#41) 2017-10-26 12:35:20 +09:00
paulg f9b1ffd168 Create translate_word_doc.py (#46)
* Create translate_word_doc.py

a useful example.

* Rename sample/translate_word_doc.py to example/translate_word_doc.py
2017-10-25 12:51:53 +09:00
yupengzhang 830af19de0 Filipino && Hebrew support (#45) 2017-10-23 12:41:59 +09:00
SuHun Han f51e949b57 Bump version to 2.2.0 (#40)
[skip ci]
2017-10-02 23:32:47 +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
SuHun Han a8c2655837 Bump version to 2.1.4 2017-08-11 22:04:15 +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 4e52393ceb Fix command line tool (#31) 2017-08-08 20:42:45 +09:00
Encrylize 1e6667a9ed Add missing languages (#30)
* Add missing languages

* Fix Punjabi language code
2017-08-08 20:42:33 +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