[orca] Tweak to the fix for bug 626272 - Plural forms needed for correct localization



commit 54bc36427b6e0bbfe19a48701f87a446abe4ccc1
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Wed Aug 25 21:16:40 2010 -0400

    Tweak to the fix for bug 626272 - Plural forms needed for correct localization

 src/orca/structural_navigation.py |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index b1f2458..d34d4d0 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1490,36 +1490,36 @@ class StructuralNavigation:
         rowspan = table.getRowExtentAt(row, col)
         colspan = table.getColumnExtentAt(row, col)
         spanString = ""
-        # Translators: this represents the number of rows in a table.
-        #
-        rowString = ngettext("%d row",
-                             "%d rows",
-                             rowspan) % rowspan
-        # Translators: this represents the number of columns in a table.
-        #
-        colString = ngettext("%d column",
-                             "%d columns",
-                             colspan) % colspan
         if (colspan > 1) and (rowspan > 1):
             # Translators: The cell here refers to a cell within a table
             # within a document.  We need to announce when the cell occupies
             # or "spans" more than a single row and/or column.
             #
-            spanString = _("Cell spans %(rows)d and %(columns)d") \
-                         % {"rows" : rowString,
-                            "columns" : colString}
+            spanString = ngettext("Cell spans %d row",
+                                  "Cell spans %d rows",
+                                  rowspan) % rowspan
+
+            # Translators: this represents the number of columns in a table.
+            #
+            spanString += ngettext(" %d column",
+                                   " %d columns",
+                                   colspan) % colspan
         elif (colspan > 1):
             # Translators: The cell here refers to a cell within a table
             # within a document.  We need to announce when the cell occupies
             # or "spans" more than a single row and/or column.
             #
-            spanString = _("Cell spans %d") % colString
+            spanString = ngettext("Cell spans %d column",
+                                  "Cell spans %d columns",
+                                  colspan) % colspan
         elif (rowspan > 1):
             # Translators: The cell here refers to a cell within a table
             # within a document.  We need to announce when the cell occupies
             # or "spans" more than a single row and/or column.
             #
-            spanString = _("Cell spans %d") % rowString
+            spanString = ngettext("Cell spans %d row",
+                                  "Cell spans %d rows",
+                                  rowspan) % rowspan
 
         return spanString
 



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