@@ -16,6 +16,8 @@ limitations under the License.
1616
1717'use strict' ;
1818
19+ import { _td } from 'matrix-react-sdk/lib/languageHandler' ;
20+
1921var StandardActions = require ( './StandardActions' ) ;
2022var PushRuleVectorState = require ( './PushRuleVectorState' ) ;
2123
@@ -65,7 +67,7 @@ module.exports = {
6567 // Messages containing user's display name
6668 ".m.rule.contains_display_name" : new VectorPushRuleDefinition ( {
6769 kind : "override" ,
68- description : "Messages containing my display name" , // passed through _t() translation in src/components/views/settings/Notifications.js
70+ description : _td ( "Messages containing my display name" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
6971 vectorStateToActions : { // The actions for each vector state, or null to disable the rule.
7072 on : StandardActions . ACTION_NOTIFY ,
7173 loud : StandardActions . ACTION_HIGHLIGHT_DEFAULT_SOUND ,
@@ -76,7 +78,7 @@ module.exports = {
7678 // Messages containing user's username (localpart/MXID)
7779 ".m.rule.contains_user_name" : new VectorPushRuleDefinition ( {
7880 kind : "override" ,
79- description : "Messages containing my user name" , // passed through _t() translation in src/components/views/settings/Notifications.js
81+ description : _td ( "Messages containing my user name" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
8082 vectorStateToActions : { // The actions for each vector state, or null to disable the rule.
8183 on : StandardActions . ACTION_NOTIFY ,
8284 loud : StandardActions . ACTION_HIGHLIGHT_DEFAULT_SOUND ,
@@ -87,7 +89,7 @@ module.exports = {
8789 // Messages just sent to the user in a 1:1 room
8890 ".m.rule.room_one_to_one" : new VectorPushRuleDefinition ( {
8991 kind : "underride" ,
90- description : "Messages in one-to-one chats" , // passed through _t() translation in src/components/views/settings/Notifications.js
92+ description : _td ( "Messages in one-to-one chats" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
9193 vectorStateToActions : {
9294 on : StandardActions . ACTION_NOTIFY ,
9395 loud : StandardActions . ACTION_NOTIFY_DEFAULT_SOUND ,
@@ -100,7 +102,7 @@ module.exports = {
100102 // By opposition, all other room messages are from group chat rooms.
101103 ".m.rule.message" : new VectorPushRuleDefinition ( {
102104 kind : "underride" ,
103- description : "Messages in group chats" , // passed through _t() translation in src/components/views/settings/Notifications.js
105+ description : _td ( "Messages in group chats" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
104106 vectorStateToActions : {
105107 on : StandardActions . ACTION_NOTIFY ,
106108 loud : StandardActions . ACTION_NOTIFY_DEFAULT_SOUND ,
@@ -111,7 +113,7 @@ module.exports = {
111113 // Invitation for the user
112114 ".m.rule.invite_for_me" : new VectorPushRuleDefinition ( {
113115 kind : "underride" ,
114- description : "When I'm invited to a room" , // passed through _t() translation in src/components/views/settings/Notifications.js
116+ description : _td ( "When I'm invited to a room" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
115117 vectorStateToActions : {
116118 on : StandardActions . ACTION_NOTIFY ,
117119 loud : StandardActions . ACTION_NOTIFY_DEFAULT_SOUND ,
@@ -122,7 +124,7 @@ module.exports = {
122124 // Incoming call
123125 ".m.rule.call" : new VectorPushRuleDefinition ( {
124126 kind : "underride" ,
125- description : "Call invitation" , // passed through _t() translation in src/components/views/settings/Notifications.js
127+ description : _td ( "Call invitation" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
126128 vectorStateToActions : {
127129 on : StandardActions . ACTION_NOTIFY ,
128130 loud : StandardActions . ACTION_NOTIFY_RING_SOUND ,
@@ -133,7 +135,7 @@ module.exports = {
133135 // Notifications from bots
134136 ".m.rule.suppress_notices" : new VectorPushRuleDefinition ( {
135137 kind : "override" ,
136- description : "Messages sent by bot" , // passed through _t() translation in src/components/views/settings/Notifications.js
138+ description : _td ( "Messages sent by bot" ) , // passed through _t() translation in src/components/views/settings/Notifications.js
137139 vectorStateToActions : {
138140 // .m.rule.suppress_notices is a "negative" rule, we have to invert its enabled value for vector UI
139141 on : StandardActions . ACTION_DISABLED ,
0 commit comments