From 319e6505ee1363e129bf27c5893f91ba5364d433 Mon Sep 17 00:00:00 2001 From: alaa smadi Date: Mon, 9 Dec 2024 01:14:45 +0300 Subject: [PATCH] fix(widget): enhance notifications enhance notifications default string value --- resources/languages.json | 32 ++++++++++---------- widget/controllers/widget.home.controller.js | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/resources/languages.json b/resources/languages.json index 974cd8a..79d8750 100644 --- a/resources/languages.json +++ b/resources/languages.json @@ -254,45 +254,45 @@ }, "newItemBody": { "title": "New Item Created Message", - "defaultValue": "A ${context.plugin.title} has been created", + "defaultValue": "A ${context.plugin.itemTitle} has been created", "inputType": "text", "toolTip": "", "maxLength": 150, - "placeholder": "A ${context.plugin.title} has been created" + "placeholder": "A ${context.plugin.itemTitle} has been created" }, "backlogItemTitle": { - "title": "Task in Backlog Title", - "defaultValue": "Task in Backlog", + "title": "Task In Backlog Title", + "defaultValue": "Task In Backlog", "inputType": "text", "toolTip": "", "maxLength": 50, - "placeholder": "Task in Backlog" + "placeholder": "Task In Backlog" }, "backlogItemBody": { - "title": "Task in Backlog Message", - "defaultValue": "${context.plugin.title} has been marked as in backlog", + "title": "Task In Backlog Message", + "defaultValue": "${context.plugin.itemTitle} has been marked as In Backlog", "inputType": "text", "toolTip": "", "maxLength": 150, - "placeholder": "${context.plugin.title} has been marked as in backlog" + "placeholder": "${context.plugin.itemTitle} has been marked as In Backlog" }, "inProgressItemTitle": { - "title": "Task in Progress Title", - "defaultValue": "Task in Progress", + "title": "Task In Progress Title", + "defaultValue": "Task In Progress", "inputType": "text", "toolTip": "", "maxLength": 50, - "placeholder": "Task in Progress" + "placeholder": "Task In Progress" }, "inProgressItemBody": { - "title": "Task in Progress Message", - "defaultValue": "${context.plugin.title} has been marked as in Progress", + "title": "Task In Progress Message", + "defaultValue": "${context.plugin.itemTitle} has been marked as In Progress", "inputType": "text", "toolTip": "", "maxLength": 150, - "placeholder": "${context.plugin.title} has been marked as in Progress" + "placeholder": "${context.plugin.itemTitle} has been marked as In Progress" }, "completedItemBody": { @@ -305,11 +305,11 @@ }, "completedItemMessageInputPlaceholder": { "title": "Completed Task Message Input", - "defaultValue": "${context.plugin.title} has been marked as completed", + "defaultValue": "${context.plugin.itemTitle} has been marked as completed", "inputType": "text", "toolTip": "", "maxLength": 150, - "placeholder": "${context.plugin.title} has been marked as completed" + "placeholder": "${context.plugin.itemTitle} has been marked as completed" }, "completedItemMessageSendText": { "title": "Completed Task Message Send Text", diff --git a/widget/controllers/widget.home.controller.js b/widget/controllers/widget.home.controller.js index 895427c..d38f9d1 100644 --- a/widget/controllers/widget.home.controller.js +++ b/widget/controllers/widget.home.controller.js @@ -493,7 +493,7 @@ var config = {}; suggestion.statusName = $rootScope.TextStatuses[suggestion.status-1] const voterIds = Object.keys(suggestion.upVotedBy); - votesExpressionOptions.plugin.title = suggestion.title; + votesExpressionOptions.plugin.itemTitle = suggestion.title; Promise.all([ getLanguageValue("notifications.backlogItemTitle"), getLanguageValue("notifications.backlogItemBody"), @@ -975,7 +975,7 @@ var config = {}; suggestion.upvoteByYou = true; $scope.suggestions.unshift(suggestion); if($rootScope.settings){ - votesExpressionOptions.plugin.title = suggestion.title; + votesExpressionOptions.plugin.itemTitle = suggestion.title; Promise.all([getLanguageValue("notifications.newItemTitle"), getLanguageValue("notifications.newItemBody")]) .then(([title, message]) => { if($rootScope.settings.pushNotificationUsersSegment === PUSH_NOTIFICATIONS_SEGMENT.ALL_USERS){