1
1
import 'package:flutter/material.dart' ;
2
2
3
+ import '../generated/l10n/zulip_localizations.dart' ;
3
4
import '../model/narrow.dart' ;
4
5
import '../model/recent_dm_conversations.dart' ;
5
6
import '../model/unreads.dart' ;
@@ -81,6 +82,7 @@ class RecentDmConversationsItem extends StatelessWidget {
81
82
final store = PerAccountStoreWidget .of (context);
82
83
final selfUser = store.users[store.selfUserId]! ;
83
84
85
+ final zulipLocalizations = ZulipLocalizations .of (context);
84
86
final designVariables = DesignVariables .of (context);
85
87
86
88
final String title;
@@ -94,13 +96,15 @@ class RecentDmConversationsItem extends StatelessWidget {
94
96
// (should we offer a "spam folder" style summary screen of recent
95
97
// 1:1 DM conversations from muted users?)
96
98
final otherUser = store.users[otherUserId];
97
- title = otherUser? .fullName ?? '(unknown user)' ;
99
+ title = otherUser? .fullName ?? zulipLocalizations.unknownUserName ;
98
100
avatar = AvatarImage (userId: otherUserId, size: _avatarSize);
99
101
default :
100
102
// TODO(i18n): List formatting, like you can do in JavaScript:
101
103
// new Intl.ListFormat('ja').format(['Chris', 'Greg', 'Alya'])
102
104
// // 'Chris、Greg、Alya'
103
- title = narrow.otherRecipientIds.map ((id) => store.users[id]? .fullName ?? '(unknown user)' ).join (', ' );
105
+ title = narrow.otherRecipientIds.map (
106
+ (id) => store.users[id]? .fullName ?? zulipLocalizations.unknownUserName
107
+ ).join (', ' );
104
108
avatar = ColoredBox (color: designVariables.groupDmConversationIconBg,
105
109
child: Center (
106
110
child: Icon (color: designVariables.groupDmConversationIcon,
0 commit comments