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

get all text in the case tag is within tab in GoogleTranslate proj #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GoogleTranslate/gtranslate.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async def perform_translate(OUTPUTLANGUAGE):
isTranslatable=root[i].get('translatable')
if(root[i].tag=='string') & (isTranslatable!='false'):
# trasnalte text and fix any possible issues traslotor creates: messing up HTML tags, adding spaces between string formatting elements
totranslate=root[i].text
totranslate=''.join(root[i].itertext())
if(totranslate!=None):
root[i].text=await translate(totranslate,OUTPUTLANGUAGE,INPUTLANGUAGE)

Expand Down Expand Up @@ -352,4 +352,4 @@ async def start_translate():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(start_translate())
print("done")
print("done")