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

Update translation.py to work with the newer googletrans module #1233

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

Conversation

git-akispa
Copy link

@git-akispa git-akispa commented Jan 6, 2025

Fixing a bug in the translation plugin where it is not working with the new default version of googletrans as mentioned in #1232.

Also implementing some new features :

  1. Adding the word auto as a source language for automatic language detection
  2. Adding the ability to add a path as text input for .txt file translation*
  3. Adding the ability to save the output to a file**

*The maximum number of characters the API can handle in one request is 15k, so I am implementing the ability to break the text into smaller chunks and translate them separately. The separation is done at a new line character for minimum semantic loss.

**The file is at a default path under the Jarvis directory and also for the case where the input is a file with more than 10k characters the output is stored in the file instead of being printed in the console as it would clutter it.

Fixing a bug in the translation plugin where it is not working with the new default version of googletrans .

Also implementing some new features :

1. Adding the word auto as a source language for automatic language detection
2. Adding the ability to add a path as text input for .txt file translation*
3. Adding the ability to save the output to a file**

*The maximum number of characters the API can handle in one request is 15k, so I am implementing the ability to break the text 
into smaller chunks and translate them separately. The separation is done at a new line character for minimum semantic loss.

**The file is at a default path under the Jarvis directory and also for the case where the input is a file with more than 10k characters 
the output is stored in the file instead of being printed in the console as it would clutter it.
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.

1 participant