mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Change: Dropped googletrans as is no longer maintaned.
This commit is contained in:
parent
ea60f308c6
commit
a322507f8b
@ -14,14 +14,6 @@ cx-Logging==3.2.0
|
|||||||
decorator==5.1.1
|
decorator==5.1.1
|
||||||
demoji==1.1.0
|
demoji==1.1.0
|
||||||
future==1.0.0
|
future==1.0.0
|
||||||
googletrans==4.0.0rc1
|
|
||||||
h11==0.14.0
|
|
||||||
h2==4.1.0
|
|
||||||
hpack==4.0.0
|
|
||||||
hstspreload==2024.5.1
|
|
||||||
httpcore==1.0.5
|
|
||||||
httpx==0.27.0
|
|
||||||
hyperframe==6.0.1
|
|
||||||
idna==3.7
|
idna==3.7
|
||||||
importlib-metadata==7.1.0
|
importlib-metadata==7.1.0
|
||||||
iniconfig==2.0.0
|
iniconfig==2.0.0
|
||||||
|
@ -1,25 +1,26 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import widgetUtils
|
import widgetUtils
|
||||||
import output
|
import output
|
||||||
from extra import translator, SpellChecker
|
from extra import SpellChecker
|
||||||
|
|
||||||
class basicMessage(object):
|
class basicMessage(object):
|
||||||
def translate(self, event=None):
|
def translate(self, event=None):
|
||||||
dlg = translator.gui.translateDialog()
|
pass
|
||||||
if dlg.get_response() == widgetUtils.OK:
|
# dlg = translator.gui.translateDialog()
|
||||||
text_to_translate = self.message.text.GetValue()
|
# if dlg.get_response() == widgetUtils.OK:
|
||||||
language_dict = translator.translator.available_languages()
|
# text_to_translate = self.message.text.GetValue()
|
||||||
for k in language_dict:
|
# language_dict = translator.translator.available_languages()
|
||||||
if language_dict[k] == dlg.dest_lang.GetStringSelection():
|
# for k in language_dict:
|
||||||
dst = k
|
# if language_dict[k] == dlg.dest_lang.GetStringSelection():
|
||||||
msg = translator.translator.translate(text=text_to_translate, target=dst)
|
# dst = k
|
||||||
self.message.text.ChangeValue(msg)
|
# msg = translator.translator.translate(text=text_to_translate, target=dst)
|
||||||
self.message.text.SetInsertionPoint(len(self.message.text.GetValue()))
|
# self.message.text.ChangeValue(msg)
|
||||||
self.text_processor()
|
# self.message.text.SetInsertionPoint(len(self.message.text.GetValue()))
|
||||||
self.message.text.SetFocus()
|
# self.text_processor()
|
||||||
output.speak(_(u"Translated"))
|
# self.message.text.SetFocus()
|
||||||
else:
|
# output.speak(_(u"Translated"))
|
||||||
return
|
# else:
|
||||||
|
# return
|
||||||
|
|
||||||
def text_processor(self, *args, **kwargs):
|
def text_processor(self, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import httpcore
|
|
||||||
httpcore.SyncHTTPTransport = httpcore.AsyncHTTPProxy
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
Loading…
Reference in New Issue
Block a user