Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the functionality of the translation and add improvements #1144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LabhanshSingla
Copy link

improve the translation feature and added enhancements like bulk translation and auto-detection

@pnhofmann
Copy link
Collaborator

Some error occurred, please open an issue on github!
Here is error:

Traceback (most recent call last):
File "/home/phil/g/Jarvis/jarviscli/CmdInterpreter.py", line 286, in try_do
do(self, s)
File "/home/phil/g/Jarvis/jarviscli/plugin.py", line 226, in _plugin_run_with_network_error
run_func(jarvis, s)
File "/home/phil/g/Jarvis/jarviscli/plugin.py", line 208, in run
self._backend[0](jarvis.get_api(), s)
File "/home/phil/g/Jarvis/jarviscli/plugins/translate.py", line 66, in translate
default(jarvis)
File "/home/phil/g/Jarvis/jarviscli/plugins/translate.py", line 82, in default
auto_lang = trans.detect(tex).lang
^^^^^^^^^^^^^^^^^
File "/home/phil/g/Jarvis/env/lib/python3.11/site-packages/googletrans/client.py", line 255, in detect
data = self._translate(text, 'en', 'auto', kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/phil/g/Jarvis/env/lib/python3.11/site-packages/googletrans/client.py", line 78, in _translate
token = self.token_acquirer.do(text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/phil/g/Jarvis/env/lib/python3.11/site-packages/googletrans/gtoken.py", line 194, in do
self._update()
File "/home/phil/g/Jarvis/env/lib/python3.11/site-packages/googletrans/gtoken.py", line 62, in _update
code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants