From 21e7f68235da66e072bc58e8ac92603dbf258d20 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 14:45:14 +0100 Subject: [PATCH 01/24] clean up code/ dont crash if keyboard unplugs --- src/fenrir/core/generalInformation.py | 2 ++ src/fenrir/fenrir.py | 34 ++++----------------------- src/fenrir/inputDriver/evdevDriver.py | 7 +++++- 3 files changed, 13 insertions(+), 30 deletions(-) diff --git a/src/fenrir/core/generalInformation.py b/src/fenrir/core/generalInformation.py index ab90a0bd..c3e5ce86 100644 --- a/src/fenrir/core/generalInformation.py +++ b/src/fenrir/core/generalInformation.py @@ -11,4 +11,6 @@ generalInformation = { 'tutorialMode': False, 'currUser':'', 'prevUser':'', +'managerList':['inputManager','screenManager','commandManager','outputManager' + ,'punctuationManager','cursorManager','applicationManager','debug'], } diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index 3ffd8d2f..ea248a8f 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -97,35 +97,11 @@ class fenrir(): self.shutdownRequest() def shutdown(self): - if self.environment['runtime']['inputManager']: - self.environment['runtime']['inputManager'].shutdown() - del self.environment['runtime']['inputManager'] - self.environment['runtime']['outputManager'].presentText("Quit Fenrir", soundIcon='ScreenReaderOff', interrupt=True) - time.sleep(0.9) # wait a little for sound - - if self.environment['runtime']['screenManager']: - self.environment['runtime']['screenManager'].shutdown() - del self.environment['runtime']['screenManager'] - if self.environment['runtime']['commandManager']: - self.environment['runtime']['commandManager'].shutdown() - del self.environment['runtime']['commandManager'] - if self.environment['runtime']['outputManager']: - self.environment['runtime']['outputManager'].shutdown() - del self.environment['runtime']['outputManager'] - if self.environment['runtime']['punctuationManager']: - self.environment['runtime']['punctuationManager'].shutdown() - del self.environment['runtime']['punctuationManager'] - if self.environment['runtime']['cursorManager']: - self.environment['runtime']['cursorManager'].shutdown() - del self.environment['runtime']['cursorManager'] - if self.environment['runtime']['applicationManager']: - self.environment['runtime']['applicationManager'].shutdown() - del self.environment['runtime']['applicationManager'] - - if self.environment['runtime']['debug']: - self.environment['runtime']['debug'].shutdown() - del self.environment['runtime']['debug'] - time.sleep(0.2) # wait a little before splatter it :) + self.environment['runtime']['outputManager'].presentText("Quit Fenrir", soundIcon='ScreenReaderOff', interrupt=True) + for currManager in self.environment['generalInformation']['managerList']: + if self.environment['runtime'][currManager]: + self.environment['runtime'][currManager].shutdown() + del self.environment['runtime'][currManager] self.environment = None def main(): diff --git a/src/fenrir/inputDriver/evdevDriver.py b/src/fenrir/inputDriver/evdevDriver.py index c185b6de..f7579e22 100644 --- a/src/fenrir/inputDriver/evdevDriver.py +++ b/src/fenrir/inputDriver/evdevDriver.py @@ -50,7 +50,12 @@ class driver(): r, w, x = select(self.iDevices, [], [], self.env['runtime']['settingsManager'].getSettingAsFloat('screen', 'screenUpdateDelay')) if r != []: for fd in r: - event = self.iDevices[fd].read_one() + try: + event = self.iDevices[fd].read_one() + except: + #print('jow') + del(self.iDevices[fd]) + return None foreward = False while(event): self.env['input']['eventBuffer'].append( [self.iDevices[fd], self.uDevices[fd], event]) From 7a41c015a85d8262950497060fdd5d3d0ba5b151 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 14:52:38 +0100 Subject: [PATCH 02/24] make code more short, remove unneded sleeps --- src/fenrir/core/commandManager.py | 37 ++++++--------------------- src/fenrir/core/generalInformation.py | 2 ++ 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/src/fenrir/core/commandManager.py b/src/fenrir/core/commandManager.py index 6e75e94c..5633e03d 100644 --- a/src/fenrir/core/commandManager.py +++ b/src/fenrir/core/commandManager.py @@ -15,38 +15,17 @@ class commandManager(): def initialize(self, environment): self.env = environment # commands - self.env['runtime']['commandManager'].loadCommands('commands', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('commands') - # onInput - self.env['runtime']['commandManager'].loadCommands('onInput', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('onInput') - # onScreenUpdate - self.env['runtime']['commandManager'].loadCommands('onScreenUpdate', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('onScreenUpdate') - # onScreenChanged - self.env['runtime']['commandManager'].loadCommands('onScreenChanged', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('onScreenChanged') - # onApplicationChange - self.env['runtime']['commandManager'].loadCommands('onApplicationChange', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('onApplicationChange') - # onSwitchApplicationProfile - self.env['runtime']['commandManager'].loadCommands('onSwitchApplicationProfile', - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands('onSwitchApplicationProfile') + for commandFolder in self.env['generalInformation']['commandFolderList']: + self.env['runtime']['commandManager'].loadCommands(commandFolder, + self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) + self.env['runtime']['commandManager'].loadCommands(commandFolder) + # scripts for scriptKey self.env['runtime']['commandManager'].loadScriptCommands() + def shutdown(self): - self.env['runtime']['commandManager'].shutdownCommands('commands') - self.env['runtime']['commandManager'].shutdownCommands('onInput') - self.env['runtime']['commandManager'].shutdownCommands('onScreenUpdate') - self.env['runtime']['commandManager'].shutdownCommands('onScreenChanged') - self.env['runtime']['commandManager'].shutdownCommands('onApplicationChange') - self.env['runtime']['commandManager'].shutdownCommands('onSwitchApplicationProfile') + for commandFolder in self.env['generalInformation']['commandFolderList']: + self.env['runtime']['commandManager'].shutdownCommands(commandFolder) def loadCommands(self, section='commands',commandPath=''): if commandPath =='': diff --git a/src/fenrir/core/generalInformation.py b/src/fenrir/core/generalInformation.py index c3e5ce86..dff608aa 100644 --- a/src/fenrir/core/generalInformation.py +++ b/src/fenrir/core/generalInformation.py @@ -13,4 +13,6 @@ generalInformation = { 'prevUser':'', 'managerList':['inputManager','screenManager','commandManager','outputManager' ,'punctuationManager','cursorManager','applicationManager','debug'], +'commandFolderList':['commands','onInput','onScreenUpdate','onScreenChanged' + ,'onApplicationChange','onSwitchApplicationProfile',], } From 92691d5ae4f032df53b8cbbf8b71bf2f04a76083 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 14:54:40 +0100 Subject: [PATCH 03/24] update known bugs --- known bugs.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/known bugs.txt b/known bugs.txt index 3c538b62..3c91e17f 100644 --- a/known bugs.txt +++ b/known bugs.txt @@ -1,6 +1,5 @@ Known Bugs (Problems with the logic ): - fenrir crashes on device unplug (remove device graceful) -- no autodetection of X if you start without GUI and use startx manual - word echo triggers twice if there are two spaces after an word and you arrow over them - spellcheck triggers twice if there are two spaces after an word and you arrow over them From 4075cd78b43ec37009fb0423342b98db8a817631 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 15:17:08 +0100 Subject: [PATCH 04/24] speed up dbus logind interface creation --- src/fenrir/fenrir.py | 5 +- src/fenrir/inputDriver/evdevDriver.py | 66 +++++++++++++++------------ src/fenrir/screenDriver/vcsaDriver.py | 21 ++++----- 3 files changed, 47 insertions(+), 45 deletions(-) diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index ea248a8f..0bf18f58 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -35,8 +35,8 @@ class fenrir(): self.shutdown() def handleProcess(self): - #startTime = time.time() eventReceived = self.environment['runtime']['inputManager'].getInputEvent() + startTime = time.time() if eventReceived: self.prepareCommand() if not (self.wasCommand or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen(): @@ -65,7 +65,7 @@ class fenrir(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate') #self.environment['runtime']['outputManager'].brailleText(flush=False) self.handleCommands() - #print(time.time()-startTime) + print(time.time()-startTime) def prepareCommand(self): if self.environment['runtime']['screenManager'].isSuspendingScreen(): @@ -84,7 +84,6 @@ class fenrir(): self.environment['runtime']['commandManager'].queueCommand(command) - def handleCommands(self): if not self.environment['runtime']['commandManager'].isCommandQueued(): return diff --git a/src/fenrir/inputDriver/evdevDriver.py b/src/fenrir/inputDriver/evdevDriver.py index f7579e22..87a401a0 100644 --- a/src/fenrir/inputDriver/evdevDriver.py +++ b/src/fenrir/inputDriver/evdevDriver.py @@ -36,16 +36,15 @@ class driver(): self.getInputDevices() def shutdown(self): - pass - def getInputEvent(self): if not self._initialized: - time.sleep(0.005) # dont flood CPU - return None - if not self.iDevices: - return None - if self.iDevices == {}: - return None + return + self.releaseDevices() + def getInputEvent(self): + if not self.hasIDevices(): + time.sleep(0.008) # dont flood CPU + return None + event = None r, w, x = select(self.iDevices, [], [], self.env['runtime']['settingsManager'].getSettingAsFloat('screen', 'screenUpdateDelay')) if r != []: @@ -54,7 +53,7 @@ class driver(): event = self.iDevices[fd].read_one() except: #print('jow') - del(self.iDevices[fd]) + self.removeDevice(fd) return None foreward = False while(event): @@ -146,7 +145,7 @@ class driver(): def getLedState(self, led = 0): if not self._initialized: - return None + return False # 0 = Numlock # 1 = Capslock # 2 = Rollen @@ -168,7 +167,7 @@ class driver(): self.ledDevices[i].set_led(led , 1) def grabDevices(self): if not self._initialized: - return None + return for fd in self.iDevices: try: self.uDevices[fd] = UInput.from_device(self.iDevices[fd].fn) @@ -204,30 +203,39 @@ class driver(): # #'/dev/uinput' # ) # dev.grab() - - def releaseDevices(self): + def removeDevice(self,fd): + try: + self.iDevices[fd].ungrab() + except: + pass + try: + self.iDevices[fd].close() + except: + pass + try: + self.uDevices[fd].close() + except: + pass + def hasIDevices(self): if not self._initialized: - return None + return False + if not self.iDevices: + return False + if len(self.iDevices) == 0: + return False + return True + + def releaseDevices(self): + if not self.hasIDevices(): + return for fd in self.iDevices: - try: - self.iDevices[fd].ungrab() - except: - pass - try: - self.iDevices[fd].close() - except: - pass - try: - self.uDevices[fd].close() - except: - pass - + self.removeDevice(fd) self.iDevices.clear() self.uDevices.clear() def __del__(self): if not self._initialized: - return None - self.releaseDevices() + return + self.shutdown() diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index 54a1dc3d..bfb5f3a5 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -17,6 +17,7 @@ from utils import screen_utils class driver(): def __init__(self): self.vcsaDevicePath = '/dev/vcsa' + self.ListSessions = None def initialize(self, environment): self.env = environment def shutdown(self): @@ -62,24 +63,18 @@ class driver(): return except Exception as e: self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) - return def getSessionInformation(self): - progname = 'org.freedesktop.login1' - objpath = '/org/freedesktop/login1' - intfname = 'org.freedesktop.login1.Manager' - methname = 'ListSessions' - bus = dbus.SystemBus() - - obj = bus.get_object(progname, objpath) - inf = dbus.Interface(obj, intfname) - meth = inf.get_dbus_method(methname) - - sessions = meth() + if not self.ListSessions: + obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1') + inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager') + self.ListSessions = inf.get_dbus_method('ListSessions') + + sessions = self.ListSessions() self.env['screenData']['autoIgnoreScreens'] = [] for session in sessions: - obj = bus.get_object(progname, session[4]) + obj = bus.get_object('org.freedesktop.login1', session[4]) inf = dbus.Interface(obj, 'org.freedesktop.DBus.Properties') sessionType = inf.Get('org.freedesktop.login1.Session', 'Type') screen = str(inf.Get('org.freedesktop.login1.Session', 'TTY')) From 09764feaa897fa49a956488c1fb08ce8044675e0 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 15:22:41 +0100 Subject: [PATCH 05/24] fix releaseDevices --- src/fenrir/inputDriver/evdevDriver.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fenrir/inputDriver/evdevDriver.py b/src/fenrir/inputDriver/evdevDriver.py index 87a401a0..64bb0416 100644 --- a/src/fenrir/inputDriver/evdevDriver.py +++ b/src/fenrir/inputDriver/evdevDriver.py @@ -215,7 +215,15 @@ class driver(): try: self.uDevices[fd].close() except: - pass + pass + try: + del(self.iDevices[fd]) + except: + pass + try: + del(self.uDevices[fd]) + except: + pass def hasIDevices(self): if not self._initialized: return False @@ -228,7 +236,8 @@ class driver(): def releaseDevices(self): if not self.hasIDevices(): return - for fd in self.iDevices: + devices = self.iDevices.copy() + for fd in devices: self.removeDevice(fd) self.iDevices.clear() self.uDevices.clear() From 2186d992a7ab55bb7b9aa5249057ce3c26bfb0a8 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 18:29:03 +0100 Subject: [PATCH 06/24] remove unneded ledDevices --- src/fenrir/inputDriver/evdevDriver.py | 36 +++++++++++---------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/src/fenrir/inputDriver/evdevDriver.py b/src/fenrir/inputDriver/evdevDriver.py index 64bb0416..a291138e 100644 --- a/src/fenrir/inputDriver/evdevDriver.py +++ b/src/fenrir/inputDriver/evdevDriver.py @@ -22,7 +22,6 @@ class driver(): def __init__(self): self.iDevices = {} self.uDevices = {} - self.ledDevices = {} self._initialized = False def initialize(self, environment): @@ -38,7 +37,6 @@ class driver(): def shutdown(self): if not self._initialized: return - self.releaseDevices() def getInputEvent(self): if not self.hasIDevices(): @@ -111,21 +109,17 @@ class driver(): except Exception as e: self.env['runtime']['debug'].writeDebugOut("Skip Inputdevice : " + dev +' ' + str(e),debug.debugLevel.ERROR) self.iDevices = map(evdev.InputDevice, (readableDevices)) - self.ledDevices = map(evdev.InputDevice, (readableDevices)) + # 3 pos absolute # 2 pos relative - # 17 LEDs # 1 Keys # we try to filter out mices and other stuff here if self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper() == 'ALL': self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()} - self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities()} elif self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper() == 'NOMICE': self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()} - self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()} else: self.iDevices = {dev.fd: dev for dev in self.iDevices if dev.name.upper() in self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper().split(',')} - self.ledDevices = {dev.fd: dev for dev in self.ledDevices if dev.name.upper() in self.env['runtime']['settingsManager'].getSetting('keyboard', 'device').upper().split(',')} def mapEvent(self, event): if not self._initialized: @@ -144,27 +138,26 @@ class driver(): return None def getLedState(self, led = 0): - if not self._initialized: + if not self.hasIDevices(): return False # 0 = Numlock # 1 = Capslock # 2 = Rollen - if self.ledDevices == None: - return False - if self.ledDevices == {}: - return False - for fd, dev in self.ledDevices.items(): - return led in dev.leds() + for fd, dev in self.iDevices.items(): + if led in dev.leds(): + return True return False def toggleLedState(self, led = 0): - if not self._initialized: - return None + if not self.hasIDevices(): + return False ledState = self.getLedState(led) - for i in self.ledDevices: - if ledState == 1: - self.ledDevices[i].set_led(led , 0) - else: - self.ledDevices[i].set_led(led , 1) + for i in self.iDevices: + # 17 LEDs + if 17 in self.iDevices[i].capabilities(): + if ledState == 1: + self.iDevices[i].set_led(led , 0) + else: + self.iDevices[i].set_led(led , 1) def grabDevices(self): if not self._initialized: return @@ -245,6 +238,5 @@ class driver(): def __del__(self): if not self._initialized: return - self.shutdown() From 6c6bd86f222be2a245b00a5692baddd01511241e Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 26 Feb 2017 18:33:31 +0100 Subject: [PATCH 07/24] let install script also install settings if they dont exist --- install.sh | 4 +++- src/fenrir/core/generalInformation.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 8595ee3f..a6975adb 100755 --- a/install.sh +++ b/install.sh @@ -41,7 +41,9 @@ if [ -f "/etc/fenrir/settings/settings.conf" ]; then else install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf.current fi -fi +else + install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf +fi # end message diff --git a/src/fenrir/core/generalInformation.py b/src/fenrir/core/generalInformation.py index dff608aa..ef8d11ac 100644 --- a/src/fenrir/core/generalInformation.py +++ b/src/fenrir/core/generalInformation.py @@ -11,8 +11,8 @@ generalInformation = { 'tutorialMode': False, 'currUser':'', 'prevUser':'', -'managerList':['inputManager','screenManager','commandManager','outputManager' - ,'punctuationManager','cursorManager','applicationManager','debug'], +'managerList':['punctuationManager','cursorManager','applicationManager','commandManager' + ,'screenManager','inputManager','outputManager','debug'], 'commandFolderList':['commands','onInput','onScreenUpdate','onScreenChanged' ,'onApplicationChange','onSwitchApplicationProfile',], } From 873ae659e94a80331ace91cbb852ed72c784fb5f Mon Sep 17 00:00:00 2001 From: = Date: Sun, 26 Feb 2017 20:20:57 +0000 Subject: [PATCH 08/24] Updated translation template --- tools/fenrir.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fenrir.pot b/tools/fenrir.pot index cf521660..382ba6ec 100644 --- a/tools/fenrir.pot +++ b/tools/fenrir.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2017-02-20 10:45+UTC\n" +"POT-Creation-Date: 2017-02-26 20:20+UTC\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From bc5dc8458aebe651ed2ed0c5dbece13d8b7024fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 14:24:37 -0600 Subject: [PATCH 09/24] Updated spanish translation --- locale/es/LC_MESSAGES/fenrir.mo | Bin 4655 -> 5402 bytes locale/es/LC_MESSAGES/fenrir.po | 12 ++++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/locale/es/LC_MESSAGES/fenrir.mo b/locale/es/LC_MESSAGES/fenrir.mo index 37063a4f7048c84dd4afb53c7d1efffe67e391a7..64e9f58e55dd9b700b1d3629d625c2eaab70a90c 100644 GIT binary patch delta 1839 zcmciBU5Hd=9LMozr?IJBb$zSWEPJf2QJc1zadBcXd!dX#Q5wvy!qc2**^@KpEa#lv zDa!7I7Uujx{`h<9MQP$1L#h01cP%W&9nhc<@$Zcr+()4W7bLJcC6%himcbp#3M@ z$@?FJ_i~}X@RO*1b$kdN?#6dZ{O|0<#9&W{pxE`;g0>6pM)abA=t8g>cSl^U*PzN8?A;nGjHlD{b$XN5@h%tBK zVXSjZZG4RPCC))9%`>Y~ybZNu53|7WLEcZIGW{vuk6&YFjE5UMJcVmnU6I$ZjBnsB zTtFXx#v<+~S_RZb?eIA2h)$yxI6G+nV&FA=g!W%i8?ba%V6`>mUzch>4cdW^&)_?# z%lH*46W4JP3v5dP?Lu9$*HQgG#JBJ~Dx)>dP3;$uCUXTV_yg(=j1jdi=M(GctqdHb zf&Wa11Zj?A8Q(`ua1q(Oxq{pAJG_jmiC*KrMWy&R`g)G6)yO1Ls6N9AkFG607Am}NoF%9`$yva3`pt9)R_JRLO%bcC@Y!dj9by3={Zm#??*LgnlISuBp;o|2l7iZ)8 z8D_;sI_EX*tQTiJ2H9g`@}G|^ic^>cp$ScFvw delta 1117 zcmYk*KWI}?6vy%Np09sm+Qi0xtu-3kXk%*Iw5C;p1jG&n+r@|=h$u}K7dHo&3~qvE zh*s$0AQVI}!xQV^riep8aA>!p;8F_~L5kp@-{0#?@sj&K_ucpJo^wwYvyF6hE#W;j z+8F&X{gGpK0lRi_p!IrYY3##&Si~+YVGM8J5xk8@@geTVmzco!cm`K7jq$c^^LX8? zYF8OdaN!N|vkeY=@F&L6Z8saj1omJ7H9w0}cr84yqdxcyb>C||fgiDmo7jh=9cG7c z28a2+%`-U7L=E+VcX$w2P&fWSy)e>gHje$6!8zQEcTfwukIKj*cH?tY}Ng}VUc{_vJCjyR}Keo150d!yW8w6=U1ZJDXXCt@(Q)U4|p8ca1cHAWdJkSix=@c zmNA1%n8Qz4My;|sgcSx_zynl7Pf%O%0`=mz;ry4-UpT^iC*f+rQ>X>ap=zXp+UvVG zjZaav^$iudL%Q;qjFbO!3@$OD;;Er-Y=kyZ5wD|C{|B|FBdktEb{Q4vE!5WCLvFDJ z%;6I1`BmiGwvJi+jh}I_hy3foE$&h(Bb<==peaH{b&9S(1J78JevGcBVrsRM;Xp4} zrC*t%27}sA7Ssl`|E;EC8*QDS7N+gc-%Cwfr7R88wJnNN=~f1`cx8s# z3Niybjq=!O9wTK$+0d3JsWD5@|8Eq0@E^B&#Vh(vuif#t+7?{D9GP}Ia;foLAwOAf eL{p4&`NHIczY;Au{>|=L$NwH{y8d!v-u(x@XI~=# diff --git a/locale/es/LC_MESSAGES/fenrir.po b/locale/es/LC_MESSAGES/fenrir.po index d3da9fcf..1b8502d4 100644 --- a/locale/es/LC_MESSAGES/fenrir.po +++ b/locale/es/LC_MESSAGES/fenrir.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2017-02-20 10:45+UTC\n" -"PO-Revision-Date: 2017-02-20 04:52-0600\n" +"POT-Creation-Date: 2017-02-26 20:20+UTC\n" +"PO-Revision-Date: 2017-02-26 14:24-0600\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -137,7 +137,7 @@ msgstr "Eliminar marcador {0}" #: ../src/fenrir/commands/commands/clear_bookmark_8.py:24 #: ../src/fenrir/commands/commands/clear_bookmark_9.py:24 msgid "Bookmark {0} removed for application {1}" -msgstr "" +msgstr "el marcador {0} de la aplicación {1} ha sido eliminado" #: ../src/fenrir/commands/commands/clear_clipboard.py:17 msgid "clears the currently selected clipboard" @@ -153,7 +153,7 @@ msgstr "Desactiva el modo de ventana para la aplicación" #: ../src/fenrir/commands/commands/clear_window_application.py:22 msgid "Window Mode off for application {0}" -msgstr "" +msgstr "El modo de ventana está desactivado para la aplicación {0}" #: ../src/fenrir/commands/commands/clear_window_application.py:24 msgid "Not in window Mode" @@ -196,12 +196,16 @@ msgid "" "presents the current column number for review cursor in review mode or the " "text cursor if not. Starts with 1" msgstr "" +"Indica el número de columna actual para el cursor de revisión si se está en " +"el modo de revisión, o el cursor de texto si no." #: ../src/fenrir/commands/commands/cursor_lineno.py:17 msgid "" "presents the current line number for review cursor in review mode or the " "text cursor if not. Starts with 1" msgstr "" +"Indica el número de línea actual para el cursor de revisión si se está en el " +"modo de revisión, o el cursor de texto si no." #: ../src/fenrir/commands/commands/toggle_braille.py:17 msgid "enables and disables output in braille" From 65d5d7f48ada7a3bd766de58e47bd4718ffcd995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 15:49:37 -0600 Subject: [PATCH 10/24] Finished translation implementation for all commands --- src/fenrir/commands/commands/cursor_position.py | 4 ++-- .../commands/commands/cursor_read_to_end_of_line.py | 4 ++-- src/fenrir/commands/commands/date.py | 2 +- src/fenrir/commands/commands/dec_sound_volume.py | 4 ++-- src/fenrir/commands/commands/dec_speech_pitch.py | 4 ++-- src/fenrir/commands/commands/dec_speech_rate.py | 4 ++-- src/fenrir/commands/commands/dec_speech_volume.py | 4 ++-- src/fenrir/commands/commands/exit_review.py | 6 +++--- src/fenrir/commands/commands/export_clipboard_to_x.py | 10 +++++----- src/fenrir/commands/commands/first_clipboard.py | 4 ++-- src/fenrir/commands/commands/forward_keypress.py | 4 ++-- src/fenrir/commands/commands/inc_sound_volume.py | 4 ++-- src/fenrir/commands/commands/inc_speech_pitch.py | 4 ++-- src/fenrir/commands/commands/inc_speech_rate.py | 4 ++-- src/fenrir/commands/commands/inc_speech_volume.py | 4 ++-- src/fenrir/commands/commands/indent_curr_line.py | 6 +++--- src/fenrir/commands/commands/last_clipboard.py | 4 ++-- src/fenrir/commands/commands/last_incoming.py | 2 +- src/fenrir/commands/commands/marked_text.py | 6 +++--- src/fenrir/commands/commands/next_clipboard.py | 6 +++--- src/fenrir/commands/commands/paste_clipboard.py | 10 +++++----- src/fenrir/commands/commands/present_first_line.py | 4 ++-- src/fenrir/commands/commands/present_last_line.py | 4 ++-- src/fenrir/commands/commands/prev_clipboard.py | 6 +++--- src/fenrir/commands/commands/quit_fenrir.py | 2 +- src/fenrir/commands/commands/remove_marks.py | 4 ++-- .../commands/commands/remove_word_from_spell_check.py | 8 ++++---- src/fenrir/commands/commands/review_bottom.py | 4 ++-- src/fenrir/commands/commands/review_curr_char.py | 2 +- .../commands/commands/review_curr_char_phonetic.py | 4 ++-- src/fenrir/commands/commands/review_curr_line.py | 4 ++-- src/fenrir/commands/commands/review_curr_word.py | 8 ++++---- .../commands/commands/review_curr_word_phonetic.py | 8 ++++---- src/fenrir/commands/commands/review_down.py | 4 ++-- src/fenrir/commands/commands/review_line_begin.py | 6 +++--- src/fenrir/commands/commands/review_line_end.py | 4 ++-- src/fenrir/commands/commands/review_line_first_char.py | 6 +++--- src/fenrir/commands/commands/review_line_last_char.py | 4 ++-- src/fenrir/commands/commands/review_next_char.py | 6 +++--- .../commands/commands/review_next_char_phonetic.py | 6 +++--- src/fenrir/commands/commands/review_next_line.py | 6 +++--- src/fenrir/commands/commands/review_next_word.py | 8 ++++---- .../commands/commands/review_next_word_phonetic.py | 8 ++++---- src/fenrir/commands/commands/review_prev_char.py | 6 +++--- .../commands/commands/review_prev_char_phonetic.py | 6 +++--- src/fenrir/commands/commands/review_prev_line.py | 6 +++--- src/fenrir/commands/commands/review_prev_word.py | 8 ++++---- .../commands/commands/review_prev_word_phonetic.py | 8 ++++---- src/fenrir/commands/commands/review_top.py | 4 ++-- src/fenrir/commands/commands/review_up.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_1.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_10.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_2.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_3.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_4.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_5.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_6.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_7.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_8.py | 6 +++--- src/fenrir/commands/commands/set_bookmark_9.py | 6 +++--- src/fenrir/commands/commands/set_mark.py | 8 ++++---- src/fenrir/commands/commands/set_window_application.py | 6 +++--- src/fenrir/commands/commands/shut_up.py | 2 +- src/fenrir/commands/commands/spell_check.py | 10 +++++----- src/fenrir/commands/commands/subprocess.py | 8 ++++---- src/fenrir/commands/commands/temp_disable_speech.py | 4 ++-- src/fenrir/commands/commands/time.py | 2 +- src/fenrir/commands/commands/toggle_auto_read.py | 6 +++--- .../commands/commands/toggle_auto_spell_check.py | 6 +++--- src/fenrir/commands/commands/toggle_auto_time.py | 6 +++--- 70 files changed, 189 insertions(+), 189 deletions(-) diff --git a/src/fenrir/commands/commands/cursor_position.py b/src/fenrir/commands/commands/cursor_position.py index 9acc912d..99b13fab 100644 --- a/src/fenrir/commands/commands/cursor_position.py +++ b/src/fenrir/commands/commands/cursor_position.py @@ -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 diff --git a/src/fenrir/commands/commands/cursor_read_to_end_of_line.py b/src/fenrir/commands/commands/cursor_read_to_end_of_line.py index ba4c2eb5..a8c69d32 100644 --- a/src/fenrir/commands/commands/cursor_read_to_end_of_line.py +++ b/src/fenrir/commands/commands/cursor_read_to_end_of_line.py @@ -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() diff --git a/src/fenrir/commands/commands/date.py b/src/fenrir/commands/commands/date.py index cbf3a380..39fc28ef 100644 --- a/src/fenrir/commands/commands/date.py +++ b/src/fenrir/commands/commands/date.py @@ -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') diff --git a/src/fenrir/commands/commands/dec_sound_volume.py b/src/fenrir/commands/commands/dec_sound_volume.py index 1cf1a640..c97414ce 100644 --- a/src/fenrir/commands/commands/dec_sound_volume.py +++ b/src/fenrir/commands/commands/dec_sound_volume.py @@ -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 diff --git a/src/fenrir/commands/commands/dec_speech_pitch.py b/src/fenrir/commands/commands/dec_speech_pitch.py index fa818db1..1caf6772 100644 --- a/src/fenrir/commands/commands/dec_speech_pitch.py +++ b/src/fenrir/commands/commands/dec_speech_pitch.py @@ -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 diff --git a/src/fenrir/commands/commands/dec_speech_rate.py b/src/fenrir/commands/commands/dec_speech_rate.py index 244ba9b9..a0248662 100644 --- a/src/fenrir/commands/commands/dec_speech_rate.py +++ b/src/fenrir/commands/commands/dec_speech_rate.py @@ -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 diff --git a/src/fenrir/commands/commands/dec_speech_volume.py b/src/fenrir/commands/commands/dec_speech_volume.py index 6ad5ba02..946803cb 100644 --- a/src/fenrir/commands/commands/dec_speech_volume.py +++ b/src/fenrir/commands/commands/dec_speech_volume.py @@ -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 diff --git a/src/fenrir/commands/commands/exit_review.py b/src/fenrir/commands/commands/exit_review.py index 6e9c72c5..9c0369c4 100644 --- a/src/fenrir/commands/commands/exit_review.py +++ b/src/fenrir/commands/commands/exit_review.py @@ -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 diff --git a/src/fenrir/commands/commands/export_clipboard_to_x.py b/src/fenrir/commands/commands/export_clipboard_to_x.py index 6a543243..4e64824a 100644 --- a/src/fenrir/commands/commands/export_clipboard_to_x.py +++ b/src/fenrir/commands/commands/export_clipboard_to_x.py @@ -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) diff --git a/src/fenrir/commands/commands/first_clipboard.py b/src/fenrir/commands/commands/first_clipboard.py index c6cee34b..152f65ed 100644 --- a/src/fenrir/commands/commands/first_clipboard.py +++ b/src/fenrir/commands/commands/first_clipboard.py @@ -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) diff --git a/src/fenrir/commands/commands/forward_keypress.py b/src/fenrir/commands/commands/forward_keypress.py index 6aed1d65..c3e718fe 100644 --- a/src/fenrir/commands/commands/forward_keypress.py +++ b/src/fenrir/commands/commands/forward_keypress.py @@ -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 diff --git a/src/fenrir/commands/commands/inc_sound_volume.py b/src/fenrir/commands/commands/inc_sound_volume.py index f3c31558..78eee847 100644 --- a/src/fenrir/commands/commands/inc_sound_volume.py +++ b/src/fenrir/commands/commands/inc_sound_volume.py @@ -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 diff --git a/src/fenrir/commands/commands/inc_speech_pitch.py b/src/fenrir/commands/commands/inc_speech_pitch.py index 3d99df97..cb267b66 100644 --- a/src/fenrir/commands/commands/inc_speech_pitch.py +++ b/src/fenrir/commands/commands/inc_speech_pitch.py @@ -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 diff --git a/src/fenrir/commands/commands/inc_speech_rate.py b/src/fenrir/commands/commands/inc_speech_rate.py index 3f20ae6b..4db1763d 100644 --- a/src/fenrir/commands/commands/inc_speech_rate.py +++ b/src/fenrir/commands/commands/inc_speech_rate.py @@ -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 diff --git a/src/fenrir/commands/commands/inc_speech_volume.py b/src/fenrir/commands/commands/inc_speech_volume.py index 1ea41d32..1c6716e6 100644 --- a/src/fenrir/commands/commands/inc_speech_volume.py +++ b/src/fenrir/commands/commands/inc_speech_volume.py @@ -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 diff --git a/src/fenrir/commands/commands/indent_curr_line.py b/src/fenrir/commands/commands/indent_curr_line.py index 4cfe3bdf..948b30cd 100644 --- a/src/fenrir/commands/commands/indent_curr_line.py +++ b/src/fenrir/commands/commands/indent_curr_line.py @@ -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 diff --git a/src/fenrir/commands/commands/last_clipboard.py b/src/fenrir/commands/commands/last_clipboard.py index cf08b299..2d8d2f5c 100644 --- a/src/fenrir/commands/commands/last_clipboard.py +++ b/src/fenrir/commands/commands/last_clipboard.py @@ -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) diff --git a/src/fenrir/commands/commands/last_incoming.py b/src/fenrir/commands/commands/last_incoming.py index 84b2f46a..4c2e2a7c 100644 --- a/src/fenrir/commands/commands/last_incoming.py +++ b/src/fenrir/commands/commands/last_incoming.py @@ -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) diff --git a/src/fenrir/commands/commands/marked_text.py b/src/fenrir/commands/commands/marked_text.py index 7e7bc323..205757b6 100644 --- a/src/fenrir/commands/commands/marked_text.py +++ b/src/fenrir/commands/commands/marked_text.py @@ -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) diff --git a/src/fenrir/commands/commands/next_clipboard.py b/src/fenrir/commands/commands/next_clipboard.py index 457bd9b6..7e3d2070 100644 --- a/src/fenrir/commands/commands/next_clipboard.py +++ b/src/fenrir/commands/commands/next_clipboard.py @@ -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) diff --git a/src/fenrir/commands/commands/paste_clipboard.py b/src/fenrir/commands/commands/paste_clipboard.py index b9879135..02a74cc0 100644 --- a/src/fenrir/commands/commands/paste_clipboard.py +++ b/src/fenrir/commands/commands/paste_clipboard.py @@ -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) diff --git a/src/fenrir/commands/commands/present_first_line.py b/src/fenrir/commands/commands/present_first_line.py index 40954173..385f199f 100644 --- a/src/fenrir/commands/commands/present_first_line.py +++ b/src/fenrir/commands/commands/present_first_line.py @@ -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): diff --git a/src/fenrir/commands/commands/present_last_line.py b/src/fenrir/commands/commands/present_last_line.py index f53af172..ec83a2af 100644 --- a/src/fenrir/commands/commands/present_last_line.py +++ b/src/fenrir/commands/commands/present_last_line.py @@ -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): diff --git a/src/fenrir/commands/commands/prev_clipboard.py b/src/fenrir/commands/commands/prev_clipboard.py index 8659d662..197d34ee 100644 --- a/src/fenrir/commands/commands/prev_clipboard.py +++ b/src/fenrir/commands/commands/prev_clipboard.py @@ -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) diff --git a/src/fenrir/commands/commands/quit_fenrir.py b/src/fenrir/commands/commands/quit_fenrir.py index 0be6540c..f79060aa 100644 --- a/src/fenrir/commands/commands/quit_fenrir.py +++ b/src/fenrir/commands/commands/quit_fenrir.py @@ -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 diff --git a/src/fenrir/commands/commands/remove_marks.py b/src/fenrir/commands/commands/remove_marks.py index a180d853..0c2547e4 100644 --- a/src/fenrir/commands/commands/remove_marks.py +++ b/src/fenrir/commands/commands/remove_marks.py @@ -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 diff --git a/src/fenrir/commands/commands/remove_word_from_spell_check.py b/src/fenrir/commands/commands/remove_word_from_spell_check.py index 3da3e665..0b860bf9 100644 --- a/src/fenrir/commands/commands/remove_word_from_spell_check.py +++ b/src/fenrir/commands/commands/remove_word_from_spell_check.py @@ -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 diff --git a/src/fenrir/commands/commands/review_bottom.py b/src/fenrir/commands/commands/review_bottom.py index b817280e..98925c2d 100644 --- a/src/fenrir/commands/commands/review_bottom.py +++ b/src/fenrir/commands/commands/review_bottom.py @@ -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 diff --git a/src/fenrir/commands/commands/review_curr_char.py b/src/fenrir/commands/commands/review_curr_char.py index 25269564..5c9d08f6 100644 --- a/src/fenrir/commands/commands/review_curr_char.py +++ b/src/fenrir/commands/commands/review_curr_char.py @@ -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() diff --git a/src/fenrir/commands/commands/review_curr_char_phonetic.py b/src/fenrir/commands/commands/review_curr_char_phonetic.py index 7fc5aae8..66947cb4 100644 --- a/src/fenrir/commands/commands/review_curr_char_phonetic.py +++ b/src/fenrir/commands/commands/review_curr_char_phonetic.py @@ -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) diff --git a/src/fenrir/commands/commands/review_curr_line.py b/src/fenrir/commands/commands/review_curr_line.py index 489e0a92..fae007a7 100644 --- a/src/fenrir/commands/commands/review_curr_line.py +++ b/src/fenrir/commands/commands/review_curr_line.py @@ -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): diff --git a/src/fenrir/commands/commands/review_curr_word.py b/src/fenrir/commands/commands/review_curr_word.py index 6a3b273d..c7367861 100644 --- a/src/fenrir/commands/commands/review_curr_word.py +++ b/src/fenrir/commands/commands/review_curr_word.py @@ -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 diff --git a/src/fenrir/commands/commands/review_curr_word_phonetic.py b/src/fenrir/commands/commands/review_curr_word_phonetic.py index d7547e3b..705a8faa 100644 --- a/src/fenrir/commands/commands/review_curr_word_phonetic.py +++ b/src/fenrir/commands/commands/review_curr_word_phonetic.py @@ -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 diff --git a/src/fenrir/commands/commands/review_down.py b/src/fenrir/commands/commands/review_down.py index ba97e348..2d27ce6d 100644 --- a/src/fenrir/commands/commands/review_down.py +++ b/src/fenrir/commands/commands/review_down.py @@ -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 diff --git a/src/fenrir/commands/commands/review_line_begin.py b/src/fenrir/commands/commands/review_line_begin.py index b9629bf2..f0fd6bd6 100644 --- a/src/fenrir/commands/commands/review_line_begin.py +++ b/src/fenrir/commands/commands/review_line_begin.py @@ -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 diff --git a/src/fenrir/commands/commands/review_line_end.py b/src/fenrir/commands/commands/review_line_end.py index 18f44cb1..5cf14833 100644 --- a/src/fenrir/commands/commands/review_line_end.py +++ b/src/fenrir/commands/commands/review_line_end.py @@ -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 diff --git a/src/fenrir/commands/commands/review_line_first_char.py b/src/fenrir/commands/commands/review_line_first_char.py index 75135ed1..79f8d45f 100644 --- a/src/fenrir/commands/commands/review_line_first_char.py +++ b/src/fenrir/commands/commands/review_line_first_char.py @@ -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 diff --git a/src/fenrir/commands/commands/review_line_last_char.py b/src/fenrir/commands/commands/review_line_last_char.py index 309e9d29..bf3f7acb 100644 --- a/src/fenrir/commands/commands/review_line_last_char.py +++ b/src/fenrir/commands/commands/review_line_last_char.py @@ -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 diff --git a/src/fenrir/commands/commands/review_next_char.py b/src/fenrir/commands/commands/review_next_char.py index 0d5d80df..856cac36 100644 --- a/src/fenrir/commands/commands/review_next_char.py +++ b/src/fenrir/commands/commands/review_next_char.py @@ -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 diff --git a/src/fenrir/commands/commands/review_next_char_phonetic.py b/src/fenrir/commands/commands/review_next_char_phonetic.py index 2eb2f2f0..6c989fec 100644 --- a/src/fenrir/commands/commands/review_next_char_phonetic.py +++ b/src/fenrir/commands/commands/review_next_char_phonetic.py @@ -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 diff --git a/src/fenrir/commands/commands/review_next_line.py b/src/fenrir/commands/commands/review_next_line.py index eae50dcf..ca2902ed 100644 --- a/src/fenrir/commands/commands/review_next_line.py +++ b/src/fenrir/commands/commands/review_next_line.py @@ -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 diff --git a/src/fenrir/commands/commands/review_next_word.py b/src/fenrir/commands/commands/review_next_word.py index bc5503cd..4e149c9f 100644 --- a/src/fenrir/commands/commands/review_next_word.py +++ b/src/fenrir/commands/commands/review_next_word.py @@ -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 diff --git a/src/fenrir/commands/commands/review_next_word_phonetic.py b/src/fenrir/commands/commands/review_next_word_phonetic.py index 2462b0f2..aa12e557 100644 --- a/src/fenrir/commands/commands/review_next_word_phonetic.py +++ b/src/fenrir/commands/commands/review_next_word_phonetic.py @@ -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 diff --git a/src/fenrir/commands/commands/review_prev_char.py b/src/fenrir/commands/commands/review_prev_char.py index dabafd1a..aec891d9 100644 --- a/src/fenrir/commands/commands/review_prev_char.py +++ b/src/fenrir/commands/commands/review_prev_char.py @@ -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 diff --git a/src/fenrir/commands/commands/review_prev_char_phonetic.py b/src/fenrir/commands/commands/review_prev_char_phonetic.py index 9e90192e..4c977932 100644 --- a/src/fenrir/commands/commands/review_prev_char_phonetic.py +++ b/src/fenrir/commands/commands/review_prev_char_phonetic.py @@ -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 diff --git a/src/fenrir/commands/commands/review_prev_line.py b/src/fenrir/commands/commands/review_prev_line.py index 7129d7bc..8905cab7 100644 --- a/src/fenrir/commands/commands/review_prev_line.py +++ b/src/fenrir/commands/commands/review_prev_line.py @@ -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 diff --git a/src/fenrir/commands/commands/review_prev_word.py b/src/fenrir/commands/commands/review_prev_word.py index b1426d87..3d2920ff 100644 --- a/src/fenrir/commands/commands/review_prev_word.py +++ b/src/fenrir/commands/commands/review_prev_word.py @@ -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 diff --git a/src/fenrir/commands/commands/review_prev_word_phonetic.py b/src/fenrir/commands/commands/review_prev_word_phonetic.py index 3a0292f8..df22fc3a 100644 --- a/src/fenrir/commands/commands/review_prev_word_phonetic.py +++ b/src/fenrir/commands/commands/review_prev_word_phonetic.py @@ -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 diff --git a/src/fenrir/commands/commands/review_top.py b/src/fenrir/commands/commands/review_top.py index 940410ba..9831e797 100644 --- a/src/fenrir/commands/commands/review_top.py +++ b/src/fenrir/commands/commands/review_top.py @@ -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 diff --git a/src/fenrir/commands/commands/review_up.py b/src/fenrir/commands/commands/review_up.py index 063c8135..b92c0b37 100644 --- a/src/fenrir/commands/commands/review_up.py +++ b/src/fenrir/commands/commands/review_up.py @@ -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 diff --git a/src/fenrir/commands/commands/set_bookmark_1.py b/src/fenrir/commands/commands/set_bookmark_1.py index a5582b5c..6a59ec79 100644 --- a/src/fenrir/commands/commands/set_bookmark_1.py +++ b/src/fenrir/commands/commands/set_bookmark_1.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_10.py b/src/fenrir/commands/commands/set_bookmark_10.py index 1e51729a..4a565c2f 100644 --- a/src/fenrir/commands/commands/set_bookmark_10.py +++ b/src/fenrir/commands/commands/set_bookmark_10.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_2.py b/src/fenrir/commands/commands/set_bookmark_2.py index 8087700e..26d02637 100644 --- a/src/fenrir/commands/commands/set_bookmark_2.py +++ b/src/fenrir/commands/commands/set_bookmark_2.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_3.py b/src/fenrir/commands/commands/set_bookmark_3.py index ee00d310..8645ee3c 100644 --- a/src/fenrir/commands/commands/set_bookmark_3.py +++ b/src/fenrir/commands/commands/set_bookmark_3.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_4.py b/src/fenrir/commands/commands/set_bookmark_4.py index b983b418..b098a50d 100644 --- a/src/fenrir/commands/commands/set_bookmark_4.py +++ b/src/fenrir/commands/commands/set_bookmark_4.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_5.py b/src/fenrir/commands/commands/set_bookmark_5.py index 10dbb868..6c082f91 100644 --- a/src/fenrir/commands/commands/set_bookmark_5.py +++ b/src/fenrir/commands/commands/set_bookmark_5.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_6.py b/src/fenrir/commands/commands/set_bookmark_6.py index 43979791..a309d089 100644 --- a/src/fenrir/commands/commands/set_bookmark_6.py +++ b/src/fenrir/commands/commands/set_bookmark_6.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_7.py b/src/fenrir/commands/commands/set_bookmark_7.py index 6fbbcbbc..4803487f 100644 --- a/src/fenrir/commands/commands/set_bookmark_7.py +++ b/src/fenrir/commands/commands/set_bookmark_7.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_8.py b/src/fenrir/commands/commands/set_bookmark_8.py index dd87c7f4..362f61c9 100644 --- a/src/fenrir/commands/commands/set_bookmark_8.py +++ b/src/fenrir/commands/commands/set_bookmark_8.py @@ -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): diff --git a/src/fenrir/commands/commands/set_bookmark_9.py b/src/fenrir/commands/commands/set_bookmark_9.py index 5136e375..ef53c390 100644 --- a/src/fenrir/commands/commands/set_bookmark_9.py +++ b/src/fenrir/commands/commands/set_bookmark_9.py @@ -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): diff --git a/src/fenrir/commands/commands/set_mark.py b/src/fenrir/commands/commands/set_mark.py index 2c2ddd6b..82e1f90c 100644 --- a/src/fenrir/commands/commands/set_mark.py +++ b/src/fenrir/commands/commands/set_mark.py @@ -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 diff --git a/src/fenrir/commands/commands/set_window_application.py b/src/fenrir/commands/commands/set_window_application.py index 61940b31..9413fcd5 100644 --- a/src/fenrir/commands/commands/set_window_application.py +++ b/src/fenrir/commands/commands/set_window_application.py @@ -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 diff --git a/src/fenrir/commands/commands/shut_up.py b/src/fenrir/commands/commands/shut_up.py index f9060aee..aad7226b 100644 --- a/src/fenrir/commands/commands/shut_up.py +++ b/src/fenrir/commands/commands/shut_up.py @@ -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 diff --git a/src/fenrir/commands/commands/spell_check.py b/src/fenrir/commands/commands/spell_check.py index 2497c856..f6410569 100644 --- a/src/fenrir/commands/commands/spell_check.py +++ b/src/fenrir/commands/commands/spell_check.py @@ -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 diff --git a/src/fenrir/commands/commands/subprocess.py b/src/fenrir/commands/commands/subprocess.py index 411b3de9..3abf4d52 100644 --- a/src/fenrir/commands/commands/subprocess.py +++ b/src/fenrir/commands/commands/subprocess.py @@ -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 , ()) diff --git a/src/fenrir/commands/commands/temp_disable_speech.py b/src/fenrir/commands/commands/temp_disable_speech.py index 9fa577d0..c560e780 100644 --- a/src/fenrir/commands/commands/temp_disable_speech.py +++ b/src/fenrir/commands/commands/temp_disable_speech.py @@ -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() diff --git a/src/fenrir/commands/commands/time.py b/src/fenrir/commands/commands/time.py index f34e9c04..4c6aa9d8 100644 --- a/src/fenrir/commands/commands/time.py +++ b/src/fenrir/commands/commands/time.py @@ -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') diff --git a/src/fenrir/commands/commands/toggle_auto_read.py b/src/fenrir/commands/commands/toggle_auto_read.py index 3090e2b2..d60e9da8 100644 --- a/src/fenrir/commands/commands/toggle_auto_read.py +++ b/src/fenrir/commands/commands/toggle_auto_read.py @@ -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 diff --git a/src/fenrir/commands/commands/toggle_auto_spell_check.py b/src/fenrir/commands/commands/toggle_auto_spell_check.py index 3e6028c3..19d1e06d 100644 --- a/src/fenrir/commands/commands/toggle_auto_spell_check.py +++ b/src/fenrir/commands/commands/toggle_auto_spell_check.py @@ -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 diff --git a/src/fenrir/commands/commands/toggle_auto_time.py b/src/fenrir/commands/commands/toggle_auto_time.py index 98f7c5d3..831cca44 100644 --- a/src/fenrir/commands/commands/toggle_auto_time.py +++ b/src/fenrir/commands/commands/toggle_auto_time.py @@ -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 From 93ca22fdd2ac07e2fe934e0caca52d83fc1ca5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 16:04:55 -0600 Subject: [PATCH 11/24] Translation implemented for hook commands --- src/fenrir/commands/onInput/15000-enable_temp_speech.py | 4 ++-- .../onInput/55000-present_line_if_cursor_change_vertical.py | 2 +- src/fenrir/commands/onInput/56000-highlight_tracking.py | 2 +- src/fenrir/commands/onInput/62000-spell_check.py | 2 +- src/fenrir/commands/onInput/72000-history.py | 2 +- src/fenrir/commands/onInput/80000-capslock.py | 4 ++-- src/fenrir/commands/onInput/80300-scrolllock.py | 4 ++-- src/fenrir/commands/onInput/80500-numlock.py | 4 ++-- .../onScreenChanged/80000-screen_change_announcement.py | 2 +- src/fenrir/commands/onScreenUpdate/76000-time.py | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/fenrir/commands/onInput/15000-enable_temp_speech.py b/src/fenrir/commands/onInput/15000-enable_temp_speech.py index e9d3d85c..a6de077e 100644 --- a/src/fenrir/commands/onInput/15000-enable_temp_speech.py +++ b/src/fenrir/commands/onInput/15000-enable_temp_speech.py @@ -14,7 +14,7 @@ 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']['inputManager'].noKeyPressed(): @@ -25,7 +25,7 @@ class command(): return self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress'])) self.env['commandBuffer']['enableSpeechOnKeypress'] = False - self.env['runtime']['outputManager'].presentText("speech enabled", soundIcon='SpeechOn', interrupt=True) + self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py b/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py index ca1a8de5..5fc81cee 100644 --- a/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py +++ b/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py @@ -35,7 +35,7 @@ class command(): x, y, currLine = line_utils.getCurrentLine(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['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) diff --git a/src/fenrir/commands/onInput/56000-highlight_tracking.py b/src/fenrir/commands/onInput/56000-highlight_tracking.py index 8cc0fb07..8797fe1d 100644 --- a/src/fenrir/commands/onInput/56000-highlight_tracking.py +++ b/src/fenrir/commands/onInput/56000-highlight_tracking.py @@ -13,7 +13,7 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'enables or disables tracking of highlighted' + return _('enables or disables tracking of highlighted') def run(self): if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'): diff --git a/src/fenrir/commands/onInput/62000-spell_check.py b/src/fenrir/commands/onInput/62000-spell_check.py index ee78e8f6..0b912a88 100644 --- a/src/fenrir/commands/onInput/62000-spell_check.py +++ b/src/fenrir/commands/onInput/62000-spell_check.py @@ -129,7 +129,7 @@ class command(): pass if not self.spellChecker.check(currWord): - self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False, flush=False) + self.env['runtime']['outputManager'].presentText(_('misspelled'), soundIcon='mispell', interrupt=False, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/72000-history.py b/src/fenrir/commands/onInput/72000-history.py index 48b16434..99b3849b 100644 --- a/src/fenrir/commands/onInput/72000-history.py +++ b/src/fenrir/commands/onInput/72000-history.py @@ -47,7 +47,7 @@ class command(): announce = currLine 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(announce, interrupt=True, flush=False) self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True diff --git a/src/fenrir/commands/onInput/80000-capslock.py b/src/fenrir/commands/onInput/80000-capslock.py index f5ac8c78..84819bc5 100644 --- a/src/fenrir/commands/onInput/80000-capslock.py +++ b/src/fenrir/commands/onInput/80000-capslock.py @@ -19,9 +19,9 @@ class command(): if self.env['input']['oldCapsLock'] == self.env['input']['newCapsLock']: return if self.env['input']['newCapsLock']: - self.env['runtime']['outputManager'].presentText("Capslock on", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Capslock on"), interrupt=True) else: - self.env['runtime']['outputManager'].presentText("Capslock off", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Capslock off"), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/80300-scrolllock.py b/src/fenrir/commands/onInput/80300-scrolllock.py index 42033684..f159a4a0 100644 --- a/src/fenrir/commands/onInput/80300-scrolllock.py +++ b/src/fenrir/commands/onInput/80300-scrolllock.py @@ -19,9 +19,9 @@ class command(): if self.env['input']['oldScrollLock'] == self.env['input']['newScrollLock']: return if self.env['input']['newScrollLock']: - self.env['runtime']['outputManager'].presentText("Scrolllock on", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Scrolllock on"), interrupt=True) else: - self.env['runtime']['outputManager'].presentText("Scrolllock off", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Scrolllock off"), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/80500-numlock.py b/src/fenrir/commands/onInput/80500-numlock.py index 74283d1f..86ab5341 100644 --- a/src/fenrir/commands/onInput/80500-numlock.py +++ b/src/fenrir/commands/onInput/80500-numlock.py @@ -19,9 +19,9 @@ class command(): if self.env['input']['oldNumLock'] == self.env['input']['newNumLock']: return if self.env['input']['newNumLock']: - self.env['runtime']['outputManager'].presentText("Numlock on", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Numlock on"), interrupt=True) else: - self.env['runtime']['outputManager'].presentText("Numlock off", interrupt=True) + self.env['runtime']['outputManager'].presentText(_("Numlock off"), interrupt=True) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py b/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py index 8da3e405..6fc9a395 100644 --- a/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py +++ b/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py @@ -17,7 +17,7 @@ class command(): return 'No Description found' def run(self): - self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False) + self.env['runtime']['outputManager'].presentText(_("screen {0}").format(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False) self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'], interrupt=False, flush=False) def setCallback(self, callback): diff --git a/src/fenrir/commands/onScreenUpdate/76000-time.py b/src/fenrir/commands/onScreenUpdate/76000-time.py index 4e9306df..3b9b55b6 100644 --- a/src/fenrir/commands/onScreenUpdate/76000-time.py +++ b/src/fenrir/commands/onScreenUpdate/76000-time.py @@ -63,7 +63,7 @@ class command(): if presentTime: # present the time - self.env['runtime']['outputManager'].presentText('Autotime: ' + timeString , soundIcon='', interrupt=False) + self.env['runtime']['outputManager'].presentText(_('Autotime: {0}').format(timeString), soundIcon='', interrupt=False) # and date if changes if presentDate: self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=False) From 86420cd7c511a2bf7a5efa8afc7aa8b5b43130b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 16:16:29 -0600 Subject: [PATCH 12/24] Translation implemented in start/stop messages in fenrir --- src/fenrir/fenrir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index 0bf18f58..49a0f123 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -21,7 +21,7 @@ class fenrir(): raise RuntimeError('Cannot Initialize. Maybe the configfile is not available or not parseable') except RuntimeError: raise - self.environment['runtime']['outputManager'].presentText("Start Fenrir", soundIcon='ScreenReaderOn', interrupt=True) + self.environment['runtime']['outputManager'].presentText(_("Start Fenrir"), soundIcon='ScreenReaderOn', interrupt=True) signal.signal(signal.SIGINT, self.captureSignal) signal.signal(signal.SIGTERM, self.captureSignal) self.wasCommand = False @@ -96,7 +96,7 @@ class fenrir(): self.shutdownRequest() def shutdown(self): - self.environment['runtime']['outputManager'].presentText("Quit Fenrir", soundIcon='ScreenReaderOff', interrupt=True) + self.environment['runtime']['outputManager'].presentText(_("Quit Fenrir"), soundIcon='ScreenReaderOff', interrupt=True) for currManager in self.environment['generalInformation']['managerList']: if self.environment['runtime'][currManager]: self.environment['runtime'][currManager].shutdown() From 97810e489e796d6372a71c8ca0a52171060bf91b Mon Sep 17 00:00:00 2001 From: = Date: Sun, 26 Feb 2017 22:19:55 +0000 Subject: [PATCH 13/24] Updated translation template --- tools/fenrir.pot | 532 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 531 insertions(+), 1 deletion(-) diff --git a/tools/fenrir.pot b/tools/fenrir.pot index 382ba6ec..fa901396 100644 --- a/tools/fenrir.pot +++ b/tools/fenrir.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2017-02-26 20:20+UTC\n" +"POT-Creation-Date: 2017-02-26 22:19+UTC\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,6 +20,9 @@ msgid "adds the current word to the exceptions dictionary" msgstr "" #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:34 +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:34 +#: ../src/fenrir/commands/commands/spell_check.py:29 +#: ../src/fenrir/commands/commands/spell_check.py:36 msgid "pyenchant is not installed" msgstr "" @@ -92,6 +95,24 @@ msgstr "" #: ../src/fenrir/commands/commands/bookmark_9.py:43 #: ../src/fenrir/commands/commands/curr_screen_after_cursor.py:27 #: ../src/fenrir/commands/commands/curr_screen_before_cursor.py:30 +#: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:27 +#: ../src/fenrir/commands/commands/indent_curr_line.py:31 +#: ../src/fenrir/commands/commands/marked_text.py:33 +#: ../src/fenrir/commands/commands/present_first_line.py:25 +#: ../src/fenrir/commands/commands/present_last_line.py:25 +#: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_curr_line.py:27 +#: ../src/fenrir/commands/commands/review_curr_word.py:27 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_line_begin.py:27 +#: ../src/fenrir/commands/commands/review_next_line.py:29 +#: ../src/fenrir/commands/commands/review_next_word.py:29 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_prev_line.py:27 +#: ../src/fenrir/commands/commands/review_prev_word.py:27 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:27 +#: ../src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py:38 +#: ../src/fenrir/commands/onInput/72000-history.py:50 msgid "blank" msgstr "" @@ -170,6 +191,18 @@ msgid "speaks the contents of the currently selected clipboard" msgstr "" #: ../src/fenrir/commands/commands/curr_clipboard.py:21 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:29 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:32 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:35 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:38 +#: ../src/fenrir/commands/commands/first_clipboard.py:21 +#: ../src/fenrir/commands/commands/last_clipboard.py:21 +#: ../src/fenrir/commands/commands/next_clipboard.py:21 +#: ../src/fenrir/commands/commands/paste_clipboard.py:23 +#: ../src/fenrir/commands/commands/paste_clipboard.py:26 +#: ../src/fenrir/commands/commands/paste_clipboard.py:29 +#: ../src/fenrir/commands/commands/paste_clipboard.py:32 +#: ../src/fenrir/commands/commands/prev_clipboard.py:21 msgid "clipboard empty" msgstr "" @@ -197,6 +230,460 @@ msgstr "" msgid "presents the current line number for review cursor in review mode or the text cursor if not. Starts with 1" msgstr "" +#: ../src/fenrir/commands/commands/cursor_position.py:17 +msgid "displays the position of the review cursor" +msgstr "" + +#: ../src/fenrir/commands/commands/cursor_position.py:23 +msgid "line {0}, column {1}" +msgstr "" + +#: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:18 +msgid "read to end of line, use review cursor if you are in review mode, otherwhise use text cursor" +msgstr "" + +#: ../src/fenrir/commands/commands/date.py:18 +msgid "presents the date" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_sound_volume.py:18 +msgid "decrease sound volume" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_sound_volume.py:29 +#: ../src/fenrir/commands/commands/inc_sound_volume.py:29 +msgid "{0} percent sound volume" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_pitch.py:18 +msgid "decreases the pitch of the speech" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_pitch.py:27 +#: ../src/fenrir/commands/commands/inc_speech_pitch.py:27 +msgid "{0} percent speech pitch" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_rate.py:18 +msgid "decreases the rate of the speech" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_rate.py:27 +#: ../src/fenrir/commands/commands/inc_speech_rate.py:27 +msgid "{0} percent speech rate" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_volume.py:18 +msgid "decreases the volume of the speech" +msgstr "" + +#: ../src/fenrir/commands/commands/dec_speech_volume.py:27 +#: ../src/fenrir/commands/commands/inc_speech_volume.py:27 +msgid "{0} percent speech volume" +msgstr "" + +#: ../src/fenrir/commands/commands/exit_review.py:17 +msgid "exits review mode" +msgstr "" + +#: ../src/fenrir/commands/commands/exit_review.py:21 +msgid "Not in review mode" +msgstr "" + +#: ../src/fenrir/commands/commands/exit_review.py:25 +msgid "leave review mode" +msgstr "" + +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:21 +msgid "export the current fenrir clipboard to X clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/first_clipboard.py:17 +msgid "selects the first clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/forward_keypress.py:17 +msgid "sends the following keypress to the terminal" +msgstr "" + +#: ../src/fenrir/commands/commands/forward_keypress.py:21 +msgid "Forward next keypress" +msgstr "" + +#: ../src/fenrir/commands/commands/inc_sound_volume.py:18 +msgid "adjusts the volume for in coming sounds" +msgstr "" + +#: ../src/fenrir/commands/commands/inc_speech_pitch.py:18 +msgid "increases the pitch of the speech" +msgstr "" + +#: ../src/fenrir/commands/commands/inc_speech_rate.py:18 +msgid "increase the speech rate" +msgstr "" + +#: ../src/fenrir/commands/commands/inc_speech_volume.py:18 +msgid "increase the speech volume" +msgstr "" + +#: ../src/fenrir/commands/commands/indent_curr_line.py:18 +msgid "shows the indention level for the current line" +msgstr "" + +#: ../src/fenrir/commands/commands/indent_curr_line.py:33 +msgid "indent {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/last_clipboard.py:17 +msgid "selects the last clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/last_incoming.py:17 +msgid "displays the last received text" +msgstr "" + +#: ../src/fenrir/commands/commands/marked_text.py:18 +msgid "speaks the currently selected text that will be copied to the clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/marked_text.py:23 +msgid "please set begin and endmark" +msgstr "" + +#: ../src/fenrir/commands/commands/next_clipboard.py:17 +msgid "selects the next clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/next_clipboard.py:26 +msgid "First clipboard " +msgstr "" + +#: ../src/fenrir/commands/commands/paste_clipboard.py:18 +msgid "pastes the text from the currently selected clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/present_first_line.py:18 +msgid "present first line" +msgstr "" + +#: ../src/fenrir/commands/commands/present_last_line.py:18 +#: ../src/fenrir/commands/commands/review_curr_line.py:18 +msgid "current line" +msgstr "" + +#: ../src/fenrir/commands/commands/prev_clipboard.py:17 +msgid "selects the previous clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/prev_clipboard.py:26 +msgid "Last clipboard " +msgstr "" + +#: ../src/fenrir/commands/commands/quit_fenrir.py:17 +msgid "exits Fenrir" +msgstr "" + +#: ../src/fenrir/commands/commands/remove_marks.py:17 +msgid "removes marks from selected text" +msgstr "" + +#: ../src/fenrir/commands/commands/remove_marks.py:21 +msgid "Remove marks" +msgstr "" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:27 +msgid "removes the current word from the exceptions dictionary" +msgstr "" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:50 +msgid "{0} is already removed from dict" +msgstr "" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:53 +msgid "{0} removed" +msgstr "" + +#: ../src/fenrir/commands/commands/review_bottom.py:17 +msgid "move review to bottom of screen" +msgstr "" + +#: ../src/fenrir/commands/commands/review_bottom.py:21 +msgid "Bottom" +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_char.py:18 +msgid "presents the current character." +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:18 +msgid "set review and phonetically presents the current character" +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_word.py:18 +msgid "current word." +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_word.py:32 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_down.py:27 +#: ../src/fenrir/commands/commands/review_next_char.py:28 +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:30 +#: ../src/fenrir/commands/commands/review_next_line.py:34 +#: ../src/fenrir/commands/commands/review_next_word.py:34 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_prev_char.py:31 +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:30 +#: ../src/fenrir/commands/commands/review_prev_line.py:32 +#: ../src/fenrir/commands/commands/review_prev_word.py:32 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_up.py:27 +msgid "end of screen" +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_word.py:35 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_next_char.py:31 +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:33 +#: ../src/fenrir/commands/commands/review_next_word.py:37 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_prev_char.py:34 +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:33 +#: ../src/fenrir/commands/commands/review_prev_word.py:35 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_up.py:30 +msgid "line break" +msgstr "" + +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:19 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:19 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:19 +msgid "phonetically spells the current word and set review to it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_down.py:18 +msgid "set review cursor to char below the current char and present it." +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_begin.py:18 +msgid "set review cursor to begin of current line and display the content" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_begin.py:30 +msgid "beginning of line" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_end.py:18 +#: ../src/fenrir/commands/commands/review_line_first_char.py:19 +#: ../src/fenrir/commands/commands/review_line_last_char.py:18 +msgid "set review cursor to end of current line and display the content" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_end.py:27 +msgid "end of line" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_first_char.py:26 +msgid "line is empty" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_first_char.py:33 +msgid "first char in line indent {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_last_char.py:27 +msgid "last char in line" +msgstr "" + +#: ../src/fenrir/commands/commands/review_next_char.py:18 +msgid "moves review to the next character and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:18 +msgid "phonetically presents the next character and set review to it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_next_line.py:18 +msgid "moves review to the next line and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_next_word.py:18 +msgid "moves review to the next word and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_prev_char.py:18 +msgid "moves review to the previous character and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:18 +msgid "phonetically presents the previous character and set review to it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_prev_line.py:18 +msgid "moves review to the previous line and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_prev_word.py:18 +msgid "moves review focus to the previous word and presents it" +msgstr "" + +#: ../src/fenrir/commands/commands/review_top.py:18 +msgid "move review to top of screen" +msgstr "" + +#: ../src/fenrir/commands/commands/review_top.py:22 +msgid "Top" +msgstr "" + +#: ../src/fenrir/commands/commands/review_up.py:18 +msgid "set review cursor to the char in the line below and present it" +msgstr "" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:18 +msgid "set Bookmark {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:22 +msgid "No Mark found" +msgstr "" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:32 +msgid "Bookmark {0} set for application {1}" +msgstr "" + +#: ../src/fenrir/commands/commands/set_mark.py:17 +msgid "places marks to select text to copy to the clipboard" +msgstr "" + +#: ../src/fenrir/commands/commands/set_mark.py:21 +msgid "no review cursor" +msgstr "" + +#: ../src/fenrir/commands/commands/set_mark.py:26 +#: ../src/fenrir/commands/commands/set_mark.py:28 +msgid "set mark" +msgstr "" + +#: ../src/fenrir/commands/commands/set_window_application.py:17 +msgid "set Window Mode, needs 2 marks " +msgstr "" + +#: ../src/fenrir/commands/commands/set_window_application.py:22 +msgid "Window Mode on for application {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/set_window_application.py:25 +msgid "Set window begin and end marks" +msgstr "" + +#: ../src/fenrir/commands/commands/shut_up.py:17 +msgid "interrupts the current presentation" +msgstr "" + +#: ../src/fenrir/commands/commands/spell_check.py:26 +msgid "checks the spelling of the current word" +msgstr "" + +#: ../src/fenrir/commands/commands/spell_check.py:52 +#: ../src/fenrir/commands/onInput/62000-spell_check.py:132 +msgid "misspelled" +msgstr "" + +#: ../src/fenrir/commands/commands/spell_check.py:54 +msgid "correct" +msgstr "" + +#: ../src/fenrir/commands/commands/subprocess.py:21 +msgid "script: {0} fullpath: {1}" +msgstr "" + +#: ../src/fenrir/commands/commands/subprocess.py:24 +msgid "scriptfile does not exist" +msgstr "" + +#: ../src/fenrir/commands/commands/subprocess.py:27 +msgid "scriptfile is not a file" +msgstr "" + +#: ../src/fenrir/commands/commands/subprocess.py:30 +msgid "scriptfile is not executable" +msgstr "" + +#: ../src/fenrir/commands/commands/temp_disable_speech.py:17 +#: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:17 +msgid "disables speech until next keypress" +msgstr "" + +#: ../src/fenrir/commands/commands/temp_disable_speech.py:21 +msgid "speech temporary disabled" +msgstr "" + +#: ../src/fenrir/commands/commands/time.py:18 +msgid "presents the time" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:16 +msgid "enables or disables automatic reading of new text as it appears" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:21 +msgid "autoread enabled" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:23 +msgid "autoread disabled" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:17 +msgid "enables or disables automatic spell checking" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:22 +msgid "auto spellcheck enabled" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:24 +msgid "auto spellcheck disabled" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:16 +msgid "enables or disables automatic reading of time after an period" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:21 +msgid "autotime enabled" +msgstr "" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:23 +msgid "autotime disabled" +msgstr "" + #: ../src/fenrir/commands/commands/toggle_braille.py:17 msgid "enables and disables output in braille" msgstr "" @@ -222,6 +709,7 @@ msgid "emoticons disabled" msgstr "" #: ../src/fenrir/commands/commands/toggle_highlight_tracking.py:16 +#: ../src/fenrir/commands/onInput/56000-highlight_tracking.py:16 msgid "enables or disables tracking of highlighted" msgstr "" @@ -270,6 +758,7 @@ msgid "speech disabled" msgstr "" #: ../src/fenrir/commands/commands/toggle_speech.py:24 +#: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:28 msgid "speech enabled" msgstr "" @@ -281,3 +770,44 @@ msgstr "" msgid "you entered the tutorial mode. In that mode the commands are not executed. but you get a description of what the shortcut does. To leave the tutorial mode, press that shortcut again." msgstr "" +#: ../src/fenrir/commands/onInput/80000-capslock.py:22 +msgid "Capslock on" +msgstr "" + +#: ../src/fenrir/commands/onInput/80000-capslock.py:24 +msgid "Capslock off" +msgstr "" + +#: ../src/fenrir/commands/onInput/80300-scrolllock.py:22 +msgid "Scrolllock on" +msgstr "" + +#: ../src/fenrir/commands/onInput/80300-scrolllock.py:24 +msgid "Scrolllock off" +msgstr "" + +#: ../src/fenrir/commands/onInput/80500-numlock.py:22 +msgid "Numlock on" +msgstr "" + +#: ../src/fenrir/commands/onInput/80500-numlock.py:24 +msgid "Numlock off" +msgstr "" + +#: +#: ../src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py:20 +msgid "screen {0}" +msgstr "" + +#: ../src/fenrir/commands/onScreenUpdate/76000-time.py:66 +msgid "Autotime: {0}" +msgstr "" + +#: ../src/fenrir/fenrir.py:24 +msgid "Start Fenrir" +msgstr "" + +#: ../src/fenrir/fenrir.py:99 +msgid "Quit Fenrir" +msgstr "" + From d43aab85fb9dc4c3ae3491a548e039fd75850448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 17:02:13 -0600 Subject: [PATCH 14/24] Updated spanish translation --- locale/es/LC_MESSAGES/fenrir.mo | Bin 5402 -> 14487 bytes locale/es/LC_MESSAGES/fenrir.po | 542 +++++++++++++++++++++++++++++++- 2 files changed, 540 insertions(+), 2 deletions(-) diff --git a/locale/es/LC_MESSAGES/fenrir.mo b/locale/es/LC_MESSAGES/fenrir.mo index 64e9f58e55dd9b700b1d3629d625c2eaab70a90c..f5255a83b1e175a19ae7f3392118d3c9b2a29a2c 100644 GIT binary patch literal 14487 zcmcJVdypknea8>-P`LQ}?ALQ<(%37SeO56eID`JQw7 zacAzZYf`y2=YIS2dHv4sea@Y~JM)Cc44+R^-bOj$L}OkA|M_IT_*`?UG5nbgd|d?I z2%Zfl;3eRF{{82{lc@g{cnbIuxEg%L*MA7Uk@`=-)4|nL-UPl4JPlk2o)2yTF91W3 zuI4^a{T>C+1fTNw6;SiP0ImYRJz@c z1%%aR%D;aP$P(rtsCkcg{4B_yd4Vsre-~U2{tNhe@FJKZ`qzNk-v&_qZUn`*+rbOL z9vFa+g4)j?g4*AUp!oft;AP-BXE{D^0k!UJ;Kkr9crExb@H+78;3n`?lwl3{F7Q0? zF!&bm8>sn36?V)cW5B$H3JHQMdtI56*%U;BSMH z-(Q3LneX#;75Lwv_;3ZpZU%ec2Jj2uJHUSewchzKNBi0cijLi20;b>r@H?RPa|4?d z?gzE+1HS$s_+IKyfTHK$LD}EMZ#4!{n47@>?0{E;4}j8x=Rxu1FF}?t-}3mcAf%bq z5GVRB;)_>iGsx8DPLGE{*~uqB$@z~!@!@-*_VFX|4dCfNW6UIY9=HXZ0h}&%^lt@4=bhk}!39vRYHeT)A~cgA zf94jxw7=Zr!yuwEp93||^Pu$dC2;R?=o5%ane`aQHQ-KAe&Rt;bbTJY415_p9y}E# zWNC8-2n);vD7ozhwa)uN$>lJp^&SDGkG~849Qaj`Kl6RQw4W1MjH%6qAgnUmK+!+# z>qkJz<&&WJ@+DCE_UEA1J&8#*@40+wo@+trM+j~OKLSc_-vEyXzXz@bUjg3{20{!FMtTi=SooZO`zzw z1(ZHbgW|)ZzWs|H{{qxH-vQqMo_wj(lQTh$4?xL#0@V69fs$VYicd#C@$Yd^die!V z^!@;pUs{DQC8zbEJI1E=YeCib`TAX;`14^<>wX5*y3d2^_adl$z6zouX7v@uz&bMl zA`)|luRj3pp#BHojo^QQlEd|D-Mah04^mIT4}d=eMSq496TSCkAoLde-@OTya;N( z{{W?jZ-sf%Z`#4B>obn*$Vah6s_@WG=Qk;@qik1&&z+PxiuQDf@{5%FC^2P*(*9__yD7I&KI9vuv$s?3 zrfjBsgz|C9y_82N)0BXs&xakD{T?s%cq+J$veVa32R}f0udfTPrz}tgl)EUerxX-@ z`jq=AlH;2x`s}5=hmukfiawI>Z&2P(kxo>fN2>>qyTE+OyAM*Iq#$Pdc_-f!lxr!! zK)IRn1VtbD=_$&&ly^~Z0n0wKypf)rK#|_wM(I$tQKV1uMIWUcpnQySD`g|)F$$(_ zeubjXZ&6O9yorKpng=KuMY?z)<#@`cC`&)@Sqg>+aU9j}ef<2TQDW9gig`&?dQ8w8p=Z`k{=X1bc zrW~Qn`*#&wrH9RfGArX=G#MOOd#~A&We0mah9qvNV761qO$3< z;>$ehW%E&Y`79HyB{Z7pR_IigSP*&qmWNiUp_(^_$UfL(l$KGxe3a`jZo)1C5QE@FPT$~AhK6~Ki4J$7z8GEv-MFKN zFkfKEfk9EaQS(_c=()YKTqo;^#6nt9m=G$1q8}wmXD))_-M9#+6ZCv(LzFh}b2MVO zr+w4zA}b&6V&7CR`l;z0$9;Tswk|H*ca|zg#e#tRF{()iOqwGHcIyFO3x@&Jb0nG?mEgCaa3% zH?AfbOqrwU?89^;>?tfFC!4^Dt$yn^(~rx}Ty1~-DC*2D>5+$J^qL*KI#f37=Wuc_ zqzlX$4AL@AmN+ql(oez#M@S-%#tx%czE^B9L+zCts7UdC$nDwS8p^oibk-|e^Qw}y z!@?T6SBN6W24x@9L6N;`n5rABtb2uNihg&Zo~(tPHj~F`QA&Mz*_lH{Mi0j-dU(?g zI}E#C$5MG|i9aj?ydwciDt7GStpS8Hvh*+w`cWQd-J^`QDh{1krW9n-k|?a8`*NqevbyS@osT!s;TUh?BZ8~6BTIC+k53!&Q8O-THs*xY>~C4# zOfo3u?1;+7yM(Gv6vQ(@81(R#;VhLRIF!d_Nthv|)U-B66Q|y2RcwuR}_vO0$Yt-aTbVO`iEs=CTVM zVbnz`eViV#K&oavL7fzN1sNR*`g6>OGYJ#gYkq5z5zJMR+Q=QDtUS8j)G#kzdj_ju zZVQ!G*UVo&G6_3A_E{Bj0kjT+gvNzRvuZmxeat{XjExK>YRc1$-+nM-^JYn-dNoW_ zy`}LL+MU&;gWfb+skF^A%}H=c=4*vn39afeqcg^MuvdvA1`(HY!NlmrtkV4dF4dLG z8qy7g3)5eSQdmI{!*l3Jr0|6vp^G-Xxx+a!uD9;N9YBC9tRGS@n5#?(^&7W+yO3F zvKM(cmv;GO>+H=Y8*b3B(pW{VZE|#C?A8=Jog?;j@sG#2U)r;2Ff&M!ept>?!!f&- znV7>`H-jokf*@Fw?G`Vg5Zz9q5e?Ddh@@Xxv~gQ;#5+r9%%|PvLQIvS4h?gzV`Nj~ z7h26E`M6>nbw6b8_J12uMVVQDR7<$nYun5+9=V%95>uxy^>-tx8 ze5j8-$kb+T=NQ&gbj$euXkdqR}QVd3SAxShJCDy^UEyp@eoBCBbZ`Zi0OZTXeogVb& zG1~k_2dnltC!}^i>k;fB_7GPW@Dk zX$}#ZZWi4RgKp$ZTpUN;4rvxmP#@K0_T#}+W{>zRymaw3ft}F#8s#W{Pdj4DVB*q^tISO(dZ25S-r|$W2Hhp-b}op*yc2dw zVftj*K|&{c721gxzgXRc21Mhz5H8sG(TTg6ZvB?M3~&|oY{=6rsiWu1=AXD%GZ#$B z=vWbe$u}=P%ej|V?b#fCL&OmqZ-`T~CCTm@MC!e;_*~H$5VvGf92w$yO*g8&ZuHly z1yM8Y#Ol7S8LA!mmJF>VC(;dLUWWaUORK0b+tc|N4-eOhcy@jBs7bkO30zO z8*O*rMOI;Zqn~9MZ1GpHmhJJ~cQHZU4ekAFt5b5X zxWcSD!|#m9Wuk&r;c%SBo!F8fDoHnSz9DKM7U>OFx=tIrbats9m()^Q(kQPqVNnyu zq)d$|-W~QNk zQC;P8!0fy`(_GpDIG-f8TZff29{_2FbT1S z0J;YB6))oss>7XgoN;HY`!?KE;x8`=Z#)-SDu>mvH==HNOfs9z7oVKL54L?G{VQ&T z$2P!oC^S2XS2*JpXB*Xil)(WP^)@%C`|198`68}g-Ko(&F>UdgGztw`s~hePzRrpw`L;=I?1a!C+nkM!(xi zI%lU+0Ic1=1U)o2+Zhy@+3GI2GvjvY)xzu<(vtCj-)?ZtwJWGx2)pbKxbPdTE=^;Z zaX|ws=d-)3A=Z5PH7V}umx!UJq1o)1AzPjckwfF!nxN4iB&eQ^xlCw72*2CmC7E#X zITuP$?;<=PN8O31rPDi7^nXPkDasn3zTMw>XG5`(2-du>p&)RLfTv-zY>t)8qja7dkP;;9=%{BWuCg^b8<%~`&$RZ-RK4RwnURdLu?o9NL}7<;L1t+8RY z9O{rM)>Fwy3%G_z@?gK&8TY&?>#S^ll%3~9T_rpT=?C{6)BLavzbnN?l#5R%`muG` zV4XK;wz%1Qdc?=^bl487HVAbm3(E}|Z>yzk(>o;We9-G#TXP1wP*FN=D&s?E7oW73 z&`xi>XN7^}7(V`0k-A~xZbBI9>}0Xif)v&}WB-B}TwTP6?j{~yTK<%o*~JW&GMD&B zcJ=h)c{``5r3_nFYLZW}_Trtmb{}VX)fLp z!Sb^qyQXu6o^^Xe@HV1b$zgQqylu|fB&C%jI+|U=(?mz^`E9J@1S9()CD)yX{3jA@ zn_6q8pFZ34>yg}#o5X8?J z!92^XgqvSQj%Kvu2qRO{zmWt~3S?>YIb?f=#zg+l>wANlvBxf7QP41Z>f3P=1ea~Q z`*C?;I`Tg|)zMm6wteFcHEb5MZM-!1&VBeB#XP@qsED1dv2zkG z?THY(9zC(;@3<8?0iKl_?zag<0iCa_{ff4)zIE^&Zm%-1?e0*vgaP`m9^$_@0~xEA zb30SCorWBg6S2Ctl6?_oZ`hS#l1A)oG62sIn`MTkBHbQz_O`CrZ{;#vvml~5IOlHK zS;W_ABA(g)Xra4qk91OMy(<*Ee19|CoqUHIEPvm=x89(bM}EHS8ezCc6>^5Gf4EEI zyk4VIyQy(qTv;ezA9Cn6-{c~ampE#75AQBvmdLQ>jnUuQ5qk@4&du!8nt64~-6czK zL1wupuJ&8|*~&!?TY0Uj^$F*w!LgnZaTZmEhm4(0Ed*qENfcGSuN_K#h&x*JZ5D88 zXd@R-`_eU1{$a(MmAhkaQhr!Jv|TRLZF*a0;5e1N?v=H5IhmX6X@dFM200uxaK5c` zn77|!jW}-phJw(q=n1H*tq!PtB3oN{lWJ5Vxd5-97S{0;vad%u2c7a9=cFD~%Y8}}{AnMd@n|Fc(R&db}~ MuByAY%sSWq0ZYdb-~a#s delta 1423 zcmYk*Uu=_A7{~F0R;S|Hl`*%~vAts(ZAXQ!o2wF3HZ;U!2w~R57z}ULs-vTYwz6Q1 zbs;e`LsXui(Hk&|7n;Qw4PJQ1yb|ICfuJ`eNF*vMi2*XM^!saP;z>?F=RJM@JkN8^ zd4J!B{nd*r0!JNfklsQ6dYN-uaO`$|XfFkv>%~c2iH9+UALG4v27~w$cH*ztg$;K& z*Md=8fsbGsw_`8P)~&jE20cui#pm%RrZ97-a}3=qHsN6m;W3Qj7Z}D1OY^_sFxR)1 zu9FS*4{t)$$Y7g5hm++F{` zYdFC5I~c=L*o;?Ef&YW5ROlY(8nF}8eBUJ)=!Punh6>(~2k|5xL!NcdEO+ic+=b&T z(=Ud&_>kSoR2kgw6sg|naqKbAEy_>EI zsFAGm=IBG|Nk>%5qg=}%!+gi-#?9brCwmsBmCqhqJxao*J9gf*2;hEse zr83V}O8!KCvhbpfG#|G^E4SJcEnDnTYr7TOf3$ogX^WA3s60{1+S8>D>e{swc-BH?7Owk*@?tX`)l1QyOwORgULT^b|7VA psj0Rx-`nf+nyD$@%atn&A9?%ziG_LJt~{8r-NW5qeLkFC_AjUY!ZZK? diff --git a/locale/es/LC_MESSAGES/fenrir.po b/locale/es/LC_MESSAGES/fenrir.po index 1b8502d4..bcb5e21f 100644 --- a/locale/es/LC_MESSAGES/fenrir.po +++ b/locale/es/LC_MESSAGES/fenrir.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2017-02-26 20:20+UTC\n" -"PO-Revision-Date: 2017-02-26 14:24-0600\n" +"POT-Creation-Date: 2017-02-26 22:19+UTC\n" +"PO-Revision-Date: 2017-02-26 17:01-0600\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -22,6 +22,9 @@ msgid "adds the current word to the exceptions dictionary" msgstr "añade la palabra actual al diccionario" #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:34 +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:34 +#: ../src/fenrir/commands/commands/spell_check.py:29 +#: ../src/fenrir/commands/commands/spell_check.py:36 msgid "pyenchant is not installed" msgstr "Pyenchant no está instalado" @@ -94,6 +97,24 @@ msgstr "El marcador para la aplicación {0} no se ha establecido" #: ../src/fenrir/commands/commands/bookmark_9.py:43 #: ../src/fenrir/commands/commands/curr_screen_after_cursor.py:27 #: ../src/fenrir/commands/commands/curr_screen_before_cursor.py:30 +#: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:27 +#: ../src/fenrir/commands/commands/indent_curr_line.py:31 +#: ../src/fenrir/commands/commands/marked_text.py:33 +#: ../src/fenrir/commands/commands/present_first_line.py:25 +#: ../src/fenrir/commands/commands/present_last_line.py:25 +#: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_curr_line.py:27 +#: ../src/fenrir/commands/commands/review_curr_word.py:27 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_line_begin.py:27 +#: ../src/fenrir/commands/commands/review_next_line.py:29 +#: ../src/fenrir/commands/commands/review_next_word.py:29 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:27 +#: ../src/fenrir/commands/commands/review_prev_line.py:27 +#: ../src/fenrir/commands/commands/review_prev_word.py:27 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:27 +#: ../src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py:38 +#: ../src/fenrir/commands/onInput/72000-history.py:50 msgid "blank" msgstr "en blanco" @@ -172,6 +193,18 @@ msgid "speaks the contents of the currently selected clipboard" msgstr "Habla el contenido del portapapeles seleccionado" #: ../src/fenrir/commands/commands/curr_clipboard.py:21 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:29 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:32 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:35 +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:38 +#: ../src/fenrir/commands/commands/first_clipboard.py:21 +#: ../src/fenrir/commands/commands/last_clipboard.py:21 +#: ../src/fenrir/commands/commands/next_clipboard.py:21 +#: ../src/fenrir/commands/commands/paste_clipboard.py:23 +#: ../src/fenrir/commands/commands/paste_clipboard.py:26 +#: ../src/fenrir/commands/commands/paste_clipboard.py:29 +#: ../src/fenrir/commands/commands/paste_clipboard.py:32 +#: ../src/fenrir/commands/commands/prev_clipboard.py:21 msgid "clipboard empty" msgstr "Portapapeles vacío" @@ -207,6 +240,469 @@ msgstr "" "Indica el número de línea actual para el cursor de revisión si se está en el " "modo de revisión, o el cursor de texto si no." +#: ../src/fenrir/commands/commands/cursor_position.py:17 +msgid "displays the position of the review cursor" +msgstr "Indica la posición del cursor de revisión" + +#: ../src/fenrir/commands/commands/cursor_position.py:23 +msgid "line {0}, column {1}" +msgstr "Línea {0}, columna {1}" + +#: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:18 +msgid "" +"read to end of line, use review cursor if you are in review mode, otherwhise " +"use text cursor" +msgstr "" +"Leer hasta el fin de línea, utiliza el cursor de revisión cuando el modo de " +"revisión está activo, de lo contrario utiliza el cursor de texto." + +#: ../src/fenrir/commands/commands/date.py:18 +msgid "presents the date" +msgstr "Lee la fecha" + +#: ../src/fenrir/commands/commands/dec_sound_volume.py:18 +msgid "decrease sound volume" +msgstr "Reduce el volumen del sonido" + +#: ../src/fenrir/commands/commands/dec_sound_volume.py:29 +#: ../src/fenrir/commands/commands/inc_sound_volume.py:29 +msgid "{0} percent sound volume" +msgstr "volumen de sonido al {0} porciento" + +#: ../src/fenrir/commands/commands/dec_speech_pitch.py:18 +msgid "decreases the pitch of the speech" +msgstr "Reduce el tono de voz" + +#: ../src/fenrir/commands/commands/dec_speech_pitch.py:27 +#: ../src/fenrir/commands/commands/inc_speech_pitch.py:27 +msgid "{0} percent speech pitch" +msgstr "Tono de voz al {0} porciento" + +#: ../src/fenrir/commands/commands/dec_speech_rate.py:18 +msgid "decreases the rate of the speech" +msgstr "Reduce la velocidad de voz" + +#: ../src/fenrir/commands/commands/dec_speech_rate.py:27 +#: ../src/fenrir/commands/commands/inc_speech_rate.py:27 +msgid "{0} percent speech rate" +msgstr "Velocidad de voz al {0} porciento" + +#: ../src/fenrir/commands/commands/dec_speech_volume.py:18 +msgid "decreases the volume of the speech" +msgstr "Reduce el volumen de voz" + +#: ../src/fenrir/commands/commands/dec_speech_volume.py:27 +#: ../src/fenrir/commands/commands/inc_speech_volume.py:27 +msgid "{0} percent speech volume" +msgstr "Volumen de voz al {0} porciento" + +#: ../src/fenrir/commands/commands/exit_review.py:17 +msgid "exits review mode" +msgstr "Sale del modo de revisión" + +#: ../src/fenrir/commands/commands/exit_review.py:21 +msgid "Not in review mode" +msgstr "No está en modo de revisión" + +#: ../src/fenrir/commands/commands/exit_review.py:25 +msgid "leave review mode" +msgstr "Saliendo del modo de revisión" + +#: ../src/fenrir/commands/commands/export_clipboard_to_x.py:21 +msgid "export the current fenrir clipboard to X clipboard" +msgstr "Exporta el contenido del portapapeles de Fenrir al servidor X" + +#: ../src/fenrir/commands/commands/first_clipboard.py:17 +msgid "selects the first clipboard" +msgstr "Selecciona el primer portapapeles" + +#: ../src/fenrir/commands/commands/forward_keypress.py:17 +msgid "sends the following keypress to the terminal" +msgstr "Envía la siguiente tecla a la terminal" + +#: ../src/fenrir/commands/commands/forward_keypress.py:21 +msgid "Forward next keypress" +msgstr "Enviar la siguiente tecla" + +#: ../src/fenrir/commands/commands/inc_sound_volume.py:18 +msgid "adjusts the volume for in coming sounds" +msgstr "aumenta el volumen del sonido" + +#: ../src/fenrir/commands/commands/inc_speech_pitch.py:18 +msgid "increases the pitch of the speech" +msgstr "Aumenta el tono de voz" + +#: ../src/fenrir/commands/commands/inc_speech_rate.py:18 +msgid "increase the speech rate" +msgstr "Aumenta la velocidad de voz" + +#: ../src/fenrir/commands/commands/inc_speech_volume.py:18 +msgid "increase the speech volume" +msgstr "Aumenta el volumen de voz" + +#: ../src/fenrir/commands/commands/indent_curr_line.py:18 +msgid "shows the indention level for the current line" +msgstr "Lee el nivel de indentación de la línea actual" + +#: ../src/fenrir/commands/commands/indent_curr_line.py:33 +msgid "indent {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/last_clipboard.py:17 +msgid "selects the last clipboard" +msgstr "Selecciona el último portapapeles" + +#: ../src/fenrir/commands/commands/last_incoming.py:17 +msgid "displays the last received text" +msgstr "Lee el último mensaje recibido" + +#: ../src/fenrir/commands/commands/marked_text.py:18 +msgid "speaks the currently selected text that will be copied to the clipboard" +msgstr "Lee el texto que será copiado al portapapeles" + +#: ../src/fenrir/commands/commands/marked_text.py:23 +msgid "please set begin and endmark" +msgstr "Establece una marca de principio y otra para el final de la selección." + +#: ../src/fenrir/commands/commands/next_clipboard.py:17 +msgid "selects the next clipboard" +msgstr "Selecciona el siguiente portapapeles" + +#: ../src/fenrir/commands/commands/next_clipboard.py:26 +msgid "First clipboard " +msgstr "Primer portapapeles" + +#: ../src/fenrir/commands/commands/paste_clipboard.py:18 +msgid "pastes the text from the currently selected clipboard" +msgstr "Pega el texto del portapapeles en uso" + +#: ../src/fenrir/commands/commands/present_first_line.py:18 +msgid "present first line" +msgstr "lee la primera línea" + +#: ../src/fenrir/commands/commands/present_last_line.py:18 +#: ../src/fenrir/commands/commands/review_curr_line.py:18 +msgid "current line" +msgstr "línea actual" + +#: ../src/fenrir/commands/commands/prev_clipboard.py:17 +msgid "selects the previous clipboard" +msgstr "Selecciona el portapapeles anterior" + +#: ../src/fenrir/commands/commands/prev_clipboard.py:26 +msgid "Last clipboard " +msgstr "Último portapapeles" + +#: ../src/fenrir/commands/commands/quit_fenrir.py:17 +msgid "exits Fenrir" +msgstr "Sale de Fenrir" + +#: ../src/fenrir/commands/commands/remove_marks.py:17 +msgid "removes marks from selected text" +msgstr "Quitar marcas del texto seleccionado" + +#: ../src/fenrir/commands/commands/remove_marks.py:21 +msgid "Remove marks" +msgstr "Marcas eliminadas" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:27 +msgid "removes the current word from the exceptions dictionary" +msgstr "Quita la palabra actual del diccionario de excepciones" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:50 +msgid "{0} is already removed from dict" +msgstr "{0} no está en el diccionario" + +#: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:53 +msgid "{0} removed" +msgstr "se ha eliminado {0}" + +#: ../src/fenrir/commands/commands/review_bottom.py:17 +msgid "move review to bottom of screen" +msgstr "Mueve el cursor de revisión al final de la pantalla" + +#: ../src/fenrir/commands/commands/review_bottom.py:21 +msgid "Bottom" +msgstr "Fin" + +#: ../src/fenrir/commands/commands/review_curr_char.py:18 +msgid "presents the current character." +msgstr "Lee el carácter actual" + +#: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:18 +msgid "set review and phonetically presents the current character" +msgstr "Lee fonéticamente el último carácter" + +#: ../src/fenrir/commands/commands/review_curr_word.py:18 +msgid "current word." +msgstr "Palabra actual. " + +#: ../src/fenrir/commands/commands/review_curr_word.py:32 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_down.py:27 +#: ../src/fenrir/commands/commands/review_next_char.py:28 +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:30 +#: ../src/fenrir/commands/commands/review_next_line.py:34 +#: ../src/fenrir/commands/commands/review_next_word.py:34 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_prev_char.py:31 +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:30 +#: ../src/fenrir/commands/commands/review_prev_line.py:32 +#: ../src/fenrir/commands/commands/review_prev_word.py:32 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:36 +#: ../src/fenrir/commands/commands/review_up.py:27 +msgid "end of screen" +msgstr "Fin de pantalla" + +#: ../src/fenrir/commands/commands/review_curr_word.py:35 +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_next_char.py:31 +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:33 +#: ../src/fenrir/commands/commands/review_next_word.py:37 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_prev_char.py:34 +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:33 +#: ../src/fenrir/commands/commands/review_prev_word.py:35 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:39 +#: ../src/fenrir/commands/commands/review_up.py:30 +msgid "line break" +msgstr "Nueva línea" + +#: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:19 +#: ../src/fenrir/commands/commands/review_next_word_phonetic.py:19 +#: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:19 +msgid "phonetically spells the current word and set review to it" +msgstr "Deletrea fonéticamente la palabra actual" + +#: ../src/fenrir/commands/commands/review_down.py:18 +msgid "set review cursor to char below the current char and present it." +msgstr "Mueve el cursor de revisión al carácter después del actual y lo lee" + +#: ../src/fenrir/commands/commands/review_line_begin.py:18 +msgid "set review cursor to begin of current line and display the content" +msgstr "lee la línea actual desde el principio" + +#: ../src/fenrir/commands/commands/review_line_begin.py:30 +msgid "beginning of line" +msgstr "principio de línea" + +#: ../src/fenrir/commands/commands/review_line_end.py:18 +#: ../src/fenrir/commands/commands/review_line_first_char.py:19 +#: ../src/fenrir/commands/commands/review_line_last_char.py:18 +msgid "set review cursor to end of current line and display the content" +msgstr "Lee el final de la línea" + +#: ../src/fenrir/commands/commands/review_line_end.py:27 +msgid "end of line" +msgstr "Fin de línea" + +#: ../src/fenrir/commands/commands/review_line_first_char.py:26 +msgid "line is empty" +msgstr "Línea en blanco" + +#: ../src/fenrir/commands/commands/review_line_first_char.py:33 +msgid "first char in line indent {0}" +msgstr "" + +#: ../src/fenrir/commands/commands/review_line_last_char.py:27 +msgid "last char in line" +msgstr "último carácter de la línea" + +#: ../src/fenrir/commands/commands/review_next_char.py:18 +msgid "moves review to the next character and presents it" +msgstr "Lee el siguiente carácter" + +#: ../src/fenrir/commands/commands/review_next_char_phonetic.py:18 +msgid "phonetically presents the next character and set review to it" +msgstr "Lee fonéticamente el siguiente carácter" + +#: ../src/fenrir/commands/commands/review_next_line.py:18 +msgid "moves review to the next line and presents it" +msgstr "Lee la siguiente línea" + +#: ../src/fenrir/commands/commands/review_next_word.py:18 +msgid "moves review to the next word and presents it" +msgstr "Lee la siguiente palabra" + +#: ../src/fenrir/commands/commands/review_prev_char.py:18 +msgid "moves review to the previous character and presents it" +msgstr "Lee el carácter anterior" + +#: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:18 +msgid "phonetically presents the previous character and set review to it" +msgstr "Lee fonéticamente el carácter anterior" + +#: ../src/fenrir/commands/commands/review_prev_line.py:18 +msgid "moves review to the previous line and presents it" +msgstr "Lee la línea anterior" + +#: ../src/fenrir/commands/commands/review_prev_word.py:18 +msgid "moves review focus to the previous word and presents it" +msgstr "Lee la palabra anterior" + +#: ../src/fenrir/commands/commands/review_top.py:18 +msgid "move review to top of screen" +msgstr "ir al final de la pantalla" + +#: ../src/fenrir/commands/commands/review_top.py:22 +msgid "Top" +msgstr "Fin" + +#: ../src/fenrir/commands/commands/review_up.py:18 +msgid "set review cursor to the char in the line below and present it" +msgstr "Mueve el cursor de revisión al carácter en la siguiente línea y lo lee" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:18 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:18 +msgid "set Bookmark {0}" +msgstr "Añadir marcador {0}" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:22 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:22 +msgid "No Mark found" +msgstr "No se han encontrado marcas" + +#: ../src/fenrir/commands/commands/set_bookmark_1.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_10.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_2.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_3.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_4.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_5.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_6.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_7.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_8.py:32 +#: ../src/fenrir/commands/commands/set_bookmark_9.py:32 +msgid "Bookmark {0} set for application {1}" +msgstr "Añadido marcador {0} para aplicación {1}" + +#: ../src/fenrir/commands/commands/set_mark.py:17 +msgid "places marks to select text to copy to the clipboard" +msgstr "" +"Establece marcas para seleccionar texto que será copiado al portapapeles" + +#: ../src/fenrir/commands/commands/set_mark.py:21 +msgid "no review cursor" +msgstr "No hay cursor de revisión" + +#: ../src/fenrir/commands/commands/set_mark.py:26 +#: ../src/fenrir/commands/commands/set_mark.py:28 +msgid "set mark" +msgstr "Marcar" + +#: ../src/fenrir/commands/commands/set_window_application.py:17 +msgid "set Window Mode, needs 2 marks " +msgstr "se necesitan dos marcas para establecer el modo ventana" + +#: ../src/fenrir/commands/commands/set_window_application.py:22 +msgid "Window Mode on for application {0}" +msgstr "El modo de ventana está activado para la aplicación {0}" + +#: ../src/fenrir/commands/commands/set_window_application.py:25 +msgid "Set window begin and end marks" +msgstr "Establece una marca de principio y otra para el final de la ventana" + +#: ../src/fenrir/commands/commands/shut_up.py:17 +msgid "interrupts the current presentation" +msgstr "Interrumpe el habla y braille." + +#: ../src/fenrir/commands/commands/spell_check.py:26 +msgid "checks the spelling of the current word" +msgstr "Revisa la ortografía para la palabra actual" + +#: ../src/fenrir/commands/commands/spell_check.py:52 +#: ../src/fenrir/commands/onInput/62000-spell_check.py:132 +msgid "misspelled" +msgstr "mal escrito" + +#: ../src/fenrir/commands/commands/spell_check.py:54 +msgid "correct" +msgstr "Correcto" + +#: ../src/fenrir/commands/commands/subprocess.py:21 +msgid "script: {0} fullpath: {1}" +msgstr "Script: {0} Ruta de archivo: {1}" + +#: ../src/fenrir/commands/commands/subprocess.py:24 +msgid "scriptfile does not exist" +msgstr "el archivo del script no existe" + +#: ../src/fenrir/commands/commands/subprocess.py:27 +msgid "scriptfile is not a file" +msgstr "El script no es un archivo" + +#: ../src/fenrir/commands/commands/subprocess.py:30 +msgid "scriptfile is not executable" +msgstr "el script no es ejecutable" + +#: ../src/fenrir/commands/commands/temp_disable_speech.py:17 +#: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:17 +msgid "disables speech until next keypress" +msgstr "Desactiva el habla hasta la siguiente pulsación de teclas" + +#: ../src/fenrir/commands/commands/temp_disable_speech.py:21 +msgid "speech temporary disabled" +msgstr "Habla desactivada temporalmente" + +#: ../src/fenrir/commands/commands/time.py:18 +msgid "presents the time" +msgstr "Lee la hora" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:16 +msgid "enables or disables automatic reading of new text as it appears" +msgstr "" +"Activa o desactiva la lectura de texto cuando hay nuevo contenido en la " +"pantalla" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:21 +msgid "autoread enabled" +msgstr "Lectura automática activada" + +#: ../src/fenrir/commands/commands/toggle_auto_read.py:23 +msgid "autoread disabled" +msgstr "Lectura automática desactivada" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:17 +msgid "enables or disables automatic spell checking" +msgstr "Activa o desactiva la corrección ortográfica automática" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:22 +msgid "auto spellcheck enabled" +msgstr "corrección ortográfica automática activada" + +#: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:24 +msgid "auto spellcheck disabled" +msgstr "corrección ortográfica automática desactivada" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:16 +msgid "enables or disables automatic reading of time after an period" +msgstr "" +"Activa o desactiva la lectura automática de la hora después de un intervalo " +"de tiempo" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:21 +msgid "autotime enabled" +msgstr "lectura automática de hora activada" + +#: ../src/fenrir/commands/commands/toggle_auto_time.py:23 +msgid "autotime disabled" +msgstr "Lectura automática de hora desactivada" + #: ../src/fenrir/commands/commands/toggle_braille.py:17 msgid "enables and disables output in braille" msgstr "Activa y desactiva la salida Braille" @@ -232,6 +728,7 @@ msgid "emoticons disabled" msgstr "Emoticonos desactivados" #: ../src/fenrir/commands/commands/toggle_highlight_tracking.py:16 +#: ../src/fenrir/commands/onInput/56000-highlight_tracking.py:16 msgid "enables or disables tracking of highlighted" msgstr "Activa o desactiva el seguimiento de texto resaltado" @@ -280,6 +777,7 @@ msgid "speech disabled" msgstr "Habla desactivada" #: ../src/fenrir/commands/commands/toggle_speech.py:24 +#: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:28 msgid "speech enabled" msgstr "Habla activada" @@ -300,3 +798,43 @@ msgstr "" "Has entrado al tutorial. En este modo las combinaciones de teclado no se " "ejecutarán pero te darán una descripción de lo que hacen. Para salir del " "tutorial, presiona la misma combinación de teclado de nuevo." + +#: ../src/fenrir/commands/onInput/80000-capslock.py:22 +msgid "Capslock on" +msgstr "Bloqueo mayúsculas activado" + +#: ../src/fenrir/commands/onInput/80000-capslock.py:24 +msgid "Capslock off" +msgstr "Bloqueo mayúsculas desactivado" + +#: ../src/fenrir/commands/onInput/80300-scrolllock.py:22 +msgid "Scrolllock on" +msgstr "Bloqueo de desplazamiento activado" + +#: ../src/fenrir/commands/onInput/80300-scrolllock.py:24 +msgid "Scrolllock off" +msgstr "Bloqueo de desplazamiento desactivado" + +#: ../src/fenrir/commands/onInput/80500-numlock.py:22 +msgid "Numlock on" +msgstr "Bloqueo numérico activado" + +#: ../src/fenrir/commands/onInput/80500-numlock.py:24 +msgid "Numlock off" +msgstr "Bloqueo numérico desactivado" + +#: ../src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py:20 +msgid "screen {0}" +msgstr "pantalla {0}" + +#: ../src/fenrir/commands/onScreenUpdate/76000-time.py:66 +msgid "Autotime: {0}" +msgstr "Hora automática: {0}" + +#: ../src/fenrir/fenrir.py:24 +msgid "Start Fenrir" +msgstr "Iniciando fenrir" + +#: ../src/fenrir/fenrir.py:99 +msgid "Quit Fenrir" +msgstr "Cerrando Fenrir" From 05bfcf40ed59d64e81fa97af4b97e4ffedf8840f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 18:07:47 -0600 Subject: [PATCH 15/24] Added setters for system volume --- .../commands/commands/dec_alsa_volume.py | 39 +++++++++++++++++++ .../commands/commands/inc_alsa_volume.py | 39 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 src/fenrir/commands/commands/dec_alsa_volume.py create mode 100644 src/fenrir/commands/commands/inc_alsa_volume.py diff --git a/src/fenrir/commands/commands/dec_alsa_volume.py b/src/fenrir/commands/commands/dec_alsa_volume.py new file mode 100644 index 00000000..cd2aee07 --- /dev/null +++ b/src/fenrir/commands/commands/dec_alsa_volume.py @@ -0,0 +1,39 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +initialized = False +try: + import alsaaudio + initialized = True +except: + pass + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return _("Decrease system volume") + + def run(self): + if not initialized: + self.env['runtime']['outputManager'].presentText(_('alsaaudio is not installed'), interrupt=True) + return + mixer = alsaaudio.Mixer() + value = mixer.getvolume()[0] + value = value - 5 + if value < 5: + value = 5 + mixer.setvolume(value) + self.env['runtime']['outputManager'].presentText(_("{0} percent system volume").format(value), interrupt=True) + + def setCallback(self, callback): + pass diff --git a/src/fenrir/commands/commands/inc_alsa_volume.py b/src/fenrir/commands/commands/inc_alsa_volume.py new file mode 100644 index 00000000..51f38c79 --- /dev/null +++ b/src/fenrir/commands/commands/inc_alsa_volume.py @@ -0,0 +1,39 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +initialized = False +try: + import alsaaudio + initialized = True +except: + pass + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return _("Increase system volume") + + def run(self): + if not initialized: + self.env['runtime']['outputManager'].presentText(_('alsaaudio is not installed'), interrupt=True) + return + mixer = alsaaudio.Mixer() + value = mixer.getvolume()[0] + value = value + 5 + if value > 100: + value = 100 + mixer.setvolume(value) + self.env['runtime']['outputManager'].presentText(_("{0} percent system volume").format(value), interrupt=True) + + def setCallback(self, callback): + pass From 4765b3a1ec5f68a8ec165bbf49ad31bfc52b8e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 18:08:10 -0600 Subject: [PATCH 16/24] Added keystrokes to system volume setters --- config/keyboard/laptop.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index d73d9258..a1992b05 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -97,6 +97,8 @@ KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume +KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume +KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=clear_clipboard KEY_FENRIR,KEY_CTRL,KEY_SHIFT Date: Sun, 26 Feb 2017 18:21:39 -0600 Subject: [PATCH 17/24] Added keystroke to desktop keyboard commands --- config/keyboard/desktop.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index 91e67f33..37dbf1fd 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -108,5 +108,8 @@ KEY_FENRIR,KEY_X=set_mark KEY_FENRIR,KEY_SHIFT,KEY_X=marked_text KEY_FENRIR,KEY_C=copy_marked_to_clipboard KEY_FENRIR,KEY_V=paste_clipboard +KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume +KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume + # linux specific #=export_clipboard_to_x From d1ea6b512d393dc3fcf6c323810a5037f673dcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sun, 26 Feb 2017 18:39:19 -0600 Subject: [PATCH 18/24] Updated readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3401a0c8..81dc111b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ This software is licensed under the LGPL v3 . - aspell-YourLanguageCode (example aspell-en for us english) 2. unix daemon (also needed for systemd): - python-daemonize +3. Modify system volume: + - pyalsaaudio (needs libasound2's headers). # installation - Archlinux: PKGBUILD in AUR From 0c108b1b493b17f32051dd91fa4f5131c9839b58 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 27 Feb 2017 14:41:21 +0100 Subject: [PATCH 19/24] Update TODO v2.0 --- TODO v2.0 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO v2.0 b/TODO v2.0 index 7d4f8c59..5f09e315 100644 --- a/TODO v2.0 +++ b/TODO v2.0 @@ -6,8 +6,7 @@ General: read highlighted text mode - be more event based (vcsa sets POLLPRI) http://scotdoyle.com/python-epoll-howto.html -- try to make it more asynchronus -- multpible threads +- try to make it more asynchronus with multpible threads - leave review on typing (Easy for contribution) - implement commands From a9357bc8c565f0fd670eb03f85e6c25ef339b595 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 27 Feb 2017 14:45:34 +0100 Subject: [PATCH 20/24] Update TODO v2.0 --- TODO v2.0 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TODO v2.0 b/TODO v2.0 index 5f09e315..2b129d23 100644 --- a/TODO v2.0 +++ b/TODO v2.0 @@ -46,12 +46,12 @@ Driver: https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script Settings: -- configuration should be overwritable with parameter and alternative paths -- write settings -- menue for settings configuration #storm +- configuration should be overwritable with parameter and alternative paths (Easy for contribution) +- write settings (Easy for contribution) +- menue for settings configuration (Easy for contribution) Application Profiles -- reimplement process detection without subprocessing +- reimplement process detection without subprocessing // this is started by chrys - fenrir is not able to detect the current application inside of screen. ps -e -H -o pid,pgrp,ppid,tty,cmd http://stackoverflow.com/questions/24861351/how-to-detect-if-python-script-is-being-run-as-a-background-process/24862213 From 42f2608fec4e61fcbaf64b0de10d9aebb4d0b38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Mon, 27 Feb 2017 09:05:31 -0600 Subject: [PATCH 21/24] Moved alsa volume controls to linux specific in keyboard configs --- config/keyboard/desktop.conf | 4 ++-- config/keyboard/laptop.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index 37dbf1fd..c4af2f4b 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -108,8 +108,8 @@ KEY_FENRIR,KEY_X=set_mark KEY_FENRIR,KEY_SHIFT,KEY_X=marked_text KEY_FENRIR,KEY_C=copy_marked_to_clipboard KEY_FENRIR,KEY_V=paste_clipboard -KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume -KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume # linux specific #=export_clipboard_to_x +KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume +KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index a1992b05..12589b1b 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -97,8 +97,6 @@ KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume -KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume -KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=clear_clipboard KEY_FENRIR,KEY_CTRL,KEY_SHIFT Date: Mon, 27 Feb 2017 17:20:16 +0100 Subject: [PATCH 22/24] Create detectDevices.py --- play zone/detectDevices.py | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 play zone/detectDevices.py diff --git a/play zone/detectDevices.py b/play zone/detectDevices.py new file mode 100644 index 00000000..a99e94cf --- /dev/null +++ b/play zone/detectDevices.py @@ -0,0 +1,39 @@ +#!/bin/python +iDevices = {} +def updateInputDevices(): + deviceFileList = evdev.list_devices() + mode = 'ALL' + iDevicesFiles = [] + for device in iDevices: + iDevicesFiles.append(iDevices[device].fn) + print(len(iDevicesFiles),len(deviceFileList)) + if len(iDevicesFiles) == len(deviceFileList): + return + for deviceFile in deviceFileList: + try: + if deviceFile in iDevicesFiles: + print('skip') + continue + open(deviceFile) + # 3 pos absolute + # 2 pos relative + # 1 Keys + currDevice = evdev.InputDevice(deviceFile) + cap = currDevice.capabilities() + if mode in ['ALL','NOMICE']: + if 1 in cap: + if 116 in cap[1] and len(cap[1]) < 5: + print('power') + continue + if mode == 'ALL': + iDevices[currDevice.fd] = currDevice + print('Device added:' + iDevices[currDevice.fd].name) + elif mode == 'NOMICE': + if not ((2 in cap) or (3 in cap)): + iDevices[currDevice.fd] = currDevice + print('Device added:' + iDevices[currDevice.fd].name) + elif currDevice.name.upper() in mode.split(','): + iDevices[currDevice.fd] = currDevice + print('Device added:' + iDevices[currDevice.fd].name) + except Exception as e: + print("Skip Inputdevice : " + deviceFile +' ' + str(e)) From 6f8c5066a3f32a0ff5fade41ea25e51f7b5d4658 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 27 Feb 2017 17:50:07 +0100 Subject: [PATCH 23/24] Update detectDevices.py --- play zone/detectDevices.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/play zone/detectDevices.py b/play zone/detectDevices.py index a99e94cf..c4ca8ec5 100644 --- a/play zone/detectDevices.py +++ b/play zone/detectDevices.py @@ -1,7 +1,16 @@ #!/bin/python iDevices = {} -def updateInputDevices(): +iDeviceNo = 0 +def updateInputDevices(force = False, init = False): + global iDeviceNo + if init: + iDevices = {} + iDeviceNo = 0 deviceFileList = evdev.list_devices() + if not force: + if len(deviceFileList) == iDeviceNo: + return + iDeviceNo = len(deviceFileList) mode = 'ALL' iDevicesFiles = [] for device in iDevices: From 6f9106d4a88bbf46eec5bdf2bf143af78933ae2c Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 27 Feb 2017 21:03:58 +0100 Subject: [PATCH 24/24] fix syntax problem --- src/fenrir/commands/commands/dec_speech_pitch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fenrir/commands/commands/dec_speech_pitch.py b/src/fenrir/commands/commands/dec_speech_pitch.py index 1caf6772..09e53b7c 100644 --- a/src/fenrir/commands/commands/dec_speech_pitch.py +++ b/src/fenrir/commands/commands/dec_speech_pitch.py @@ -23,8 +23,7 @@ class command(): if value < 0.0: value = 0.0 self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value)) - - self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)) soundIcon='', interrupt=True) + self.env['runtime']['outputManager'].presentText(_('{0} percent speech pitch').format(int(value * 100)), soundIcon='', interrupt=True) def setCallback(self, callback): pass