Skip to content

Commit

Permalink
[add] Preparing for v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed May 14, 2021
1 parent 4fb1a8c commit 57e6f75
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can check if you successfully installed it by printing out its version:
```bash
python -c "import translatepy; print(translatepy.__version__)"
# output:
translatepy v1.6
translatepy v1.7
```

## List of Services
Expand Down Expand Up @@ -161,6 +161,7 @@ Feel free to use it in production if you feel like it is suitable for your produ
## Authors

* **Anime no Sekai** - *Initial work* - [Animenosekai](https://github.com/Animenosekai)
* **Zhymabek Roman** - *First Contributor (PR #10)* - [ZhymabekRoman](https://github.com/ZhymabekRoman)

## License

Expand All @@ -175,5 +176,6 @@ Please ask me if you want to use them in another project.

## Acknowledgments

* Thanks to @ZhymabekRoman (Zhymabek Roman) for working on #10 and making Yandex more stable!
* Thanks to @NawtJ0sh for giving me the way to add Microsoft Bing Translate
* Inspired by py-googletrans (by @ssut) (especially the thread: [Issue #268](https://github.com/ssut/py-googletrans/issues/268))
1 change: 1 addition & 0 deletions playground/add
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://mymemory.translated.net/doc/spec.php
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
setup(
name = "translatepy",
packages = ["translatepy"],
version = "1.6.1",
version = "1.7",
license = "GNU General Public License v3 (GPLv3)",
description = "Translate, transliterate, get the language of texts in no time with the help of multiple APIs!",
author = "Anime no Sekai",
author_email = "niichannomail@gmail.com",
url = "https://github.com/Animenosekai/translate",
download_url = "https://github.com/Animenosekai/translate/archive/v1.6.1.tar.gz",
download_url = "https://github.com/Animenosekai/translate/archive/v1.7.tar.gz",
keywords = ['python', 'translate', 'translation', 'google-translate', 'yandex-translate', 'bing-translate', 'reverso', 'transliteration', 'detect-language', 'text-to-speech'],
install_requires = ['safeIO>=1.2', 'requests', 'beautifulsoup4', 'typing; python_version<"3.5"', 'pyuseragents'],
classifiers = ['Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9'],
Expand Down
2 changes: 1 addition & 1 deletion translatepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__copyright__ = 'Copyright 2021, translate'
__credits__ = ['animenosekai']
__license__ = 'GNU General Public License v3 (GPLv3)'
__version__ = 'translatepy v1.6.1'
__version__ = 'translatepy v1.7'
__maintainer__ = 'Anime no Sekai'
__email__ = 'niichannomail@gmail.com'
__status__ = 'Stable'
4 changes: 2 additions & 2 deletions translatepy/translate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
translatepy v1.6.1 (Stable)
translatepy v1.7 (Stable)
© Anime no Sekai — 2021
"""
Expand Down Expand Up @@ -91,7 +91,7 @@ def translate(self, text, destination_language, source_language=None) -> Union[T
try:
lang = Language(lang)
except Exception: pass
result = TranslationResult(source=text, result=response, source_language=lang, destination_language=destination_language, service=self.reverso_translate)
result = TranslationResult(source=text, result=response, source_language=lang, destination_language=destination_language, service=service)
TRANSLATION_CACHES[str({"t": str(text), "d": str(destination_language), "s": str(source_language)})] = result
TRANSLATION_CACHES[str({"t": str(text), "d": str(destination_language), "s": str(lang)})] = result
return result
Expand Down
1 change: 0 additions & 1 deletion translatepy/translators/yandex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Yandex Translate
This implementation was made specifically for translatepy from 'Zhymabek Roman', based on 'Anime no Sekai' version.
"""

import uuid
Expand Down

0 comments on commit 57e6f75

Please sign in to comment.