fix: Localize ok cancel alert dialogs
This commit is contained in:
parent
2724961e51
commit
4d5d198450
13 changed files with 37 additions and 4 deletions
|
|
@ -69,6 +69,8 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
var confirmed = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context).areYouSure,
|
||||
okLabel: L10n.of(context).ok,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
);
|
||||
if (confirmed == OkCancelResult.ok) {
|
||||
final success = await showFutureLoadingDialog(
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||
context: context,
|
||||
title: widget.l10n.securityKeyLost,
|
||||
message: widget.l10n.wipeChatBackup,
|
||||
okLabel: widget.l10n.ok,
|
||||
cancelLabel: widget.l10n.cancel,
|
||||
isDestructiveAction: true,
|
||||
)) {
|
||||
_createBootstrap(true);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class _EncryptionButtonState extends State<EncryptionButton> {
|
|||
? L10n.of(context).warningEncryptionInBeta
|
||||
: L10n.of(context).needPantalaimonWarning,
|
||||
okLabel: L10n.of(context).yes,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
) ==
|
||||
OkCancelResult.ok) {
|
||||
await showFutureLoadingDialog(
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ class ChatListItem extends StatelessWidget {
|
|||
final confirmed = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context).areYouSure,
|
||||
okLabel: L10n.of(context).yes,
|
||||
cancelLabel: L10n.of(context).no,
|
||||
);
|
||||
if (confirmed == OkCancelResult.cancel) return;
|
||||
await showFutureLoadingDialog(
|
||||
|
|
|
|||
|
|
@ -321,6 +321,8 @@ class MatrixState extends State<Matrix> {
|
|||
context: context,
|
||||
title: L10n.of(context).newVerificationRequest,
|
||||
message: L10n.of(context).askVerificationRequest(request.userId),
|
||||
okLabel: L10n.of(context).ok,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
) ==
|
||||
OkCancelResult.ok) {
|
||||
request.onUpdate = null;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,13 @@ class UserBottomSheet extends StatelessWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
void participantAction(BuildContext context, String action) async {
|
||||
final Function _askConfirmation = () async =>
|
||||
(await showOkCancelAlertDialog(
|
||||
context: context, title: l10n.areYouSure) ==
|
||||
final Function _askConfirmation =
|
||||
() async => (await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: l10n.areYouSure,
|
||||
okLabel: l10n.yes,
|
||||
cancelLabel: l10n.no,
|
||||
) ==
|
||||
OkCancelResult.ok);
|
||||
switch (action) {
|
||||
case 'mention':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue