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
|
||||
demoji==1.1.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
|
||||
importlib-metadata==7.1.0
|
||||
iniconfig==2.0.0
|
||||
|
@ -1,25 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import widgetUtils
|
||||
import output
|
||||
from extra import translator, SpellChecker
|
||||
from extra import SpellChecker
|
||||
|
||||
class basicMessage(object):
|
||||
def translate(self, event=None):
|
||||
dlg = translator.gui.translateDialog()
|
||||
if dlg.get_response() == widgetUtils.OK:
|
||||
text_to_translate = self.message.text.GetValue()
|
||||
language_dict = translator.translator.available_languages()
|
||||
for k in language_dict:
|
||||
if language_dict[k] == dlg.dest_lang.GetStringSelection():
|
||||
dst = k
|
||||
msg = translator.translator.translate(text=text_to_translate, target=dst)
|
||||
self.message.text.ChangeValue(msg)
|
||||
self.message.text.SetInsertionPoint(len(self.message.text.GetValue()))
|
||||
self.text_processor()
|
||||
self.message.text.SetFocus()
|
||||
output.speak(_(u"Translated"))
|
||||
else:
|
||||
return
|
||||
pass
|
||||
# dlg = translator.gui.translateDialog()
|
||||
# if dlg.get_response() == widgetUtils.OK:
|
||||
# text_to_translate = self.message.text.GetValue()
|
||||
# language_dict = translator.translator.available_languages()
|
||||
# for k in language_dict:
|
||||
# if language_dict[k] == dlg.dest_lang.GetStringSelection():
|
||||
# dst = k
|
||||
# msg = translator.translator.translate(text=text_to_translate, target=dst)
|
||||
# self.message.text.ChangeValue(msg)
|
||||
# self.message.text.SetInsertionPoint(len(self.message.text.GetValue()))
|
||||
# self.text_processor()
|
||||
# self.message.text.SetFocus()
|
||||
# output.speak(_(u"Translated"))
|
||||
# else:
|
||||
# return
|
||||
|
||||
def text_processor(self, *args, **kwargs):
|
||||
pass
|
||||
|
@ -1,6 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import httpcore
|
||||
httpcore.SyncHTTPTransport = httpcore.AsyncHTTPProxy
|
||||
import sys
|
||||
import os
|
||||
import platform
|
||||
|
Loading…
Reference in New Issue
Block a user