[Dextrose] [PATCH 3/5][dextrose2][sugar] Updater show failed updates number
Sascha Silbe
sascha-ml-reply-to-2011-2 at silbe.org
Wed Apr 20 03:08:49 EDT 2011
Excerpts from Martin Abente's message of Tue Apr 19 23:21:26 +0200 2011:
[extensions/cpsection/updater/view.py]
> @@ -175,11 +176,20 @@ class ActivityUpdater(SectionView):
[...]
> - def _finished_updating(self, installed_updates):
> + def _finished_updating(self, installed_updates, failed_updates):
> logging.debug('ActivityUpdater._finished_updating')
> + success_updates = installed_updates - failed_updates
> top_message = ngettext('%s update was installed',
> - '%s updates were installed', installed_updates)
> - top_message = top_message % installed_updates
> + '%s updates were installed', success_updates)
> + top_message = top_message % success_updates
> +
> + if failed_updates > 0:
> + failed_message = ngettext(' and %s update failed',
> + ' and %s updates failed',
> + failed_updates)
> + failed_message = failed_message % failed_updates
> + top_message += failed_message
> +
I'm not sure composing the message this way works for all languages.
CC'ing Chris Leonard for advise.
Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 500 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/dextrose/attachments/20110420/ad79f616/attachment-0001.pgp>
More information about the Dextrose
mailing list