Pull liked notification behaviour in its own class

Pull liked notification behaviour in its own class

diff --git a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
index 78c964b..8e3afc9 100644
--- a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
@@ -123,26 +123,6 @@ export const DefaultNotificationItem =
       const username = formatUsername(data.display_username);
       const description = this.description();
 
-      if (notificationType === notificationTypes.liked && data.count > 1) {
-        const count = data.count - 2;
-        const username2 = formatUsername(data.username2);
-
-        if (count === 0) {
-          return I18n.t("notifications.liked_2", {
-            description,
-            username,
-            username2
-          });
-        } else {
-          return I18n.t("notifications.liked_many", {
-            description,
-            username,
-            username2,
-            count
-          });
-        }
-      }
-
       return I18n.t(scope, { description, username });
     },
 
diff --git a/app/assets/javascripts/discourse/widgets/liked-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/liked-notification-item.js.es6
new file mode 100644
index 0000000..00c61b5
--- /dev/null
+++ b/app/assets/javascripts/discourse/widgets/liked-notification-item.js.es6
@@ -0,0 +1,35 @@
+import { createWidgetFrom } from "discourse/widgets/widget";
+import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
+import { formatUsername } from "discourse/lib/utilities";
+
+createWidgetFrom(DefaultNotificationItem, "liked-notification-item", {
+  text(notificationType, notificationName) {
+    const { attrs } = this;
+    const data = attrs.data;
+
+    const username = formatUsername(data.display_username);
+    const description = this.description();
+
+    if (data.count > 1) {
+      const count = data.count - 2;
+      const username2 = formatUsername(data.username2);
+
+      if (count === 0) {
+        return I18n.t("notifications.liked_2", {
+          description,
+          username,
+          username2
+        });
+      } else {
+        return I18n.t("notifications.liked_many", {
+          description,
+          username,
+          username2,
+          count
+        });
+      }
+    }
+
+    return I18n.t("notifications.liked", { description, username });
+  }
+});

GitHub sha: 396e13aa