~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeViewGtk.py

  • Committer: Michael Vogt
  • Date: 2006-10-05 14:36:09 UTC
  • mfrom: (358.1.118 main)
  • mto: This revision was merged to the branch mainline in revision 376.
  • Revision ID: michael.vogt@ubuntu.com-20061005143609-d3d486671aba63d3
* merged from mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        self.parent = parent
98
98
    def mediaChange(self, medium, drive):
99
99
      #print "mediaChange %s %s" % (medium, drive)
100
 
      msg = _("Please insert '%s' into the drive '%s'" % (medium,drive))
 
100
      msg = _("Please insert '%s' into the drive '%s'") % (medium,drive)
101
101
      dialog = gtk.MessageDialog(parent=self.parent.window_main,
102
102
                                 flags=gtk.DIALOG_MODAL,
103
103
                                 type=gtk.MESSAGE_QUESTION,
126
126
            currentItem = self.totalItems
127
127
 
128
128
        if self.currentCPS > 0:
129
 
            self.status.set_text(_("Fetching file %li of %li at %s/s" % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS))))
 
129
            self.status.set_text(_("Fetching file %li of %li at %s/s") % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS)))
130
130
            self.progress.set_text(_("About %s remaining") % FuzzyTimeToStr(self.eta))
131
131
        else:
132
 
            self.status.set_text(_("Fetching file %li of %li" % (currentItem, self.totalItems)))
 
132
            self.status.set_text(_("Fetching file %li of %li") % (currentItem, self.totalItems))
133
133
            self.progress.set_text("  ")
134
134
 
135
135
        while gtk.events_pending():
184
184
        logging.error("got an error from dpkg for pkg: '%s': '%s'" % (pkg, errormsg))
185
185
        #self.expander_terminal.set_expanded(True)
186
186
        self.parent.dialog_error.set_transient_for(self.parent.window_main)
187
 
        summary = _("Could not install '%s'" % pkg)
 
187
        summary = _("Could not install '%s'") % pkg
188
188
        msg = _("The upgrade aborts now. Please report this bug against the 'update-manager' "
189
189
                "package and include the files in /var/log/dist-upgrade/ in the bugreport.")
190
190
        markup="<big><b>%s</b></big>\n\n%s" % (summary, msg)
200
200
        logging.debug("got a conffile-prompt from dpkg for file: '%s'" % current)
201
201
        #self.expander.set_expanded(True)
202
202
        prim = _("Replace the customized configuration file\n'%s'?") % current
203
 
        sec = _("You will loose all customizations, that have been made by "
204
 
                "yourself or by a script, if you replace the file by its "
205
 
                "latest version.")
 
203
        sec = _("You will lose any changes you have made to this "
 
204
                "configuration file if you choose to replace it with "
 
205
                "a newer version.")
206
206
        markup = "<span weight=\"bold\" size=\"larger\">%s </span> \n\n%s" % (prim, sec)
207
207
        self.parent.label_conffile.set_markup(markup)
208
208
        self.parent.dialog_conffile.set_transient_for(self.parent.window_main)
484
484
        if pkgs_remove > 0:
485
485
            # FIXME: make those two seperate lines to make it clear
486
486
            #        that the "%" applies to the result of ngettext
487
 
            msg += gettext.ngettext("%s package is going to be removed.",
488
 
                                    "%s packages are going to be removed.",
 
487
            msg += gettext.ngettext("%d package is going to be removed.",
 
488
                                    "%d packages are going to be removed.",
489
489
                                    pkgs_remove) % pkgs_remove
490
490
            msg += " "
491
491
        if pkgs_inst > 0:
492
 
            msg += gettext.ngettext("%s new package is going to be "
 
492
            msg += gettext.ngettext("%d new package is going to be "
493
493
                                    "installed.",
494
 
                                    "%s new packages are going to be "
 
494
                                    "%d new packages are going to be "
495
495
                                    "installed.",pkgs_inst) % pkgs_inst
496
496
            msg += " "
497
497
        if pkgs_upgrade > 0:
498
 
            msg += gettext.ngettext("%s package is going to be upgraded.",
499
 
                                    "%s packages are going to be upgraded.",
 
498
            msg += gettext.ngettext("%d package is going to be upgraded.",
 
499
                                    "%d packages are going to be upgraded.",
500
500
                                    pkgs_upgrade) % pkgs_upgrade
501
501
            msg +=" "
502
502
        if downloadSize > 0:
503
 
            msg += _("\n\nYou have to download a total of %s. " %\
504
 
                     apt_pkg.SizeToStr(downloadSize))
 
503
            msg += _("\n\nYou have to download a total of %s. ") %\
 
504
                     apt_pkg.SizeToStr(downloadSize)
505
505
            msg += estimatedDownloadTime(downloadSize)
506
506
            msg += "."
507
507
 
532
532
        # fill in the details
533
533
        self.details_list.clear()
534
534
        for rm in self.toRemove:
535
 
            self.details_list.append([_("<b>Remove %s</b>" % rm)])
 
535
            self.details_list.append([_("<b>Remove %s</b>") % rm])
536
536
        for inst in self.toInstall:
537
 
            self.details_list.append([_("Install %s" % inst)])
 
537
            self.details_list.append([_("Install %s") % inst])
538
538
        for up in self.toUpgrade:
539
 
            self.details_list.append([_("Upgrade %s" % up)])
 
539
            self.details_list.append([_("Upgrade %s") % up])
540
540
        self.treeview_details.scroll_to_cell((0,))
541
541
        self.dialog_changes.set_transient_for(self.window_main)
542
542
        self.dialog_changes.realize()