[gnome-software/wip/hughsie/notify-firmware-requires-update] fixup! Show a notification when just one firmware is installed
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/notify-firmware-requires-update] fixup! Show a notification when just one firmware is installed
- Date: Mon, 20 May 2019 12:06:51 +0000 (UTC)
commit d3029561e8ad56dfeaca910b9ca6d3d00cbdc5fb
Author: Kalev Lember <klember redhat com>
Date: Mon May 20 14:06:37 2019 +0200
fixup! Show a notification when just one firmware is installed
src/gs-common.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/src/gs-common.c b/src/gs-common.c
index a0723f60..703e8136 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -612,19 +612,21 @@ void
gs_utils_reboot_notify (GsAppList *list)
{
g_autoptr(GNotification) n = NULL;
+ const gchar *title;
+ const gchar *body;
- if (gs_app_list_length (list) == 1) {
- /* TRANSLATORS: we've just live-updated some apps */
- n = g_notification_new (_("An update has been installed"));
- /* TRANSLATORS: the new apps will not be run until we restart */
- g_notification_set_body (n, _("A restart is required for it to take effect."));
- } else {
- /* TRANSLATORS: we've just live-updated some apps */
- n = g_notification_new (_("Updates have been installed"));
- /* TRANSLATORS: the new app will not work until we restart */
- g_notification_set_body (n, _("A restart is required for them to take effect."));
- }
+ /* TRANSLATORS: we've just live-updated some apps */
+ title = ngettext ("An update has been installed",
+ "Updates have been installed",
+ gs_app_list_length (list));
+
+ /* TRANSLATORS: the new apps will not be run until we restart */
+ body = ngettext ("A restart is required for it to take effect.",
+ "A restart is required for them to take effect.",
+ gs_app_list_length (list));
+ n = g_notification_new (title);
+ g_notification_set_body (n, body);
/* TRANSLATORS: button text */
g_notification_add_button (n, _("Not Now"), "app.nop");
/* TRANSLATORS: button text */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]