[gnome-shell/gbsneto/new-lock-screen-part2: 27/33] unlockDialog: Use just the counter to format notifications



commit 754c6857036dbe023646ceeb0d480d0b482a9484
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Nov 29 16:05:12 2019 -0300

    unlockDialog: Use just the counter to format notifications
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872

 js/ui/unlockDialog.js | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index bedc94a48a..55defe3598 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -69,11 +69,8 @@ var NotificationsBox = GObject.registerClass({
         this.visible = this._notificationBox.visible;
     }
 
-    _makeNotificationCountText(count, isChat) {
-        if (isChat)
-            return ngettext('%d new message', '%d new messages', count).format(count);
-        else
-            return ngettext('%d new notification', '%d new notifications', count).format(count);
+    _makeNotificationCountText(count) {
+        return '%d'.format(count);
     }
 
     _makeNotificationSource(source, box) {
@@ -91,7 +88,7 @@ var NotificationsBox = GObject.registerClass({
 
         let count = source.unseenCount;
         let countLabel = new St.Label({
-            text: this._makeNotificationCountText(count, source.isChat),
+            text: this._makeNotificationCountText(count),
             style_class: 'unlock-dialog-notification-count-text',
         });
         textBox.add(countLabel);
@@ -237,7 +234,7 @@ var NotificationsBox = GObject.registerClass({
             this._showSource(source, obj, obj.sourceBox);
         } else {
             let count = source.unseenCount;
-            obj.countLabel.text = this._makeNotificationCountText(count, source.isChat);
+            obj.countLabel.text = this._makeNotificationCountText(count);
         }
 
         obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]