Finished translation implementation for all commands

This commit is contained in:
Manuel Cortéz 2017-02-26 15:49:37 -06:00
parent bc5dc8458a
commit 65d5d7f48a
70 changed files with 189 additions and 189 deletions

View File

@ -14,13 +14,13 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'displays the position of the review cursor'
return _('displays the position of the review cursor')
def run(self):
# Prefer review cursor over text cursor
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
self.env['runtime']['outputManager'].presentText("line "+ str(cursorPos['y']+1) + " column "+ str(cursorPos['x']+1), interrupt=True)
self.env['runtime']['outputManager'].presentText(_("line {0}, column {1}").format(cursorPos['y']+1, cursorPos['x']+1), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'read to end of line, use review cursor if you are in reviewmode, otherwhise use text cursor'
return _('read to end of line, use review cursor if you are in review mode, otherwhise use text cursor')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,7 +24,7 @@ class command():
line_utils.getCurrentLine(cursorPos['x'], cursorPos['y'], self.env['screenData']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(currLine[cursorPos['x']], interrupt=True)
self.env['runtime']['outputManager'].announceActiveCursor()

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'presents the date'
return _('presents the date')
def run(self):
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'decrease sound volume'
return _('decrease sound volume')
def run(self):
@ -26,7 +26,7 @@ class command():
value = 0.1
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent sound volume", soundIcon='SoundOff', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOff', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'decreases the pitch of the speech'
return _('decreases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
@ -24,7 +24,7 @@ class command():
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech pitch", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)) soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'decreases the rate of the speech'
return _('decreases the rate of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
@ -24,7 +24,7 @@ class command():
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech rate", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'decreases the volume of the speech'
return _('decreases the volume of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
@ -24,7 +24,7 @@ class command():
value = 0.1
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech volume", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,15 +14,15 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'exits review mode'
return _('exits review mode')
def run(self):
if not self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['outputManager'].presentText("Not in review mode", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("Not in review mode"), interrupt=True)
return
self.env['runtime']['cursorManager'].clearReviewCursor()
self.env['runtime']['outputManager'].presentText("leve review mode", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("leave review mode"), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -18,7 +18,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'export the current fenrir clipboard to X clipboard'
return _('export the current fenrir clipboard to X clipboard')
def run(self):
_thread.start_new_thread(self._threadRun , ())
@ -26,16 +26,16 @@ class command():
try:
currClipboard = self.env['commandBuffer']['currClipboard']
if currClipboard < 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if not self.env['commandBuffer']['clipboard']:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if not self.env['commandBuffer']['clipboard'][currClipboard]:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if self.env['commandBuffer']['clipboard'][currClipboard] == '':
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
p = Popen('su -c "echo -n \"' + self.env['commandBuffer']['clipboard'][currClipboard] +'\" | xclip -selection c' + self.env['generalInformation']['currUser'] , stdout=PIPE, stderr=PIPE, shell=True)

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'selects the first clipboard'
return _('selects the first clipboard')
def run(self):
if len(self.env['commandBuffer']['clipboard']) == 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['commandBuffer']['currClipboard'] = 0
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True)

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'sends the following keypress to the terminal'
return _('sends the following keypress to the terminal')
def run(self):
self.env['input']['keyForeward'] = 3
self.env['runtime']['outputManager'].presentText('Foreward next keypress', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Forward next keypress'), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'adjusts the volume for in coming sounds'
return _('adjusts the volume for in coming sounds')
def run(self):
@ -26,7 +26,7 @@ class command():
value = 1.0
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent sound volume", soundIcon='SoundOn', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOn', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'increases the pitch of the speech'
return _('increases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
@ -24,7 +24,7 @@ class command():
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech pitch", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'increase the speech rate'
return _('increase the speech rate')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
@ -24,7 +24,7 @@ class command():
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech rate", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'increase the speech volume'
return _('increase the speech volume')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
@ -24,7 +24,7 @@ class command():
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(str(int(value * 100)) + " percent speech volume", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'shows the indention level for the current line'
return _('shows the indention level for the current line')
def run(self):
# Prefer review cursor over text cursor
@ -28,9 +28,9 @@ class command():
line_utils.getCurrentLine(cursorPos['x'], cursorPos['y'], self.env['screenData']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText("indent "+ str(len(currLine) - len(currLine.lstrip())), interrupt=True)
self.env['runtime']['outputManager'].presentText(_("indent {0}").format(len(currLine) - len(currLine.lstrip())), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'selects the last clipboard'
return _('selects the last clipboard')
def run(self):
if len(self.env['commandBuffer']['clipboard']) == 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['commandBuffer']['currClipboard'] = len(self.env['commandBuffer']['clipboard']) -1
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True)

View File

@ -14,7 +14,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'displays the last received text'
return _('displays the last received text')
def run(self):
self.env['runtime']['outputManager'].presentText(self.env['screenData']['newDelta'], interrupt=True)

View File

@ -15,12 +15,12 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'speaks the currently selected text that will be copied to the clipboard'
return _('speaks the currently selected text that will be copied to the clipboard')
def run(self):
if not (self.env['commandBuffer']['Marks']['1'] and \
self.env['commandBuffer']['Marks']['2']):
self.env['runtime']['outputManager'].presentText("please set begin and endmark", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("please set begin and endmark"), interrupt=True)
return
# use the last first and the last setted mark as range
@ -30,7 +30,7 @@ class command():
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
if marked.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)

View File

@ -14,16 +14,16 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'selects the next clipboard'
return _('selects the next clipboard')
def run(self):
if len(self.env['commandBuffer']['clipboard']) == 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['commandBuffer']['currClipboard'] += 1
if self.env['commandBuffer']['currClipboard'] > len(self.env['commandBuffer']['clipboard']) -1:
self.env['commandBuffer']['currClipboard'] = 0
self.env['runtime']['outputManager'].presentText('First clipboard ', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=False)
else:
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True)

View File

@ -15,21 +15,21 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'pastes the text from the currently selected clipboard'
return _('pastes the text from the currently selected clipboard')
def run(self):
currClipboard = self.env['commandBuffer']['currClipboard']
if currClipboard < 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if not self.env['commandBuffer']['clipboard']:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if not self.env['commandBuffer']['clipboard'][currClipboard]:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
if self.env['commandBuffer']['clipboard'][currClipboard] == '':
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
time.sleep(0.01)

View File

@ -15,14 +15,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'present first line'
return _('present first line')
def run(self):
x, y, firstLine = \
line_utils.getCurrentLine(0, 0, self.env['screenData']['newContentText'])
if firstLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(firstLine, interrupt=True)
def setCallback(self, callback):

View File

@ -15,14 +15,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'current line'
return _('current line')
def run(self):
x, y, lastLine = \
line_utils.getCurrentLine(0, self.env['screenData']['lines'] -1, self.env['screenData']['newContentText'])
if lastLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(lastLine, interrupt=True)
def setCallback(self, callback):

View File

@ -14,16 +14,16 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'selects the previous clipboard'
return _('selects the previous clipboard')
def run(self):
if len(self.env['commandBuffer']['clipboard']) == 0:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['commandBuffer']['currClipboard'] -= 1
if self.env['commandBuffer']['currClipboard'] < 0:
self.env['commandBuffer']['currClipboard'] = len(self.env['commandBuffer']['clipboard']) -1
self.env['runtime']['outputManager'].presentText('Last clipboard ', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=False)
else:
self.env['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True)

View File

@ -14,7 +14,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'exits Fenrir'
return _('exits Fenrir')
def run(self):
self.env['generalInformation']['running'] = False

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'removes marks from selected text'
return _('removes marks from selected text')
def run(self):
self.env['runtime']['cursorManager'].clearMarks()
self.env['runtime']['outputManager'].presentText('Remove marks', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Remove marks'), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -24,14 +24,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'removes the current word from the exceptions dictionary'
return _('removes the current word from the exceptions dictionary')
def updateSpellLanguage(self):
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')
def run(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('pyenchant is not installed'), interrupt=True)
return
if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language:
try:
@ -47,9 +47,9 @@ class command():
currWord = currWord.strip(string.whitespace + '!"#$%&\()*+,-./:;<=§>?@[\\]^_{|}~')
if not currWord.isspace():
if self.spellChecker.is_removed(currWord):
self.env['runtime']['outputManager'].presentText(currWord + ' is already removed from dict',soundIcon='Cancel', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('{0} is already removed from dict').format(currWord,), soundIcon='Cancel', interrupt=True)
else:
self.spellChecker.remove(currWord)
self.env['runtime']['outputManager'].presentText(currWord + ' removed',soundIcon='Accept', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('{0} removed').format(currWord,), soundIcon='Accept', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'move review to bottom of screen'
return _('move review to bottom of screen')
def run(self):
self.env['screenData']['newCursorReview'] = { 'x': 0, 'y':self.env['screenData']['lines'] -1}
self.env['runtime']['outputManager'].presentText("Bottom", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("Bottom"), interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'presents the current character.'
return _('presents the current character.')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review and phonetically presents the current character'
return _('set review and phonetically presents the current character')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,7 +24,7 @@ class command():
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if currChar.isspace():
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
currChar = char_utils.getPhonetic(currChar)
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, announceCapital=True, flush=False)

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'current line'
return _('current line')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,7 +24,7 @@ class command():
line_utils.getCurrentLine(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
def setCallback(self, callback):

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'current word.'
return _('current word.')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,14 +24,14 @@ class command():
word_utils.getCurrentWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -16,7 +16,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'phonetically spells the current word and set review to it'
return _('phonetically spells the current word and set review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,7 +24,7 @@ class command():
word_utils.getCurrentWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in currWord:
@ -33,9 +33,9 @@ class command():
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to char below the current char and present it.'
return _('set review cursor to char below the current char and present it.')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,6 +24,6 @@ class command():
self.env['runtime']['outputManager'].presentText(downChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to begin of current line and display the content'
return _('set review cursor to begin of current line and display the content')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,10 +24,10 @@ class command():
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if currChar.isspace():
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
self.env['runtime']['outputManager'].presentText("beginning of line", interrupt=False)
self.env['runtime']['outputManager'].presentText(_("beginning of line"), interrupt=False)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to end of current line and display the content'
return _('set review cursor to end of current line and display the content')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,7 +24,7 @@ class command():
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
self.env['runtime']['outputManager'].presentText("end of line", interrupt=False)
self.env['runtime']['outputManager'].presentText(_("end of line"), interrupt=False)
def setCallback(self, callback):
pass

View File

@ -16,21 +16,21 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to end of current line and display the content'
return _('set review cursor to end of current line and display the content')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
x, y, currLine = \
line_utils.getCurrentLine(cursorPos['x'], cursorPos['y'], self.env['screenData']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText("line is empty" ,interrupt=True)
self.env['runtime']['outputManager'].presentText(_("line is empty"), interrupt=True)
return
self.env['runtime']['cursorManager'].setReviewCursorPosition((len(currLine) - len(currLine.lstrip())), cursorPos['y'])
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], currChar = \
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
self.env['runtime']['outputManager'].presentText("first char in line indent " + str(len(currLine) - len(currLine.lstrip())), interrupt=False)
self.env['runtime']['outputManager'].presentText(_("first char in line indent {0}").format(str(len(currLine) - len(currLine.lstrip()))), interrupt=False)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to end of current line and display the content'
return _('set review cursor to end of current line and display the content')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,7 +24,7 @@ class command():
char_utils.getLastCharInLine(self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
self.env['runtime']['outputManager'].presentText(lastChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
self.env['runtime']['outputManager'].presentText("last char in line", interrupt=False)
self.env['runtime']['outputManager'].presentText(_("last char in line"), interrupt=False)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review to the next character and presents it'
return _('moves review to the next character and presents it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -25,9 +25,9 @@ class command():
self.env['runtime']['outputManager'].presentText(nextChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'phonetically presents the next character and set review to it'
return _('phonetically presents the next character and set review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -27,9 +27,9 @@ class command():
self.env['runtime']['outputManager'].presentText(nextChar ,interrupt=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review to the next line and presents it'
return _('moves review to the next line and presents it')
def run(self):
self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview']
@ -26,11 +26,11 @@ class command():
line_utils.getNextLine(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if nextLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review to the next word and presents it'
return _('moves review to the next word and presents it')
def run(self):
self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview']
@ -26,14 +26,14 @@ class command():
word_utils.getNextWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -16,7 +16,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'phonetically spells the current word and set review to it'
return _('phonetically spells the current word and set review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,7 +24,7 @@ class command():
word_utils.getNextWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in nextWord:
@ -33,9 +33,9 @@ class command():
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review to the previous character and presents it'
return _('moves review to the previous character and presents it')
def run(self):
self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview']
@ -28,9 +28,9 @@ class command():
self.env['runtime']['outputManager'].presentText(prevChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'phonetically presents the previous character and set review to it'
return _('phonetically presents the previous character and set review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -27,9 +27,9 @@ class command():
self.env['runtime']['outputManager'].presentText(prevChar ,interrupt=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review to the previous line and presents it'
return _('moves review to the previous line and presents it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,12 +24,12 @@ class command():
line_utils.getPrevLine(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if prevLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'moves review focus to the previous word and presents it'
return _('moves review focus to the previous word and presents it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,14 +24,14 @@ class command():
word_utils.getPrevWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=False, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -16,7 +16,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'phonetically spells the current word and set review to it'
return _('phonetically spells the current word and set review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
@ -24,7 +24,7 @@ class command():
word_utils.getPrevWord(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText("blank", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in prevWord:
@ -33,9 +33,9 @@ class command():
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'move review to top of screen'
return _('move review to top of screen')
def run(self):
self.env['screenData']['newCursorReview'] = {'x':0,'y':0}
self.env['runtime']['outputManager'].presentText("Top", interrupt=True, flush=False)
self.env['runtime']['outputManager'].presentText(_("Top"), interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set review cursor to the char in the line below and present it'
return _('set review cursor to the char in the line below and present it')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
@ -24,9 +24,9 @@ class command():
self.env['runtime']['outputManager'].presentText(upChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=True, soundIcon='EndOfScreen')
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -15,11 +15,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Bookmark ' + self.ID
return _('set Bookmark {0}').format(self.ID,)
def run(self):
if not self.env['commandBuffer']['Marks']['1']:
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("No Mark found"), interrupt=True)
return
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
@ -29,7 +29,7 @@ class command():
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
else:
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Bookmark {0} set for application {1}').format(self.ID, currApp), interrupt=True)
self.env['commandBuffer']['Marks']['1'] = None
self.env['commandBuffer']['Marks']['2'] = None
def setCallback(self, callback):

View File

@ -14,17 +14,17 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'places marks to select text to copy to the clipboard'
return _('places marks to select text to copy to the clipboard')
def run(self):
if not self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['outputManager'].presentText('no review cursor', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('no review cursor'), interrupt=True)
return
currMark = self.env['runtime']['cursorManager'].setMark()
if currMark == 1:
self.env['runtime']['outputManager'].presentText('set mark',soundIcon='PlaceStartMark', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('set mark'), soundIcon='PlaceStartMark', interrupt=True)
elif currMark == 2:
self.env['runtime']['outputManager'].presentText('set mark',soundIcon='PlaceEndMark', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('set mark'),soundIcon='PlaceEndMark', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,15 +14,15 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'set Window Mode, needs 2 marks '
return _('set Window Mode, needs 2 marks ')
def run(self):
if self.env['runtime']['cursorManager'].setWindowForApplication():
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['runtime']['outputManager'].presentText('Window Mode on for application ' + currApp, interrupt=True)
self.env['runtime']['outputManager'].presentText(_('Window Mode on for application {0}').format(currApp), interrupt=True)
self.env['runtime']['cursorManager'].clearMarks()
else:
self.env['runtime']['outputManager'].presentText("Set window beginn and end marks", interrupt=True)
self.env['runtime']['outputManager'].presentText(_("Set window begin and end marks"), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,7 +14,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'interrupts the current presentation'
return _('interrupts the current presentation')
def run(self):
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return

View File

@ -23,17 +23,17 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'checks the spelling of the current word'
return _('checks the spelling of the current word')
def updateSpellLanguage(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('pyenchant is not installed'), interrupt=True)
return
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')
def run(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('pyenchant is not installed'), interrupt=True)
return
if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language:
try:
@ -49,8 +49,8 @@ class command():
if not currWord.isspace():
if not self.spellChecker.check(currWord):
self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('misspelled'),soundIcon='mispell', interrupt=True)
elif not ignore:
self.env['runtime']['outputManager'].presentText('correct',soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_('correct'),soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -18,16 +18,16 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'script: ' + os.path.basename(self.scriptPath) + ' fullpath: '+ self.scriptPath
return _('script: {0} fullpath: {1}').format(os.path.basename(self.scriptPath), self.scriptPath)
def run(self):
if not os.path.exists(self.scriptPath):
self.env['runtime']['outputManager'].presentText('scriptfile does not exist' , soundIcon='', interrupt=False)
self.env['runtime']['outputManager'].presentText(_('scriptfile does not exist'), soundIcon='', interrupt=False)
return
if not os.path.isfile(self.scriptPath):
self.env['runtime']['outputManager'].presentText('scriptfile is not a file' , soundIcon='', interrupt=False)
self.env['runtime']['outputManager'].presentText(_('scriptfile is not a file'), soundIcon='', interrupt=False)
return
if not os.access(self.scriptPath, os.X_OK):
self.env['runtime']['outputManager'].presentText('scriptfile is not executable' , soundIcon='', interrupt=False)
self.env['runtime']['outputManager'].presentText(_('scriptfile is not executable'), soundIcon='', interrupt=False)
return
_thread.start_new_thread(self._threadRun , ())

View File

@ -14,11 +14,11 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'disables speech until next keypress'
return _('disables speech until next keypress')
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].presentText("speech temporary disabled", soundIcon='SpeechOff', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True)
self.env['commandBuffer']['enableSpeechOnKeypress'] = True
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
self.env['runtime']['outputManager'].interruptOutput()

View File

@ -15,7 +15,7 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'presents the time'
return _('presents the time')
def run(self):
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')

View File

@ -13,14 +13,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'enables or disables automatic reading of new text as it appears'
return _('enables or disables automatic reading of new text as it appears')
def run(self):
self.env['runtime']['settingsManager'].setSetting('speech', 'autoReadIncoming', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
self.env['runtime']['outputManager'].presentText("autoread enabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("autoread enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText("autoread disabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("autoread disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -14,14 +14,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'enables or disables automatic spell checking'
return _('enables or disables automatic spell checking')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'autoSpellCheck', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
self.env['runtime']['outputManager'].presentText("auto spellcheck enabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("auto spellcheck enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText("auto spellcheck disabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("auto spellcheck disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -13,14 +13,14 @@ class command():
def shutdown(self):
pass
def getDescription(self):
return 'enables or disables automatic reading of time after an period'
return _('enables or disables automatic reading of time after an period')
def run(self):
self.env['runtime']['settingsManager'].setSetting('time', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
self.env['runtime']['outputManager'].presentText("autotime enabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("autotime enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText("autotime disabled", soundIcon='', interrupt=True)
self.env['runtime']['outputManager'].presentText(_("autotime disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass