OSDN Git Service

Reflow code to enable insertion of translator comments.
authorMesar Hameed <mhameed@src.gnome.org>
Fri, 12 Apr 2013 09:40:28 +0000 (11:40 +0200)
committerMesar Hameed <mhameed@src.gnome.org>
Fri, 12 Apr 2013 09:40:28 +0000 (11:40 +0200)
source/cursorManager.py
source/virtualBuffers/__init__.py

index d770cfe..7cc15e8 100644 (file)
@@ -78,7 +78,10 @@ class CursorManager(baseObject.ScriptableObject):
                        speech.speakSelectionChange(oldInfo,self.selection)\r
 \r
        def doFindTextDialog(self):\r
-               d = wx.TextEntryDialog(gui.mainFrame, _("Type the text you wish to find"), _("Find"), defaultValue=self._lastFindText)\r
+               d = wx.TextEntryDialog(gui.mainFrame, \r
+                       _("Type the text you wish to find"),\r
+                       _("Find"),\r
+                       defaultValue=self._lastFindText)\r
                def callback(result):\r
                        if result == wx.ID_OK:\r
                                # Make sure this happens after focus returns to the document.\r
index 770c0ad..7a2eee0 100644 (file)
@@ -860,9 +860,12 @@ class VirtualBuffer(cursorManager.CursorManager, treeInterceptorHandler.TreeInte
 \r
        def script_toggleScreenLayout(self,gesture):\r
                config.conf["virtualBuffers"]["useScreenLayout"]=not config.conf["virtualBuffers"]["useScreenLayout"]\r
-               onOff=_("on") if config.conf["virtualBuffers"]["useScreenLayout"] else _("off")\r
-               # Translators: Presented when use screen layout option is toggled.\r
-               speech.speakMessage(_("use screen layout %s")%onOff)\r
+               if config.conf["virtualBuffers"]["useScreenLayout"]:\r
+                       # Translators: Presented when use screen layout option is toggled.\r
+                       speech.speakMessage(_("use screen layout on"))\r
+               else:\r
+                       # Translators: Presented when use screen layout option is toggled.\r
+                       speech.speakMessage(_("use screen layout off"))\r
        script_toggleScreenLayout.__doc__ = _("Toggles on and off if the screen layout is preserved while rendering the document content")\r
 \r
        def _searchableAttributesForNodeType(self,nodeType):\r
@@ -1506,58 +1509,143 @@ class VirtualBuffer(cursorManager.CursorManager, treeInterceptorHandler.TreeInte
 \r
 # Add quick navigation scripts.\r
 qn = VirtualBuffer.addQuickNav\r
-qn("heading", key="h", nextDoc=_("moves to the next heading"), nextError=_("no next heading"),\r
-       prevDoc=_("moves to the previous heading"), prevError=_("no previous heading"))\r
-qn("heading1", key="1", nextDoc=_("moves to the next heading at level 1"), nextError=_("no next heading at level 1"),\r
-       prevDoc=_("moves to the previous heading at level 1"), prevError=_("no previous heading at level 1"))\r
-qn("heading2", key="2", nextDoc=_("moves to the next heading at level 2"), nextError=_("no next heading at level 2"),\r
-       prevDoc=_("moves to the previous heading at level 2"), prevError=_("no previous heading at level 2"))\r
-qn("heading3", key="3", nextDoc=_("moves to the next heading at level 3"), nextError=_("no next heading at level 3"),\r
-       prevDoc=_("moves to the previous heading at level 3"), prevError=_("no previous heading at level 3"))\r
-qn("heading4", key="4", nextDoc=_("moves to the next heading at level 4"), nextError=_("no next heading at level 4"),\r
-       prevDoc=_("moves to the previous heading at level 4"), prevError=_("no previous heading at level 4"))\r
-qn("heading5", key="5", nextDoc=_("moves to the next heading at level 5"), nextError=_("no next heading at level 5"),\r
-       prevDoc=_("moves to the previous heading at level 5"), prevError=_("no previous heading at level 5"))\r
-qn("heading6", key="6", nextDoc=_("moves to the next heading at level 6"), nextError=_("no next heading at level 6"),\r
-       prevDoc=_("moves to the previous heading at level 6"), prevError=_("no previous heading at level 6"))\r
-qn("table", key="t", nextDoc=_("moves to the next table"), nextError=_("no next table"),\r
-       prevDoc=_("moves to the previous table"), prevError=_("no previous table"), readUnit=textInfos.UNIT_LINE)\r
-qn("link", key="k", nextDoc=_("moves to the next link"), nextError=_("no next link"),\r
-       prevDoc=_("moves to the previous link"), prevError=_("no previous link"))\r
-qn("visitedLink", key="v", nextDoc=_("moves to the next visited link"), nextError=_("no next visited link"),\r
-       prevDoc=_("moves to the previous visited link"), prevError=_("no previous visited link"))\r
-qn("unvisitedLink", key="u", nextDoc=_("moves to the next unvisited link"), nextError=_("no next unvisited link"),\r
-       prevDoc=_("moves to the previous unvisited link"), prevError=_("no previous unvisited link"))\r
-qn("formField", key="f", nextDoc=_("moves to the next form field"), nextError=_("no next form field"),\r
-       prevDoc=_("moves to the previous form field"), prevError=_("no previous form field"), readUnit=textInfos.UNIT_LINE)\r
-qn("list", key="l", nextDoc=_("moves to the next list"), nextError=_("no next list"),\r
-       prevDoc=_("moves to the previous list"), prevError=_("no previous list"), readUnit=textInfos.UNIT_LINE)\r
-qn("listItem", key="i", nextDoc=_("moves to the next list item"), nextError=_("no next list item"),\r
-       prevDoc=_("moves to the previous list item"), prevError=_("no previous list item"))\r
-qn("button", key="b", nextDoc=_("moves to the next button"), nextError=_("no next button"),\r
-       prevDoc=_("moves to the previous button"), prevError=_("no previous button"))\r
-qn("edit", key="e", nextDoc=_("moves to the next edit field"), nextError=_("no next edit field"),\r
-       prevDoc=_("moves to the previous edit field"), prevError=_("no previous edit field"), readUnit=textInfos.UNIT_LINE)\r
-qn("frame", key="m", nextDoc=_("moves to the next frame"), nextError=_("no next frame"),\r
-       prevDoc=_("moves to the previous frame"), prevError=_("no previous frame"), readUnit=textInfos.UNIT_LINE)\r
-qn("separator", key="s", nextDoc=_("moves to the next separator"), nextError=_("no next separator"),\r
-       prevDoc=_("moves to the previous separator"), prevError=_("no previous separator"))\r
-qn("radioButton", key="r", nextDoc=_("moves to the next radio button"), nextError=_("no next radio button"),\r
-       prevDoc=_("moves to the previous radio button"), prevError=_("no previous radio button"))\r
-qn("comboBox", key="c", nextDoc=_("moves to the next combo box"), nextError=_("no next combo box"),\r
-       prevDoc=_("moves to the previous combo box"), prevError=_("no previous combo box"))\r
-qn("checkBox", key="x", nextDoc=_("moves to the next check box"), nextError=_("no next check box"),\r
-       prevDoc=_("moves to the previous check box"), prevError=_("no previous check box"))\r
-qn("graphic", key="g", nextDoc=_("moves to the next graphic"), nextError=_("no next graphic"),\r
-       prevDoc=_("moves to the previous graphic"), prevError=_("no previous graphic"))\r
-qn("blockQuote", key="q", nextDoc=_("moves to the next block quote"), nextError=_("no next block quote"),\r
-       prevDoc=_("moves to the previous block quote"), prevError=_("no previous block quote"))\r
-qn("notLinkBlock", key="n", nextDoc=_("skips forward past a block of links"), nextError=_("no more text after a block of links"),\r
-       prevDoc=_("skips backward past a block of links"), prevError=_("no more text before a block of links"), readUnit=textInfos.UNIT_LINE)\r
-qn("landmark", key="d", nextDoc=_("moves to the next landmark"), nextError=_("no next landmark"),\r
-       prevDoc=_("moves to the previous landmark"), prevError=_("no previous landmark"), readUnit=textInfos.UNIT_LINE)\r
-qn("embeddedObject", key="o", nextDoc=_("moves to the next embedded object"), nextError=_("no next embedded object"),\r
-       prevDoc=_("moves to the previous embedded object"), prevError=_("no previous embedded object"))\r
+qn("heading", key="h",\r
+       nextDoc=_("moves to the next heading"),\r
+       nextError=_("no next heading"),\r
+       prevDoc=_("moves to the previous heading"),\r
+       prevError=_("no previous heading"))\r
+qn("heading1", key="1",\r
+       nextDoc=_("moves to the next heading at level 1"),\r
+       nextError=_("no next heading at level 1"),\r
+       prevDoc=_("moves to the previous heading at level 1"),\r
+       prevError=_("no previous heading at level 1"))\r
+qn("heading2", key="2",\r
+       nextDoc=_("moves to the next heading at level 2"),\r
+       nextError=_("no next heading at level 2"),\r
+       prevDoc=_("moves to the previous heading at level 2"),\r
+       prevError=_("no previous heading at level 2"))\r
+qn("heading3", key="3",\r
+       nextDoc=_("moves to the next heading at level 3"),\r
+       nextError=_("no next heading at level 3"),\r
+       prevDoc=_("moves to the previous heading at level 3"),\r
+       prevError=_("no previous heading at level 3"))\r
+qn("heading4", key="4",\r
+       nextDoc=_("moves to the next heading at level 4"),\r
+       nextError=_("no next heading at level 4"),\r
+       prevDoc=_("moves to the previous heading at level 4"),\r
+       prevError=_("no previous heading at level 4"))\r
+qn("heading5", key="5",\r
+       nextDoc=_("moves to the next heading at level 5"),\r
+       nextError=_("no next heading at level 5"),\r
+       prevDoc=_("moves to the previous heading at level 5"),\r
+       prevError=_("no previous heading at level 5"))\r
+qn("heading6", key="6",\r
+       nextDoc=_("moves to the next heading at level 6"),\r
+       nextError=_("no next heading at level 6"),\r
+       prevDoc=_("moves to the previous heading at level 6"),\r
+       prevError=_("no previous heading at level 6"))\r
+qn("table", key="t",\r
+       nextDoc=_("moves to the next table"),\r
+       nextError=_("no next table"),\r
+       prevDoc=_("moves to the previous table"),\r
+       prevError=_("no previous table"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("link", key="k",\r
+       nextDoc=_("moves to the next link"),\r
+       nextError=_("no next link"),\r
+       prevDoc=_("moves to the previous link"),\r
+       prevError=_("no previous link"))\r
+qn("visitedLink", key="v",\r
+       nextDoc=_("moves to the next visited link"),\r
+       nextError=_("no next visited link"),\r
+       prevDoc=_("moves to the previous visited link"),\r
+       prevError=_("no previous visited link"))\r
+qn("unvisitedLink", key="u",\r
+       nextDoc=_("moves to the next unvisited link"),\r
+       nextError=_("no next unvisited link"),\r
+       prevDoc=_("moves to the previous unvisited link"), \r
+       prevError=_("no previous unvisited link"))\r
+qn("formField", key="f",\r
+       nextDoc=_("moves to the next form field"),\r
+       nextError=_("no next form field"),\r
+       prevDoc=_("moves to the previous form field"),\r
+       prevError=_("no previous form field"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("list", key="l",\r
+       nextDoc=_("moves to the next list"),\r
+       nextError=_("no next list"),\r
+       prevDoc=_("moves to the previous list"),\r
+       prevError=_("no previous list"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("listItem", key="i",\r
+       nextDoc=_("moves to the next list item"),\r
+       nextError=_("no next list item"),\r
+       prevDoc=_("moves to the previous list item"),\r
+       prevError=_("no previous list item"))\r
+qn("button", key="b",\r
+       nextDoc=_("moves to the next button"),\r
+       nextError=_("no next button"),\r
+       prevDoc=_("moves to the previous button"),\r
+       prevError=_("no previous button"))\r
+qn("edit", key="e",\r
+       nextDoc=_("moves to the next edit field"),\r
+       nextError=_("no next edit field"),\r
+       prevDoc=_("moves to the previous edit field"),\r
+       prevError=_("no previous edit field"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("frame", key="m",\r
+       nextDoc=_("moves to the next frame"),\r
+       nextError=_("no next frame"),\r
+       prevDoc=_("moves to the previous frame"),\r
+       prevError=_("no previous frame"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("separator", key="s",\r
+       nextDoc=_("moves to the next separator"),\r
+       nextError=_("no next separator"),\r
+       prevDoc=_("moves to the previous separator"),\r
+       prevError=_("no previous separator"))\r
+qn("radioButton", key="r",\r
+       nextDoc=_("moves to the next radio button"),\r
+       nextError=_("no next radio button"),\r
+       prevDoc=_("moves to the previous radio button"),\r
+       prevError=_("no previous radio button"))\r
+qn("comboBox", key="c",\r
+       nextDoc=_("moves to the next combo box"),\r
+       nextError=_("no next combo box"),\r
+       prevDoc=_("moves to the previous combo box"),\r
+       prevError=_("no previous combo box"))\r
+qn("checkBox", key="x",\r
+       nextDoc=_("moves to the next check box"),\r
+       nextError=_("no next check box"),\r
+       prevDoc=_("moves to the previous check box"),\r
+       prevError=_("no previous check box"))\r
+qn("graphic", key="g",\r
+       nextDoc=_("moves to the next graphic"),\r
+       nextError=_("no next graphic"),\r
+       prevDoc=_("moves to the previous graphic"),\r
+       prevError=_("no previous graphic"))\r
+qn("blockQuote", key="q",\r
+       nextDoc=_("moves to the next block quote"),\r
+       nextError=_("no next block quote"),\r
+       prevDoc=_("moves to the previous block quote"), \r
+       revError=_("no previous block quote"))\r
+qn("notLinkBlock", key="n",\r
+       nextDoc=_("skips forward past a block of links"),\r
+       nextError=_("no more text after a block of links"),\r
+       prevDoc=_("skips backward past a block of links"),\r
+       prevError=_("no more text before a block of links"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("landmark", key="d",\r
+       nextDoc=_("moves to the next landmark"),\r
+       nextError=_("no next landmark"),\r
+       prevDoc=_("moves to the previous landmark"),\r
+       prevError=_("no previous landmark"),\r
+       readUnit=textInfos.UNIT_LINE)\r
+qn("embeddedObject", key="o",\r
+       nextDoc=_("moves to the next embedded object"),\r
+       nextError=_("no next embedded object"),\r
+       prevDoc=_("moves to the previous embedded object"),\r
+       prevError=_("no previous embedded object"))\r
 del qn\r
 \r
 def reportPassThrough(virtualBuffer):\r
@@ -1570,6 +1658,9 @@ def reportPassThrough(virtualBuffer):
                        sound = r"waves\focusMode.wav" if virtualBuffer.passThrough else r"waves\browseMode.wav"\r
                        nvwave.playWaveFile(sound)\r
                else:\r
-                       speech.speakMessage(_("focus mode") if virtualBuffer.passThrough else _("browse mode"))\r
+                       if virtualBuffer.passThrough:\r
+                               speech.speakMessage(_("focus mode"))\r
+                       else \r
+                               speech.speakMessage(_("browse mode"))\r
                reportPassThrough.last = virtualBuffer.passThrough\r
 reportPassThrough.last = False\r