Skip to content

Commit

Permalink
ui: use channel instead of stream UI strings
Browse files Browse the repository at this point in the history
Fixes: zulip#630
  • Loading branch information
Khader-1 committed May 25, 2024
1 parent 316cc1a commit f12f305
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"@composeBoxDmContentHint": {
"description": "Hint text for content input when sending a message to one other person.",
"placeholders": {
"user": {"type": "String", "example": "stream name"}
"user": {"type": "String", "example": "channel name"}
}
},
"composeBoxGroupDmContentHint": "Message group",
Expand All @@ -205,19 +205,19 @@
},
"composeBoxStreamContentHint": "Message #{stream} > {topic}",
"@composeBoxStreamContentHint": {
"description": "Hint text for content input when sending a message to a stream",
"description": "Hint text for content input when sending a message to a channel",
"placeholders": {
"stream": {"type": "String", "example": "stream name"},
"stream": {"type": "String", "example": "channel name"},
"topic": {"type": "String", "example": "topic name"}
}
},
"composeBoxSendTooltip": "Send",
"@composeBoxSendTooltip": {
"description": "Tooltip for send button in compose box."
},
"composeBoxUnknownStreamName": "(unknown stream)",
"composeBoxUnknownStreamName": "(unknown channel)",
"@composeBoxUnknownStreamName": {
"description": "Replacement name for stream when it cannot be found in the store."
"description": "Replacement name for channel when it cannot be found in the store."
},
"composeBoxTopicHintText": "Topic",
"@composeBoxTopicHintText": {
Expand Down Expand Up @@ -344,9 +344,9 @@
"@topicValidationErrorMandatoryButEmpty": {
"description": "Topic validation error when topic is required but was empty."
},
"subscribedToNStreams": "Subscribed to {num, plural, =0{no streams} =1{1 stream} other{{num} streams}}",
"subscribedToNStreams": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}",
"@subscribedToNStreams": {
"description": "Test page label showing number of streams user is subscribed to.",
"description": "Test page label showing number of channels user is subscribed to.",
"placeholders": {
"num": {"type": "int", "example": "4"}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/notifications/display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class NotificationDisplayManager {
FcmMessageStreamRecipient(:var streamName?, :var topic) =>
'$streamName > $topic',
FcmMessageStreamRecipient(:var topic) =>
'(unknown stream) > $topic', // TODO get stream name from data
'(unknown channel) > $topic', // TODO get stream name from data
FcmMessageDmRecipient(:var allRecipientIds) when allRecipientIds.length > 2 =>
zulipLocalizations.notifGroupDmConversationLabel(
data.senderFullName, allRecipientIds.length - 2), // TODO use others' names, from data
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class HomePage extends StatelessWidget {
ElevatedButton(
onPressed: () => Navigator.push(context,
SubscriptionListPage.buildRoute(context: context)),
child: const Text("Subscribed streams")),
child: const Text("Subscribed channels")),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => Navigator.push(context,
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ class MessageListAppBarTitle extends StatelessWidget {
case StreamNarrow(:var streamId):
final store = PerAccountStoreWidget.of(context);
final stream = store.streams[streamId];
final streamName = stream?.name ?? '(unknown stream)';
final streamName = stream?.name ?? '(unknown channel)';
return _buildStreamRow(stream, streamName);

case TopicNarrow(:var streamId, :var topic):
final store = PerAccountStoreWidget.of(context);
final stream = store.streams[streamId];
final streamName = stream?.name ?? '(unknown stream)';
final streamName = stream?.name ?? '(unknown channel)';
return _buildStreamRow(stream, "$streamName > $topic");

case DmNarrow(:var otherRecipientIds):
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/subscription_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class _SubscriptionListPageState extends State<SubscriptionListPage> with PerAcc
unpinned.sortBy((subscription) => subscription.name.toLowerCase());

return Scaffold(
appBar: AppBar(title: const Text("Streams")),
appBar: AppBar(title: const Text("Channels")),
body: SafeArea(
// Don't pad the bottom here; we want the list content to do that.
bottom: false,
Expand Down Expand Up @@ -115,7 +115,7 @@ class _NoSubscriptionsItem extends StatelessWidget {
return SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(10),
child: Text("No streams found",
child: Text("No channels found",
textAlign: TextAlign.center,
style: TextStyle(
// TODO(#95) need dark-theme color
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 @@ -166,7 +166,7 @@ void main() {
final stream = eg.stream();
final message = eg.streamMessage(stream: stream);
await checkNotifications(async, messageFcmMessage(message, streamName: null),
expectedTitle: '(unknown stream) > ${message.subject}',
expectedTitle: '(unknown channel) > ${message.subject}',
expectedTagComponent: 'stream:${message.streamId}:${message.subject}');
}));

Expand Down

0 comments on commit f12f305

Please sign in to comment.