@@ -333,6 +333,7 @@ void main() {
333
333
});
334
334
335
335
testWidgets ('show names on DMs' , (tester) async {
336
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
336
337
await setupMessageListPage (tester, messages: [
337
338
eg.dmMessage (from: eg.selfUser, to: []),
338
339
eg.dmMessage (from: eg.otherUser, to: [eg.selfUser]),
@@ -341,20 +342,25 @@ void main() {
341
342
store.addUser (eg.otherUser);
342
343
store.addUser (eg.thirdUser);
343
344
await tester.pump ();
344
- tester.widget (find.text ("You with yourself" ));
345
- tester.widget (find.text ("You and ${eg .otherUser .fullName }" ));
346
- tester.widget (find.text ("You and ${eg .otherUser .fullName }, ${eg .thirdUser .fullName }" ));
345
+ tester.widget (find.text (zulipLocalizations.messageListGroupYouWithYourself));
346
+ tester.widget (find.text (zulipLocalizations.messageListGroupYouAndOthers (
347
+ eg.otherUser.fullName)));
348
+ tester.widget (find.text (zulipLocalizations.messageListGroupYouAndOthers (
349
+ "${eg .otherUser .fullName }, ${eg .thirdUser .fullName }" )));
347
350
});
348
351
349
352
testWidgets ('show names on DMs: smoothly handle unknown users' , (tester) async {
353
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
350
354
await setupMessageListPage (tester, messages: [
351
355
eg.dmMessage (from: eg.otherUser, to: [eg.selfUser]),
352
356
eg.dmMessage (from: eg.thirdUser, to: [eg.selfUser, eg.otherUser]),
353
357
]);
354
358
store.addUser (eg.thirdUser);
355
359
await tester.pump ();
356
- tester.widget (find.text ("You and (unknown user)" ));
357
- tester.widget (find.text ("You and (unknown user), ${eg .thirdUser .fullName }" ));
360
+ tester.widget (find.text (zulipLocalizations.messageListGroupYouAndOthers (
361
+ zulipLocalizations.unknownUserName)));
362
+ tester.widget (find.text (zulipLocalizations.messageListGroupYouAndOthers (
363
+ "${zulipLocalizations .unknownUserName }, ${eg .thirdUser .fullName }" )));
358
364
});
359
365
360
366
testWidgets ('show dates' , (tester) async {
0 commit comments