Skip to content

Commit 86684fd

Browse files
committed
Merge remote-tracking branch 'pr/1076'
2 parents 7045afe + 269d86e commit 86684fd

25 files changed

+1360
-229
lines changed

assets/l10n/app_en.arb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
"@chooseAccountPageTitle": {
2020
"description": "Title for the page to choose between Zulip accounts."
2121
},
22+
"switchAccountButton": "Switch account",
23+
"@switchAccountButton": {
24+
"description": "Label for main-menu button leading to the choose-account page."
25+
},
26+
"tryAnotherAccountMessage": "Your account at {url} is taking a while to load.",
27+
"@tryAnotherAccountMessage": {
28+
"description": "Message that appears on the loading screen after waiting for some time.",
29+
"url": {"type": "String", "example": "http://chat.example.com/"}
30+
},
31+
"tryAnotherAccountButton": "Try another account",
32+
"@tryAnotherAccountButton": {
33+
"description": "Label for loading screen button prompting user to try another account."
34+
},
2235
"chooseAccountPageLogOutButton": "Log out",
2336
"@chooseAccountPageLogOutButton": {
2437
"description": "Label for the 'Log out' button for an account on the choose-account page"
@@ -529,6 +542,10 @@
529542
"@userRoleUnknown": {
530543
"description": "Label for UserRole.unknown"
531544
},
545+
"inboxPageTitle": "Inbox",
546+
"@inboxPageTitle": {
547+
"description": "Title for the page with unreads."
548+
},
532549
"recentDmConversationsPageTitle": "Direct messages",
533550
"@recentDmConversationsPageTitle": {
534551
"description": "Title for the page with a list of DM conversations."
@@ -545,6 +562,14 @@
545562
"@starredMessagesPageTitle": {
546563
"description": "Page title for the 'Starred messages' message view."
547564
},
565+
"channelsPageTitle": "Channels",
566+
"@channelsPageTitle": {
567+
"description": "Title for the page with a list of subscribed channels."
568+
},
569+
"mainMenuMyProfile": "My profile",
570+
"@mainMenuMyProfile": {
571+
"description": "Label for main-menu button leading to the user's own profile."
572+
},
548573
"channelFeedButtonTooltip": "Channel feed",
549574
"@channelFeedButtonTooltip": {
550575
"description": "Tooltip for button to navigate to a given channel's feed"

lib/generated/l10n/zulip_localizations.dart

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,24 @@ abstract class ZulipLocalizations {
127127
/// **'Choose account'**
128128
String get chooseAccountPageTitle;
129129

130+
/// Label for main-menu button leading to the choose-account page.
131+
///
132+
/// In en, this message translates to:
133+
/// **'Switch account'**
134+
String get switchAccountButton;
135+
136+
/// Message that appears on the loading screen after waiting for some time.
137+
///
138+
/// In en, this message translates to:
139+
/// **'Your account at {url} is taking a while to load.'**
140+
String tryAnotherAccountMessage(Object url);
141+
142+
/// Label for loading screen button prompting user to try another account.
143+
///
144+
/// In en, this message translates to:
145+
/// **'Try another account'**
146+
String get tryAnotherAccountButton;
147+
130148
/// Label for the 'Log out' button for an account on the choose-account page
131149
///
132150
/// In en, this message translates to:
@@ -799,6 +817,12 @@ abstract class ZulipLocalizations {
799817
/// **'Unknown'**
800818
String get userRoleUnknown;
801819

820+
/// Title for the page with unreads.
821+
///
822+
/// In en, this message translates to:
823+
/// **'Inbox'**
824+
String get inboxPageTitle;
825+
802826
/// Title for the page with a list of DM conversations.
803827
///
804828
/// In en, this message translates to:
@@ -823,6 +847,18 @@ abstract class ZulipLocalizations {
823847
/// **'Starred messages'**
824848
String get starredMessagesPageTitle;
825849

850+
/// Title for the page with a list of subscribed channels.
851+
///
852+
/// In en, this message translates to:
853+
/// **'Channels'**
854+
String get channelsPageTitle;
855+
856+
/// Label for main-menu button leading to the user's own profile.
857+
///
858+
/// In en, this message translates to:
859+
/// **'My profile'**
860+
String get mainMenuMyProfile;
861+
826862
/// Tooltip for button to navigate to a given channel's feed
827863
///
828864
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -419,6 +430,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
419430
@override
420431
String get userRoleUnknown => 'Unknown';
421432

433+
@override
434+
String get inboxPageTitle => 'Inbox';
435+
422436
@override
423437
String get recentDmConversationsPageTitle => 'Direct messages';
424438

@@ -431,6 +445,12 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
431445
@override
432446
String get starredMessagesPageTitle => 'Starred messages';
433447

448+
@override
449+
String get channelsPageTitle => 'Channels';
450+
451+
@override
452+
String get mainMenuMyProfile => 'My profile';
453+
434454
@override
435455
String get channelFeedButtonTooltip => 'Channel feed';
436456

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -419,6 +430,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
419430
@override
420431
String get userRoleUnknown => 'Unknown';
421432

433+
@override
434+
String get inboxPageTitle => 'Inbox';
435+
422436
@override
423437
String get recentDmConversationsPageTitle => 'Direct messages';
424438

@@ -431,6 +445,12 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
431445
@override
432446
String get starredMessagesPageTitle => 'Starred messages';
433447

448+
@override
449+
String get channelsPageTitle => 'Channels';
450+
451+
@override
452+
String get mainMenuMyProfile => 'My profile';
453+
434454
@override
435455
String get channelFeedButtonTooltip => 'Channel feed';
436456

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'アカウントを選択';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -419,6 +430,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
419430
@override
420431
String get userRoleUnknown => '不明';
421432

433+
@override
434+
String get inboxPageTitle => 'Inbox';
435+
422436
@override
423437
String get recentDmConversationsPageTitle => 'Direct messages';
424438

@@ -431,6 +445,12 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
431445
@override
432446
String get starredMessagesPageTitle => 'Starred messages';
433447

448+
@override
449+
String get channelsPageTitle => 'Channels';
450+
451+
@override
452+
String get mainMenuMyProfile => 'My profile';
453+
434454
@override
435455
String get channelFeedButtonTooltip => 'Channel feed';
436456

lib/widgets/action_sheet.dart

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,13 @@ void showMessageActionSheet({required BuildContext context, required Message mes
8888
borderRadius: BorderRadius.circular(7),
8989
child: Column(spacing: 1,
9090
children: optionButtons))))),
91-
const MessageActionSheetCancelButton(),
91+
const ActionSheetCancelButton(),
9292
])));
9393
});
9494
}
9595

