File tree 3 files changed +8
-2
lines changed 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 479
479
"senderFullName": {"type": "String", "example": "Alice"},
480
480
"numOthers": {"type": "int", "example": "4"}
481
481
}
482
+ },
483
+ "notifSelfUser": "You",
484
+ "@notifSelfUser": {
485
+ "description": "Display name supposed to be temporarily displayed after replying to a message in Android notification"
482
486
}
483
487
}
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ class NotificationDisplayManager {
108
108
messagingStyle = MessagingStyle (
109
109
user: Person (
110
110
key: _personKey (data.realmUri, data.userId),
111
- name: 'You' ), // TODO(i18n)
111
+ name: zulipLocalizations.notifSelfUser),
112
112
messages: [],
113
113
isGroupConversation: switch (data.recipient) {
114
114
FcmMessageStreamRecipient () => true ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:flutter_test/flutter_test.dart';
10
10
import 'package:zulip/api/model/model.dart' ;
11
11
import 'package:zulip/api/notifications.dart' ;
12
12
import 'package:zulip/host/android_notifications.dart' ;
13
+ import 'package:zulip/model/localizations.dart' ;
13
14
import 'package:zulip/model/narrow.dart' ;
14
15
import 'package:zulip/model/store.dart' ;
15
16
import 'package:zulip/notifications/display.dart' ;
@@ -75,6 +76,7 @@ MessageFcmMessage messageFcmMessage(
75
76
76
77
void main () {
77
78
TestZulipBinding .ensureInitialized ();
79
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
78
80
79
81
Future <void > init () async {
80
82
addTearDown (testBinding.reset);
@@ -149,7 +151,7 @@ void main() {
149
151
..user.which ((it) => it.isNotNull ()
150
152
..iconBitmap.isNull ()
151
153
..key.equals (expectedSelfUserKey)
152
- ..name.equals ('You' )) // TODO(i18n )
154
+ ..name.equals (zulipLocalizations.notifSelfUser) )
153
155
..isGroupConversation.equals (expectedGroup)
154
156
..conversationTitle.equals (expectedTitle)
155
157
..messages.which ((it) => it
You can’t perform that action at this time.
0 commit comments