~mmcg069/software-center/pathbar-scroll-inn

« back to all changes in this revision

Viewing changes to softwarecenter/view/installedpane.py

  • Committer: Michael Vogt
  • Date: 2010-05-18 08:02:18 UTC
  • Revision ID: michael.vogt@ubuntu.com-20100518080218-1lcyvdcj2icd8mjc
* softwarecenter/view/*pane.py:
  - fix crash when ngettext is translated without %s format 
    (LP: #449053)

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
            return ""
157
157
        length = len(model)
158
158
        if len(self.searchentry.get_text()) > 0:
159
 
            return gettext.ngettext("%s matching item",
160
 
                                    "%s matching items",
161
 
                                    length) % length
 
159
            return gettext.ngettext("%(amount)s matching item",
 
160
                                    "%(amount)s matching items",
 
161
                                    length) % { 'amount' : length, }
162
162
        else:
163
 
            return gettext.ngettext("%s item installed",
164
 
                                    "%s items installed",
165
 
                                    length) % length
 
163
            return gettext.ngettext("%(amount)s item installed",
 
164
                                    "%(amount)s items installed",
 
165
                                    length) % { 'amount' : length, }
166
166
                                    
167
167
    def get_current_app(self):
168
168
        """return the current active application object applicable