diff --git a/src/fenrir/commands/commands/bookmark_10.py b/src/fenrir/commands/commands/bookmark_10.py index a975772b..6dec1f6a 100644 --- a/src/fenrir/commands/commands/bookmark_10.py +++ b/src/fenrir/commands/commands/bookmark_10.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_2.py b/src/fenrir/commands/commands/bookmark_2.py index 5eb9a660..86135a17 100644 --- a/src/fenrir/commands/commands/bookmark_2.py +++ b/src/fenrir/commands/commands/bookmark_2.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_3.py b/src/fenrir/commands/commands/bookmark_3.py index 95c521d7..6c520f73 100644 --- a/src/fenrir/commands/commands/bookmark_3.py +++ b/src/fenrir/commands/commands/bookmark_3.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_4.py b/src/fenrir/commands/commands/bookmark_4.py index 7386f998..0bbb53d5 100644 --- a/src/fenrir/commands/commands/bookmark_4.py +++ b/src/fenrir/commands/commands/bookmark_4.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_5.py b/src/fenrir/commands/commands/bookmark_5.py index 9250b058..10c6fd2c 100644 --- a/src/fenrir/commands/commands/bookmark_5.py +++ b/src/fenrir/commands/commands/bookmark_5.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_6.py b/src/fenrir/commands/commands/bookmark_6.py index 0749587e..defdd9be 100644 --- a/src/fenrir/commands/commands/bookmark_6.py +++ b/src/fenrir/commands/commands/bookmark_6.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_7.py b/src/fenrir/commands/commands/bookmark_7.py index e680dbdf..8a6baf49 100644 --- a/src/fenrir/commands/commands/bookmark_7.py +++ b/src/fenrir/commands/commands/bookmark_7.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_8.py b/src/fenrir/commands/commands/bookmark_8.py index d540c758..e4be37d3 100644 --- a/src/fenrir/commands/commands/bookmark_8.py +++ b/src/fenrir/commands/commands/bookmark_8.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/bookmark_9.py b/src/fenrir/commands/commands/bookmark_9.py index a6f53387..f0afeb64 100644 --- a/src/fenrir/commands/commands/bookmark_9.py +++ b/src/fenrir/commands/commands/bookmark_9.py @@ -16,18 +16,18 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'read Bookmark ' + self.ID + return _('read Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() if not self.env['commandBuffer']['bookMarks'][self.ID]: - self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} not set').format(self.ID,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']: - self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark for application {0} not set').format(currApp,), interrupt=True) return # set marks @@ -40,7 +40,7 @@ class command(): x, y, marked = \ line_utils.getCurrentLine(startMark['x'], startMark['y'], 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) diff --git a/src/fenrir/commands/commands/braille_flush.py b/src/fenrir/commands/commands/braille_flush.py index bdc34854..3c0ece33 100644 --- a/src/fenrir/commands/commands/braille_flush.py +++ b/src/fenrir/commands/commands/braille_flush.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'flush the braille device if an message is written on' + return _('flush the braille device if a message is written on') def run(self): self.env['runtime']['outputManager'].clearFlushTime() def setCallback(self, callback): diff --git a/src/fenrir/commands/commands/braille_pan_left.py b/src/fenrir/commands/commands/braille_pan_left.py index 91eaa66b..284dacc7 100644 --- a/src/fenrir/commands/commands/braille_pan_left.py +++ b/src/fenrir/commands/commands/braille_pan_left.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'Move braille view to the left.' + return _('Move braille view to the left.') def run(self): panned = self.env['runtime']['outputManager'].setPanLeft() def setCallback(self, callback): diff --git a/src/fenrir/commands/commands/braille_pan_right.py b/src/fenrir/commands/commands/braille_pan_right.py index b1858237..c0272fba 100644 --- a/src/fenrir/commands/commands/braille_pan_right.py +++ b/src/fenrir/commands/commands/braille_pan_right.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'Move braille view to the right.' + return _('Move braille view to the right.') def run(self): panned = self.env['runtime']['outputManager'].setPanRight() def setCallback(self, callback): diff --git a/src/fenrir/commands/commands/braille_return_to_cursor.py b/src/fenrir/commands/commands/braille_return_to_cursor.py index 687ce776..01cecbbe 100644 --- a/src/fenrir/commands/commands/braille_return_to_cursor.py +++ b/src/fenrir/commands/commands/braille_return_to_cursor.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'Set the braille view back to cursor.' + return _('Set the braille view back to cursor.') def run(self): self.env['runtime']['outputManager'].removePanning() def setCallback(self, callback): diff --git a/src/fenrir/commands/commands/clear_bookmark_1.py b/src/fenrir/commands/commands/clear_bookmark_1.py index 686b7ff0..d543a97e 100644 --- a/src/fenrir/commands/commands/clear_bookmark_1.py +++ b/src/fenrir/commands/commands/clear_bookmark_1.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_10.py b/src/fenrir/commands/commands/clear_bookmark_10.py index 335a73b9..5e77a224 100644 --- a/src/fenrir/commands/commands/clear_bookmark_10.py +++ b/src/fenrir/commands/commands/clear_bookmark_10.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_2.py b/src/fenrir/commands/commands/clear_bookmark_2.py index 3f6f7139..baa3daea 100644 --- a/src/fenrir/commands/commands/clear_bookmark_2.py +++ b/src/fenrir/commands/commands/clear_bookmark_2.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_3.py b/src/fenrir/commands/commands/clear_bookmark_3.py index 22471fa8..924ed7d7 100644 --- a/src/fenrir/commands/commands/clear_bookmark_3.py +++ b/src/fenrir/commands/commands/clear_bookmark_3.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_4.py b/src/fenrir/commands/commands/clear_bookmark_4.py index 3d440a3b..781d8aa0 100644 --- a/src/fenrir/commands/commands/clear_bookmark_4.py +++ b/src/fenrir/commands/commands/clear_bookmark_4.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_5.py b/src/fenrir/commands/commands/clear_bookmark_5.py index 17d275bd..54a06923 100644 --- a/src/fenrir/commands/commands/clear_bookmark_5.py +++ b/src/fenrir/commands/commands/clear_bookmark_5.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_6.py b/src/fenrir/commands/commands/clear_bookmark_6.py index d7906f01..a79267fc 100644 --- a/src/fenrir/commands/commands/clear_bookmark_6.py +++ b/src/fenrir/commands/commands/clear_bookmark_6.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_7.py b/src/fenrir/commands/commands/clear_bookmark_7.py index 3a46a111..39cb1435 100644 --- a/src/fenrir/commands/commands/clear_bookmark_7.py +++ b/src/fenrir/commands/commands/clear_bookmark_7.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_8.py b/src/fenrir/commands/commands/clear_bookmark_8.py index f9ce2a31..b5e22414 100644 --- a/src/fenrir/commands/commands/clear_bookmark_8.py +++ b/src/fenrir/commands/commands/clear_bookmark_8.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_bookmark_9.py b/src/fenrir/commands/commands/clear_bookmark_9.py index 79e47f39..a9fd30a4 100644 --- a/src/fenrir/commands/commands/clear_bookmark_9.py +++ b/src/fenrir/commands/commands/clear_bookmark_9.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'remove Bookmark ' + self.ID + return _('remove Bookmark {0}').format(self.ID,) def run(self): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - + del self.env['commandBuffer']['bookMarks'][self.ID][currApp] - self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Bookmark {0} removed for application {1}').format(self.ID, currApp), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_clipboard.py b/src/fenrir/commands/commands/clear_clipboard.py index 8e82bfb0..3abe1257 100644 --- a/src/fenrir/commands/commands/clear_clipboard.py +++ b/src/fenrir/commands/commands/clear_clipboard.py @@ -14,12 +14,12 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'clears the currently selected clipboard' + return _('clears the currently selected clipboard') def run(self): self.env['commandBuffer']['currClipboard'] = -1 del self.env['commandBuffer']['clipboard'][:] - self.env['runtime']['outputManager'].presentText('clipboard cleared', interrupt=True) + self.env['runtime']['outputManager'].presentText(_('clipboard cleared'), interrupt=True) return def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/clear_window_application.py b/src/fenrir/commands/commands/clear_window_application.py index 81d1707c..11af3045 100644 --- a/src/fenrir/commands/commands/clear_window_application.py +++ b/src/fenrir/commands/commands/clear_window_application.py @@ -14,14 +14,14 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'Turn off window mode for application' + return _('Turn off window mode for application') def run(self): if self.env['runtime']['cursorManager'].clearWindowForApplication(): currApp = self.env['runtime']['applicationManager'].getCurrentApplication() - self.env['runtime']['outputManager'].presentText('Window Mode off for application ' + currApp, interrupt=True) + self.env['runtime']['outputManager'].presentText(_('Window Mode off for application {0}').format(currApp,), interrupt=True) else: - self.env['runtime']['outputManager'].presentText("Not in window Mode", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Not in window Mode"), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/commands/copy_marked_to_clipboard.py b/src/fenrir/commands/commands/copy_marked_to_clipboard.py index 36d96d3e..687fa097 100644 --- a/src/fenrir/commands/commands/copy_marked_to_clipboard.py +++ b/src/fenrir/commands/commands/copy_marked_to_clipboard.py @@ -15,11 +15,11 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'copies marked text to the currently selected clipboard' + return _('copies marked text to the currently selected clipboard') def run(self): if not self.env['commandBuffer']['Marks']['1']: - self.env['runtime']['outputManager'].presentText("one or two marks needed", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("one or two marks needed"), interrupt=True) return if not self.env['commandBuffer']['Marks']['2']: self.env['runtime']['cursorManager'].setMark() diff --git a/src/fenrir/commands/commands/curr_clipboard.py b/src/fenrir/commands/commands/curr_clipboard.py index d47caec0..2adfbed5 100644 --- a/src/fenrir/commands/commands/curr_clipboard.py +++ b/src/fenrir/commands/commands/curr_clipboard.py @@ -14,11 +14,11 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'speaks the contents of the currently selected clipboard' + return _('speaks the contents of the currently selected 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['runtime']['outputManager'].presentText(self.env['commandBuffer']['clipboard'][self.env['commandBuffer']['currClipboard']], interrupt=True) diff --git a/src/fenrir/commands/commands/curr_screen.py b/src/fenrir/commands/commands/curr_screen.py index 8a1d42b0..01d8723d 100644 --- a/src/fenrir/commands/commands/curr_screen.py +++ b/src/fenrir/commands/commands/curr_screen.py @@ -14,11 +14,11 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'reads the contents of the current screen' + return _('reads the contents of the current screen') def run(self): if self.env['screenData']['newContentText'].isspace(): - self.env['runtime']['outputManager'].presentText("screen is empty", soundIcon='EmptyLine', interrupt=True) + self.env['runtime']['outputManager'].presentText(_("screen is empty"), soundIcon='EmptyLine', interrupt=True) else: self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'],interrupt=True) diff --git a/src/fenrir/commands/commands/curr_screen_after_cursor.py b/src/fenrir/commands/commands/curr_screen_after_cursor.py index 7b33dff7..c009b9b0 100644 --- a/src/fenrir/commands/commands/curr_screen_after_cursor.py +++ b/src/fenrir/commands/commands/curr_screen_after_cursor.py @@ -15,7 +15,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'reads from the cursor to the bottom of the screen' + return _('reads from the cursor to the bottom of the screen') def run(self): # Prefer review cursor over text cursor @@ -24,7 +24,7 @@ class command(): textAfterCursor = mark_utils.getTextAfterMark(cursorPos, self.env['screenData']['newContentText']) if textAfterCursor.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(textAfterCursor, interrupt=True) diff --git a/src/fenrir/commands/commands/curr_screen_before_cursor.py b/src/fenrir/commands/commands/curr_screen_before_cursor.py index e9367411..1e211ed0 100644 --- a/src/fenrir/commands/commands/curr_screen_before_cursor.py +++ b/src/fenrir/commands/commands/curr_screen_before_cursor.py @@ -15,7 +15,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'Reads from the top of the screen to the cursor position' + return _('Reads from the top of the screen to the cursor position') def run(self): # Prefer review cursor over text cursor @@ -27,7 +27,7 @@ class command(): textBeforeCursor = mark_utils.getTextBeforeMark(cursorPos, self.env['screenData']['newContentText']) if textBeforeCursor.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(textBeforeCursor, interrupt=True) diff --git a/src/fenrir/commands/commands/cursor_column.py b/src/fenrir/commands/commands/cursor_column.py index 04365458..d3c119a6 100644 --- a/src/fenrir/commands/commands/cursor_column.py +++ b/src/fenrir/commands/commands/cursor_column.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'presents the current column number for review cursor in review mode or the text cursor if not. Starts with 1' + return _('presents the current column number for review cursor in review mode or the text cursor if not. Starts with 1') def run(self): cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() self.env['runtime']['outputManager'].presentText(str(cursorPos['x'] + 1) , interrupt=True) diff --git a/src/fenrir/commands/commands/cursor_lineno.py b/src/fenrir/commands/commands/cursor_lineno.py index 2d76639d..a8b39ce6 100644 --- a/src/fenrir/commands/commands/cursor_lineno.py +++ b/src/fenrir/commands/commands/cursor_lineno.py @@ -14,7 +14,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'presents the current line number for review cursor in review mode or the text cursor if not. Starts with 1' + return _('presents the current line number for review cursor in review mode or the text cursor if not. Starts with 1') def run(self): cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() self.env['runtime']['outputManager'].presentText(str(cursorPos['y'] + 1), interrupt=True)