From bfe9383325a6a8ade0c20b7baae7c8059dfb0ef6 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Fri, 31 May 2024 23:46:06 +0900 Subject: [PATCH] UbuntuDrivers: Update notification copy (#147) --- po/POTFILES | 2 ++ src/Backends/UbuntuDrivers.vala | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/po/POTFILES b/po/POTFILES index ea4d58c9..0b8d50e9 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -2,3 +2,5 @@ data/autostart.desktop data/settings-daemon.metainfo.xml.in src/Application.vala src/Backends/SystemUpdate.vala +src/Backends/UbuntuDrivers.vala +src/Utils/PkUtils.vala diff --git a/src/Backends/UbuntuDrivers.vala b/src/Backends/UbuntuDrivers.vala index a94f70db..e2f97d74 100644 --- a/src/Backends/UbuntuDrivers.vala +++ b/src/Backends/UbuntuDrivers.vala @@ -166,9 +166,16 @@ public class SettingsDaemon.Backends.UbuntuDrivers : Object { update_state (AVAILABLE); if (notify) { - var notification = new Notification (_("Drivers available")); + var title = ngettext ("Driver Available", "Drivers Available", available_drivers.length); + var body = ngettext ( + "%u driver is available for your hardware", + "%u drivers are available for your hardware", + available_drivers.length + ); + + var notification = new Notification (title); notification.set_default_action (Application.ACTION_PREFIX + Application.SHOW_UPDATES_ACTION); - notification.set_body (_("For your system are drivers available")); + notification.set_body (body.printf (available_drivers.length)); notification.set_icon (new ThemedIcon ("software-update-available")); GLib.Application.get_default ().send_notification (NOTIFICATION_ID, notification);