~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to UpdateManager/UpdateManager.py

  • Committer: Michael Terry
  • Date: 2012-05-15 19:43:43 UTC
  • mto: This revision was merged to the branch mainline in revision 2428.
  • Revision ID: michael.terry@canonical.com-20120515194343-tocvo0awttmggie1
update several strings to match the software updater spec; most notably, rename from Update Manager to Software Updater

Show diffs side-by-side

added added

removed removed

Lines of Context:
563
563
      try:
564
564
          inst_count = self.cache.installCount
565
565
          self.dl_size = self.cache.requiredDownload
566
 
          count_str = ""
567
566
          download_str = ""
568
 
          if inst_count > 0:
569
 
              count_str = ngettext("%(count)s update has been selected.", 
570
 
                                   "%(count)s updates have been selected.",
571
 
                                   inst_count) % { 'count' : inst_count }
572
567
          if self.dl_size != 0:
573
568
              download_str = _("%s will be downloaded.") % (humanize_size(self.dl_size))
574
569
              self.image_downsize.set_sensitive(True)
582
577
              self.unity.set_install_menuitem_visible(True)
583
578
          else:
584
579
              if inst_count > 0:
585
 
                  download_str = ngettext("The update has already been downloaded, but not installed.",
586
 
                  "The updates have already been downloaded, but not installed.", inst_count)
 
580
                  download_str = ngettext("The update has already been downloaded.",
 
581
                  "The updates have already been downloaded.", inst_count)
587
582
                  self.button_install.set_sensitive(True)
588
583
                  self.unity.set_install_menuitem_visible(True)
589
584
              else:
591
586
                  self.button_install.set_sensitive(False)
592
587
                  self.unity.set_install_menuitem_visible(False)
593
588
              self.image_downsize.set_sensitive(False)
594
 
          # TRANSLATORS: this allows to switch the order of the count of
595
 
          #              updates and the download size string (if needed)
596
 
          self.label_downsize.set_text(_("%(count_str)s %(download_str)s") % {
597
 
                  'count_str' : count_str,
598
 
                  'download_str' : download_str})
 
589
          self.label_downsize.set_text(download_str)
599
590
          self.hbox_downsize.show()
600
591
          self.vbox_alerts.show()
601
592
      except SystemError as e:
672
663
         the number of available updates"""
673
664
      self.refresh_updates_count()
674
665
      num_updates = self.cache.installCount
675
 
      text_label_main = _("Software updates correct errors, eliminate security vulnerabilities and provide new features.")
 
666
      text_label_main = ""
676
667
 
677
668
      # setup unity stuff
678
669
      self.unity.set_updates_count(num_updates)
679
670
 
680
671
      if num_updates == 0:
681
 
          text_header= "<big><b>%s</b></big>"  % _("The software on this computer is up to date.")
 
672
          text_header= _("The software on this computer is up to date.")
682
673
          self.label_downsize.set_text("\n")
683
674
          if self.cache.keepCount() == 0:
684
675
              self.notebook_details.set_sensitive(False)
691
682
          if self._get_last_apt_get_update_text() is not None:
692
683
              text_label_main = self._get_last_apt_get_update_text()
693
684
              if self._get_last_apt_get_update_minutes()> self.NO_UPDATE_WARNING_DAYS*24*60:
694
 
                  text_header = "<big><b>%s</b></big>"  % _("Software updates may be available for your computer.")
 
685
                  text_header = _("Software updates may be available for your computer.")
695
686
          # add timer to ensure we update the information when the 
696
687
          # last package count update was performed
697
688
          GObject.timeout_add_seconds(10, self.update_last_updated_text, None)
699
690
          # show different text on first run (UX team suggestion)
700
691
          firstrun = self.settings.get_boolean("first-run")
701
692
          if firstrun:
702
 
              text_header = "<big><b>%s</b></big>" % _("Welcome to Ubuntu")
703
 
              text_label_main = _("These software updates have been issued since this version of Ubuntu was released.")
 
693
              text_header = _("Updated software has been issued since %s was released. Do you want to install it now?") % self.meta.current_dist_description
704
694
              self.settings.set_boolean("first-run", False)
705
695
          else:
706
 
              text_header = "<big><b>%s</b></big>" % _("Software updates are available for this computer.")
 
696
              text_header = _("Updated software is available for this computer. Do you want to install it now?")
707
697
          self.notebook_details.set_sensitive(True)
708
698
          self.treeview_update.set_sensitive(True)
709
699
          self.button_install.grab_default()