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 for the user themself, to show after replying in an 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 @@ -11,6 +11,7 @@ import 'package:flutter_test/flutter_test.dart';
11
11
import 'package:zulip/api/model/model.dart' ;
12
12
import 'package:zulip/api/notifications.dart' ;
13
13
import 'package:zulip/host/android_notifications.dart' ;
14
+ import 'package:zulip/model/localizations.dart' ;
14
15
import 'package:zulip/model/narrow.dart' ;
15
16
import 'package:zulip/model/store.dart' ;
16
17
import 'package:zulip/notifications/display.dart' ;
@@ -76,6 +77,7 @@ MessageFcmMessage messageFcmMessage(
76
77
77
78
void main () {
78
79
TestZulipBinding .ensureInitialized ();
80
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
79
81
80
82
Future <void > init () async {
81
83
addTearDown (testBinding.reset);
@@ -150,7 +152,7 @@ void main() {
150
152
..user.which ((it) => it
151
153
..iconBitmap.isNull ()
152
154
..key.equals (expectedSelfUserKey)
153
- ..name.equals ('You' )) // TODO(i18n )
155
+ ..name.equals (zulipLocalizations.notifSelfUser) )
154
156
..isGroupConversation.equals (expectedIsGroupConversation)
155
157
..conversationTitle.equals (expectedTitle)
156
158
..messages.deepEquals (messageStyleMessagesChecks))
You can’t perform that action at this time.
0 commit comments