Skip to content

Commit

Permalink
Auto-translation is now duplicated on the Braille display
Browse files Browse the repository at this point in the history
  • Loading branch information
alekssamos committed Nov 16, 2020
1 parent 855df19 commit 6e97b18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions addon/globalPlugins/yandexTranslate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ctypes
import braille
import scriptHandler
import os
import json
Expand Down Expand Up @@ -26,8 +26,6 @@

from .yandexfreetranslate import YandexFreeTranslate

clientLib=ctypes.windll.LoadLibrary(os.path.join(os.path.dirname(__file__), "nvdaControllerClient32.dll"))

addonHandler.initTranslation()
_cache = {}
FILE_CONFIG_PATH = os.path.join(globalVars.appArgs.configPath, "YandexTranslateSettings.pickle")
Expand Down Expand Up @@ -287,7 +285,7 @@ def __init__(self):

def speakDecorator(self, speak):
def my_speak(speechSequence, *args, **kwargs):
try: clientLib.nvdaController_brailleMessage(" ".join(speechSequence))
try: braille.handler.message(" ".join(speechSequence))
except: pass
return speak(speechSequence, *args, **kwargs)
def wrapper(speechSequence, *args, **kwargs):
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion addon/manifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ summary = "Yandex translator for NVDA"
description = """Translates text using service Yandex Translate."""
author = "alekssamos <[email protected]>"
url = https://github.com/alekssamos/YandexTranslate/
version = 2020.11.15
version = 2020.11.16
docFileName = None
minimumNVDAVersion = 2019.3
lastTestedNVDAVersion = 2020.2
Expand Down

0 comments on commit 6e97b18

Please sign in to comment.