Skip to content

Commit

Permalink
i18n: Set up "All messages" page title for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe authored and gnprice committed Feb 6, 2024
1 parent 880a0fe commit 681c763
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,9 @@
"recentDmConversationsPageTitle": "Direct messages",
"@recentDmConversationsPageTitle": {
"description": "Title for the page of recent DM conversations"
},
"allMessagesPageTitle": "All messages",
"@allMessagesPageTitle": {
"description": "Title for the page of all messages"
}
}
2 changes: 1 addition & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class HomePage extends StatelessWidget {
onPressed: () => Navigator.push(context,
MessageListPage.buildRoute(context: context,
narrow: const AllMessagesNarrow())),
child: const Text("All messages")),
child: Text(zulipLocalizations.allMessagesPageTitle)),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => Navigator.push(context,
Expand Down
4 changes: 3 additions & 1 deletion lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ class MessageListAppBarTitle extends StatelessWidget {

@override
Widget build(BuildContext context) {
final zulipLocalizations = ZulipLocalizations.of(context);

switch (narrow) {
case AllMessagesNarrow():
return const Text("All messages");
return Text(zulipLocalizations.allMessagesPageTitle);

case StreamNarrow(:var streamId):
final store = PerAccountStoreWidget.of(context);
Expand Down

0 comments on commit 681c763

Please sign in to comment.