Skip to content

Commit

Permalink
UbuntuDrivers: Update notification copy (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano authored May 31, 2024
1 parent bf754fc commit bfe9383
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions src/Backends/UbuntuDrivers.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bfe9383

Please sign in to comment.