@@ -333,6 +333,7 @@ void main() {
333333 });
334334
335335 testWidgets ('show names on DMs' , (tester) async {
336+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
336337 await setupMessageListPage (tester, messages: [
337338 eg.dmMessage (from: eg.selfUser, to: []),
338339 eg.dmMessage (from: eg.otherUser, to: [eg.selfUser]),
@@ -341,20 +342,25 @@ void main() {
341342 store.addUser (eg.otherUser);
342343 store.addUser (eg.thirdUser);
343344 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 }" )));
347350 });
348351
349352 testWidgets ('show names on DMs: smoothly handle unknown users' , (tester) async {
353+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
350354 await setupMessageListPage (tester, messages: [
351355 eg.dmMessage (from: eg.otherUser, to: [eg.selfUser]),
352356 eg.dmMessage (from: eg.thirdUser, to: [eg.selfUser, eg.otherUser]),
353357 ]);
354358 store.addUser (eg.thirdUser);
355359 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 }" )));
358364 });
359365
360366 testWidgets ('show dates' , (tester) async {
0 commit comments