From 826d3fb503d7aed84826c3b6869cce46f19a9ee7 Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 24 Mar 2018 19:55:44 +0100 Subject: [PATCH] add braille alternative text --- src/fenrirscreenreader/core/outputManager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/core/outputManager.py b/src/fenrirscreenreader/core/outputManager.py index 2e9e125d..c6090120 100644 --- a/src/fenrirscreenreader/core/outputManager.py +++ b/src/fenrirscreenreader/core/outputManager.py @@ -24,7 +24,7 @@ class outputManager(): self.env['runtime']['settingsManager'].shutdownDriver('speechDriver') self.env['runtime']['settingsManager'].shutdownDriver('brailleDriver') - def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True): + def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True, brailleAlternative = ''): if text == '': return self.env['runtime']['debug'].writeDebugOut("presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO) @@ -40,7 +40,11 @@ class outputManager(): self.lastEcho = text self.speakText(text, interrupt, ignorePunctuation,toAnnounceCapital) if flush: - self.brailleText(text, flush) + if brailleAlternative != '': + brlText = brailleAlternative + else: + brlText = text + self.brailleText(brlText, flush) def getLastEcho(self): return self.lastEcho def speakText(self, text, interrupt=True, ignorePunctuation=False, announceCapital=False):