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