From 97dec6a8a0fac9d84424839840837a8cc12a186e Mon Sep 17 00:00:00 2001 From: Arseni Date: Wed, 28 Jan 2026 14:50:11 +0300 Subject: [PATCH] email placeholder to remind users which address to check for their code --- frontend/pweb/lib/l10n/en.arb | 8 +++++++- frontend/pweb/lib/l10n/ru.arb | 8 +++++++- frontend/pweb/lib/pages/2fa/prompt.dart | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/frontend/pweb/lib/l10n/en.arb b/frontend/pweb/lib/l10n/en.arb index 9ee98a49..8890331c 100644 --- a/frontend/pweb/lib/l10n/en.arb +++ b/frontend/pweb/lib/l10n/en.arb @@ -111,7 +111,13 @@ "usersManagement": "User Management", "navigationOrganizationSettings": "Organization settings", "navigationAccountSettings": "Profile settings", - "twoFactorPrompt": "Enter the 6-digit code we sent to your device", + "twoFactorPrompt": "Enter the 6-digit code we sent to {email}", + "@twoFactorPrompt": { + "description": "Two-factor prompt showing the destination email address", + "placeholders": { + "email": {} + } + }, "twoFactorResend": "Didn’t receive a code? Resend", "twoFactorTitle": "Two-Factor Authentication", "twoFactorError": "Invalid code. Please try again.", diff --git a/frontend/pweb/lib/l10n/ru.arb b/frontend/pweb/lib/l10n/ru.arb index 12f7bcbc..a051eb65 100644 --- a/frontend/pweb/lib/l10n/ru.arb +++ b/frontend/pweb/lib/l10n/ru.arb @@ -111,7 +111,13 @@ "usersManagement": "Управление пользователями", "navigationOrganizationSettings": "Настройки организации", "navigationAccountSettings": "Настройки профиля", - "twoFactorPrompt": "Введите 6-значный код, отправленный на ваше устройство", + "twoFactorPrompt": "Введите 6-значный код, отправленный на {email}", + "@twoFactorPrompt": { + "description": "Two-factor prompt showing the destination email address", + "placeholders": { + "email": {} + } + }, "twoFactorResend": "Не получили код? Отправить снова", "twoFactorTitle": "Двухфакторная аутентификация", "twoFactorError": "Неверный код. Пожалуйста, попробуйте снова.", diff --git a/frontend/pweb/lib/pages/2fa/prompt.dart b/frontend/pweb/lib/pages/2fa/prompt.dart index 91f49233..11abc6d4 100644 --- a/frontend/pweb/lib/pages/2fa/prompt.dart +++ b/frontend/pweb/lib/pages/2fa/prompt.dart @@ -1,5 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'package:pweb/providers/two_factor.dart'; + import 'package:pweb/generated/i18n/app_localizations.dart'; @@ -8,7 +12,9 @@ class TwoFactorPromptText extends StatelessWidget { @override Widget build(BuildContext context) => Text( - AppLocalizations.of(context)!.twoFactorPrompt, + AppLocalizations.of(context)!.twoFactorPrompt( + context.watch().pendingLogin?.destination ?? '', + ), style: Theme.of(context).textTheme.bodyLarge, textAlign: TextAlign.center, ); -- 2.49.1