lushan88a / google_trans_new

A free and unlimited python API for google translate.
MIT License
393 stars 170 forks source link

Useless space in translation #41

Open Sapereaude9 opened 3 years ago

Sapereaude9 commented 3 years ago

This is not a huge problem, but has anybody else noticed the useless space at the end of the string returned by calls to translator.translate(text, lang_tgt = translated_to)?

space issue github

"at the back :", rather than "at the back:"

I'm sure that if I looked through the source code I could resolve it myself, but I'm feeling lazy...

Sapereaude9 commented 3 years ago

If anybody else cares about this problem, the solution is to replace line 170 with

translate_text = translate_text[0:-1]

in google_trans_new.py.