96-
abstract class MessageActionSheetMenuItemButton extends StatelessWidget {
97-
MessageActionSheetMenuItemButton({
98-
super.key,
99-
required this.message,
100-
required this.pageContext,
101-
}) : assert(pageContext.findAncestorWidgetOfExactType<MessageListPage>() != null);
96+
abstract class ActionSheetMenuItemButton extends StatelessWidget {
97+
const ActionSheetMenuItemButton({super.key, required this.pageContext});
10298

10399
IconData get icon;
104100
String label(ZulipLocalizations zulipLocalizations);
@@ -111,8 +107,6 @@ abstract class MessageActionSheetMenuItemButton extends StatelessWidget {
111107
/// For operations that need a [BuildContext], see [pageContext].
112108
void onPressed();
113109

114-
final Message message;
115-
116110
/// A context within the [MessageListPage] this action sheet was
117111
/// triggered from.
118112
final BuildContext pageContext;
@@ -157,14 +151,25 @@ abstract class MessageActionSheetMenuItemButton extends StatelessWidget {
157151
}
158152
}
159153

160-
class MessageActionSheetCancelButton extends StatelessWidget {
161-
const MessageActionSheetCancelButton({super.key});
154+
abstract class MessageActionSheetMenuItemButton extends ActionSheetMenuItemButton {
155+
MessageActionSheetMenuItemButton({
156+
super.key,
157+
required this.message,
158+
required super.pageContext,
159+
}) : assert(pageContext.findAncestorWidgetOfExactType<MessageListPage>() != null);
160+
161+
final Message message;
162+
}
163+
164+
class ActionSheetCancelButton extends StatelessWidget {
165+
const ActionSheetCancelButton({super.key});
162166

163167
@override
164168
Widget build(BuildContext context) {
165169
final designVariables = DesignVariables.of(context);
166170
return TextButton(
167171
style: TextButton.styleFrom(
172+
minimumSize: const Size.fromHeight(44),
168173
padding: const EdgeInsets.all(10),
169174
foregroundColor: designVariables.contextMenuCancelText,
170175
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(7)),
@@ -178,8 +183,7 @@ class MessageActionSheetCancelButton extends StatelessWidget {
178183
},
179184
child: Text(ZulipLocalizations.of(context).dialogCancel,
180185
style: const TextStyle(fontSize: 20, height: 24 / 20)
181-
.merge(weightVariableTextStyle(context, wght: 600))),
182-
);
186+
.merge(weightVariableTextStyle(context, wght: 600))));
183187
}
184188
}
185189

0 commit comments

Comments
 (0)