orca r4575 - in trunk: . src/orca/scripts/toolkits/Gecko



Author: wwalker
Date: Wed Feb 18 16:22:18 2009
New Revision: 4575
URL: http://svn.gnome.org/viewvc/orca?rev=4575&view=rev

Log:
Fix for Bug 572218 - Order of variables not changeable.


Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/speech_generator.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/speech_generator.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/speech_generator.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/speech_generator.py	Wed Feb 18 16:22:18 2009
@@ -82,25 +82,14 @@
             if obj.getRole() == pyatspi.ROLE_HEADING:
                 level = self._script.getHeadingLevel(obj)
                 if level:
-                    # Translators: the %d is in reference to a heading
+                    # Translators: the %(level)d is in reference to a heading
                     # level in HTML (e.g., For <h3>, the level is 3)
-                    # and the %s is in reference to a previously
-                    # translated rolename for the heading.  If you
-                    # change the order of the %s and %d in the string
-                    # (as needed for Hungarian, for example), Orca will
-                    # detect it and do the right thing.
+                    # and the %(role)s is in reference to a previously
+                    # translated rolename for the heading.
                     #
-                    headingString = _("%s level %d")
-                    if headingString.index("%s") < headingString.index("%d"):
-                        utterances.append(
-                            headingString \
-                            % (rolenames.getSpeechForRoleName(obj, role),
-                               level))
-                    else:
-                        utterances.append(
-                            headingString \
-                            % (level,
-                               rolenames.getSpeechForRoleName(obj, role)))
+                    utterances.append(_("%(role)s level %(level)d") % {
+                        'role': rolenames.getSpeechForRoleName(obj, role),
+                        'level': level})
                 else:
                     utterances.append(rolenames.getSpeechForRoleName(obj, role))
             else:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]