Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@
"@composeBoxSendTooltip": {
"description": "Tooltip for send button in compose box."
},
"unknownChannelName": "(unknown channel)",
"unknownChannelName": "Unknown channel",
"@unknownChannelName": {
"description": "Replacement name for channel when it cannot be found in the store."
},
Expand Down Expand Up @@ -661,7 +661,7 @@
"messageId": {"type": "int", "example": "1234"}
}
},
"unknownUserName": "(unknown user)",
"unknownUserName": "unknown user",
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: unknownChannelName is capitalized as "Unknown channel" while unknownUserName is lowercase as "unknown user". For consistency, both should use the same capitalization style. Consider changing this to "Unknown user" to match "Unknown channel".

Suggested change
"unknownUserName": "unknown user",
"unknownUserName": "Unknown user",

Copilot uses AI. Check for mistakes.
"@unknownUserName": {
"description": "Name placeholder to use for a user when we don't know their name."
},
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ abstract class ZulipLocalizations {
/// Replacement name for channel when it cannot be found in the store.
///
/// In en, this message translates to:
/// **'(unknown channel)'**
/// **'Unknown channel'**
String get unknownChannelName;

/// Hint text for topic input widget in compose box.
Expand Down Expand Up @@ -1038,7 +1038,7 @@ abstract class ZulipLocalizations {
/// Name placeholder to use for a user when we don't know their name.
///
/// In en, this message translates to:
/// **'(unknown user)'**
/// **'unknown user'**
String get unknownUserName;

/// Message list page title for a DM group that only includes yourself.
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_el.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsEl extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsEl extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_es.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsEs extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsEs extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -566,7 +566,7 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_he.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsHe extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsHe extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_hu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsHu extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsHu extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_nb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_sk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n/zulip_localizations_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class ZulipLocalizationsZh extends ZulipLocalizations {
String get composeBoxSendTooltip => 'Send';

@override
String get unknownChannelName => '(unknown channel)';
String get unknownChannelName => 'Unknown channel';

@override
String get composeBoxTopicHintText => 'Topic';
Expand All @@ -550,7 +550,7 @@ class ZulipLocalizationsZh extends ZulipLocalizations {
}

@override
String get unknownUserName => '(unknown user)';
String get unknownUserName => 'unknown user';

@override
String get dmsWithYourselfPageTitle => 'DMs with yourself';
Expand Down
4 changes: 2 additions & 2 deletions test/model/user_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main() {

test('on an unknown user', () {
final store = eg.store();
check(store.userDisplayName(eg.user().userId)).equals('(unknown user)');
check(store.userDisplayName(eg.user().userId)).equals('unknown user');
});
});

Expand Down Expand Up @@ -54,7 +54,7 @@ void main() {
check(store.senderDisplayName(message)).equals('Some User');
// ... even though `store.userDisplayName` (with no message available
// for fallback) only has a generic fallback name.
check(store.userDisplayName(message.senderId)).equals('(unknown user)');
check(store.userDisplayName(message.senderId)).equals('unknown user');
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/notifications/display_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ void main() {
final message = eg.streamMessage(stream: stream);
await checkNotifications(async, messageFcmMessage(message, streamName: null),
expectedIsGroupConversation: true,
expectedTitle: '#(unknown channel) > ${message.topic}',
expectedTitle: '#Unknown channel > ${message.topic}',
expectedTagComponent: 'stream:${message.streamId}:${message.topic}');
})));

Expand Down
4 changes: 2 additions & 2 deletions test/widgets/action_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void main() {
child: TopicListPage(streamId: streamId)));
await tester.pump();

