Merge lp:~evfool/update-manager/stringfixes into lp:update-manager

Proposed by Robert Roth
Status: Merged
Merged at revision: 2184
Proposed branch: lp:~evfool/update-manager/stringfixes
Merge into: lp:update-manager
Diff against target: 72 lines (+12/-12)
3 files modified
UpdateManager/Core/MyCache.py (+1/-1)
UpdateManager/Core/utils.py (+7/-7)
UpdateManager/UpdateManager.py (+4/-4)
To merge this branch: bzr merge lp:~evfool/update-manager/stringfixes
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+69053@code.launchpad.net

Description of the change

Simple string fixes for the following:
* LP bug #410310, update-manager and apt size inconsistencies fixed by following the Ubuntu Units policy and using base-10 units in update-manager's humanize_size
* LP bug #461780, ambiguous text in update-manager fixed by using "These software updates have been issued since this version of Ubuntu was released" instead of just "These software updates have been issued since Ubuntu was released", notice the "this version of"
* LP bug #537942, distinguish installed from candidate versions in changelog fixed by adding "Installed version: " and "Available version: " prefixes before the version strings
* Renamed _Check All and _Uncheck All context menu items to Select _All (mnemonic is A as S is used as a mnemonic for Settings) and _Deselect All, to avoid confusion for having a Check (for updates button) and Check All (context menu item), which have nothing to do with eachother, as discussed on IRC with mvo

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/Core/MyCache.py'
2--- UpdateManager/Core/MyCache.py 2011-07-15 15:32:30 +0000
3+++ UpdateManager/Core/MyCache.py 2011-07-25 09:51:16 +0000
4@@ -280,7 +280,7 @@
5 def get_changelog(self, name):
6 " get the changelog file from the changelog location "
7 origins = self[name].candidateOrigin
8- self.all_changes[name] = _("Changes for the versions:\n%s\n%s\n\n") % (self[name].installedVersion, self[name].candidateVersion)
9+ self.all_changes[name] = _("Changes for the versions:\nInstalled version: %s\nAvailable version: %s\n\n") % (self[name].installedVersion, self[name].candidateVersion)
10 if not self.CHANGELOG_ORIGIN in [o.origin for o in origins]:
11 # Try non official changelog location
12 changelogs_uri_binary = self._guess_third_party_changelogs_uri_by_binary(name)
13
14=== modified file 'UpdateManager/Core/utils.py'
15--- UpdateManager/Core/utils.py 2011-07-19 07:44:54 +0000
16+++ UpdateManager/Core/utils.py 2011-07-25 09:51:16 +0000
17@@ -401,16 +401,16 @@
18 """
19 if bytes == 0:
20 # TRANSLATORS: download size is 0
21- return _("0 KB")
22- elif bytes < 1024:
23+ return _("0 kB")
24+ elif bytes < 1000:
25 # TRANSLATORS: download size of very small updates
26- return _("1 KB")
27- elif bytes < 1024 * 1024:
28- # TRANSLATORS: download size of small updates, e.g. "250 KB"
29- return locale.format_string(_("%.0f KB"), bytes/1024)
30+ return _("1 kB")
31+ elif bytes < 1000 * 1000:
32+ # TRANSLATORS: download size of small updates, e.g. "250 kB"
33+ return locale.format_string(_("%.0f kB"), bytes/1000)
34 else:
35 # TRANSLATORS: download size of updates, e.g. "2.3 MB"
36- return locale.format_string(_("%.1f MB"), float(bytes) / 1024 / 1024)
37+ return locale.format_string(_("%.1f MB"), bytes / 1000.0 / 1000.0)
38
39 def get_arch():
40 return apt_pkg.Config.find("APT::Architecture")
41
42=== modified file 'UpdateManager/UpdateManager.py'
43--- UpdateManager/UpdateManager.py 2011-07-20 20:42:47 +0000
44+++ UpdateManager/UpdateManager.py 2011-07-25 09:51:16 +0000
45@@ -493,13 +493,13 @@
46 # deleted when it goes out of scope and no menu is visible
47 # (bug #806949)
48 self.menu = menu = Gtk.Menu()
49- item_select_none = Gtk.MenuItem.new_with_mnemonic(_("_Uncheck All"))
50+ item_select_none = Gtk.MenuItem.new_with_mnemonic(_("_Deselect All"))
51 item_select_none.connect("activate", self.select_none_updgrades)
52 menu.append(item_select_none)
53 num_updates = self.cache.installCount
54 if num_updates == 0:
55 item_select_none.set_property("sensitive", False)
56- item_select_all = Gtk.MenuItem.new_with_mnemonic(_("_Check All"))
57+ item_select_all = Gtk.MenuItem.new_with_mnemonic(_("Select _All"))
58 item_select_all.connect("activate", self.select_all_updgrades)
59 menu.append(item_select_all)
60 menu.show_all()
61@@ -675,9 +675,9 @@
62 if firstrun:
63 text_header = "<big><b>%s</b></big>" % _("Welcome to Ubuntu")
64 if is_unity_running():
65- text_label_main = _("These software updates have been issued since Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from Applications later.")
66+ text_label_main = _("These software updates have been issued since this version of Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from Applications later.")
67 else:
68- text_label_main = _("These software updates have been issued since Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from the Administration Menu later.")
69+ text_label_main = _("These software updates have been issued since this version of Ubuntu was released. If you don't want to install them now, choose \"Update Manager\" from the Administration Menu later.")
70 self.settings.set_boolean("first-run", False)
71 else:
72 text_header = "<big><b>%s</b></big>" % _("Software updates are available for this computer")

Subscribers

People subscribed via source and target branches

to status/vote changes: