File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 479479 "senderFullName": {"type": "String", "example": "Alice"},
480480 "numOthers": {"type": "int", "example": "4"}
481481 }
482+ },
483+ "notifSelfUser": "You",
484+ "@notifSelfUser": {
485+ "description": "Display name for the user themself, to show after replying in an Android notification"
482486 }
483487}
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ class NotificationDisplayManager {
108108 messagingStyle = MessagingStyle (
109109 user: Person (
110110 key: _personKey (data.realmUri, data.userId),
111- name: 'You' ), // TODO(i18n)
111+ name: zulipLocalizations.notifSelfUser),
112112 messages: [],
113113 isGroupConversation: switch (data.recipient) {
114114 FcmMessageStreamRecipient () => true ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import 'package:flutter_test/flutter_test.dart';
1111import 'package:zulip/api/model/model.dart' ;
1212import 'package:zulip/api/notifications.dart' ;
1313import 'package:zulip/host/android_notifications.dart' ;
14+ import 'package:zulip/model/localizations.dart' ;
1415import 'package:zulip/model/narrow.dart' ;
1516import 'package:zulip/model/store.dart' ;
1617import 'package:zulip/notifications/display.dart' ;
@@ -76,6 +77,7 @@ MessageFcmMessage messageFcmMessage(
7677
7778void main () {
7879 TestZulipBinding .ensureInitialized ();
80+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
7981
8082 Future <void > init () async {
8183 addTearDown (testBinding.reset);
@@ -150,7 +152,7 @@ void main() {
150152 ..user.which ((it) => it
151153 ..iconBitmap.isNull ()
152154 ..key.equals (expectedSelfUserKey)
153- ..name.equals ('You' )) // TODO(i18n )
155+ ..name.equals (zulipLocalizations.notifSelfUser) )
154156 ..isGroupConversation.equals (expectedIsGroupConversation)
155157 ..conversationTitle.equals (expectedTitle)
156158 ..messages.deepEquals (messageStyleMessagesChecks))
You can’t perform that action at this time.
0 commit comments