fix: Localize ok cancel alert dialogs

This commit is contained in:
Christian Pauly 2021-02-18 14:23:22 +01:00
commit 4d5d198450
13 changed files with 37 additions and 4 deletions

View file

@ -347,6 +347,7 @@ class _ChatState extends State<Chat> {
context: context,
title: L10n.of(context).messageWillBeRemovedWarning,
okLabel: L10n.of(context).remove,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.ok;
if (!confirmed) return;

View file

@ -46,6 +46,8 @@ class _ChatEncryptionSettingsState extends State<ChatEncryptionSettings> {
context: context,
title: L10n.of(context).isDeviceKeyCorrect,
message: key.ed25519Key.beautified,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.ok) {
await unblock();

View file

@ -185,6 +185,8 @@ class _ChatListState extends State<ChatList> {
final confirmed = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context).areYouSure,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.ok;
if (!confirmed) return;

View file

@ -64,6 +64,7 @@ class _DiscoverState extends State<Discover> {
okLabel: L10n.of(context).joinRoom,
title: '${room.name} (${room.numJoinedMembers ?? 0})',
message: room.topic ?? L10n.of(context).noDescription,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.cancel) {
return;

View file

@ -44,6 +44,8 @@ class _SettingsState extends State<Settings> {
if (await showOkCancelAlertDialog(
context: context,
title: L10n.of(context).areYouSureYouWantToLogout,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.cancel) {
return;
@ -91,12 +93,18 @@ class _SettingsState extends State<Settings> {
context: context,
title: L10n.of(context).warning,
message: L10n.of(context).deactivateAccountWarning,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.cancel) {
return;
}
if (await showOkCancelAlertDialog(
context: context, title: L10n.of(context).areYouSure) ==
context: context,
title: L10n.of(context).areYouSure,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.cancel) {
return;
}
@ -512,6 +520,8 @@ class _SettingsState extends State<Settings> {
title: L10n.of(context).keysCached,
message: L10n.of(context).wipeChatBackup,
isDestructiveAction: true,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
)) {
await BootstrapDialog(
l10n: L10n.of(context),

View file

@ -76,6 +76,8 @@ class _Settings3PidState extends State<Settings3Pid> {
if (await showOkCancelAlertDialog(
context: context,
title: L10n.of(context).areYouSure,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
) !=
OkCancelResult.ok) {
return;

View file

@ -29,6 +29,8 @@ class DevicesSettingsState extends State<DevicesSettings> {
if (await showOkCancelAlertDialog(
context: context,
title: L10n.of(context).areYouSure,
okLabel: L10n.of(context).yes,
cancelLabel: L10n.of(context).cancel,
) ==
OkCancelResult.cancel) return;
var matrix = Matrix.of(context);