final titleText = store.streams[streamId]?.name ?? '(unknown channel)';
final titleText = store.streams[streamId]?.name ?? 'Unknown channel';
await tester.longPress(find.descendant(
of: find.byType(ZulipAppBar),
matching: find.text(titleText)));
Expand Down Expand Up @@ -345,7 +345,7 @@ void main() {
check(store.streams[someChannel.streamId]).isNull();
await showFromTopicListAppBar(tester);
check(findInHeader(find.byType(Icon))).findsNothing();
check(findInHeader(find.textContaining('(unknown channel)'))).findsOne();
check(findInHeader(find.textContaining('Unknown channel'))).findsOne();
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/widgets/emoji_reaction_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void main() {
runSmokeTest('same reaction, different users, with one unknown user', [
Reaction.fromJson({ ...u1, 'user_id': user1.userId}),
Reaction.fromJson({ ...u1, 'user_id': user2.userId}),
// unknown user; shouldn't crash (name should show as "(unknown user)")
// unknown user; shouldn't crash (name should show as "unknown user")
Reaction.fromJson({ ...u1, 'user_id': eg.user().userId}),
], users: users, realmEmoji: realmEmoji);

Expand Down Expand Up @@ -385,7 +385,7 @@ void main() {
// - Tapping a chip does the right thing
// - When an image emoji fails to load, falls back to :text_emoji:
// - Label text correctly chooses names or number
// - When a user isn't found, says "(unknown user)"
// - When a user isn't found, says "unknown user"
// - More about layout? (not just that it's error-free)
// - Non-animated image emoji is selected when intended

Expand Down
6 changes: 3 additions & 3 deletions test/widgets/message_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ void main() {
narrow: DmNarrow.withUser(eg.user().userId, selfUserId: selfUserId), messages: [], users: [eg.selfUser]);
check(findPlaceholder).findsOne();
check(findTextInPlaceholder('this user')).findsOne();
check(findTextInPlaceholder('(unknown user)')).findsNothing();
check(findTextInPlaceholder('unknown user')).findsNothing();

// No need to encourage starting a conversation...right?
check(findTextInPlaceholder('yet.')).findsNothing();
Expand Down Expand Up @@ -1143,7 +1143,7 @@ void main() {
narrow: narrow, users: [], messages: [streamMessage]);
await checkTyping(tester,
eg.typingEvent(narrow, TypingOp.start, 1000),
expected: '(unknown user) is typing…',
expected: 'unknown user is typing…',
);
// Wait for the pending timers to end.
await tester.pump(const Duration(seconds: 15));
Expand Down Expand Up @@ -1795,7 +1795,7 @@ void main() {
tester.widget(find.text(zulipLocalizations.messageListGroupYouAndOthers(
zulipLocalizations.unknownUserName)));
tester.widget(find.text(zulipLocalizations.messageListGroupYouAndOthers(
"${zulipLocalizations.unknownUserName}, ${eg.thirdUser.fullName}")));
"${eg.thirdUser.fullName}, ${zulipLocalizations.unknownUserName}")));
});

testWidgets('show "Muted user" label for muted users', (tester) async {
Expand Down
2 changes: 1 addition & 1 deletion test/widgets/poll_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void main() {
testWidgets('show unknown voter', (tester) async {
await preparePollWidget(tester, pollWidgetData,
users: [eg.selfUser], voterIdxPairs: [(eg.thirdUser, 1)]);
check(findInPoll(find.text('((unknown user))'))).findsOne();
check(findInPoll(find.text('(unknown user)'))).findsOne();
});

testWidgets('poll title missing', (tester) async {
Expand Down
2 changes: 1 addition & 1 deletion test/widgets/profile_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void main() {
customProfileFields: [eg.customProfileField(0, CustomProfileFieldType.user)],
);

final textFinder = find.text('(unknown user)');
final textFinder = find.text('unknown user');
check(textFinder.evaluate()).length.equals(1);
});

Expand Down
4 changes: 2 additions & 2 deletions test/widgets/recent_dm_conversations_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void main() {
);

checkAvatar(tester, DmNarrow.ofMessage(message, selfUserId: eg.selfUser.userId));
checkTitle(tester, '(unknown user)');
checkTitle(tester, 'unknown user');
});

testWidgets('short name takes one line', (tester) async {
Expand Down Expand Up @@ -424,7 +424,7 @@ void main() {
);

checkAvatar(tester, DmNarrow.ofMessage(message, selfUserId: eg.selfUser.userId));
checkTitle(tester, '${user0.fullName}, (unknown user)');
checkTitle(tester, '${user0.fullName}, unknown user');
});

testWidgets('few names takes one line', (tester) async {
Expand Down
2 changes: 1 addition & 1 deletion test/widgets/topic_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void main() {
child: TopicListPage(streamId: channel.streamId)));
await tester.pump();
await tester.pump(Duration.zero);
check(find.widgetWithText(ZulipAppBar, '(unknown channel)')).findsOne();
check(find.widgetWithText(ZulipAppBar, 'Unknown channel')).findsOne();
});

testWidgets('navigate to channel feed', (tester) async {
Expand Down