email placeholder to remind users which address to check for their code #333

Merged
tech merged 1 commits from SEND037 into main 2026-01-28 13:43:33 +00:00
3 changed files with 21 additions and 3 deletions

View File

@@ -111,7 +111,13 @@
"usersManagement": "User Management", "usersManagement": "User Management",
"navigationOrganizationSettings": "Organization settings", "navigationOrganizationSettings": "Organization settings",
"navigationAccountSettings": "Profile 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": "Didnt receive a code? Resend", "twoFactorResend": "Didnt receive a code? Resend",
"twoFactorTitle": "Two-Factor Authentication", "twoFactorTitle": "Two-Factor Authentication",
"twoFactorError": "Invalid code. Please try again.", "twoFactorError": "Invalid code. Please try again.",

View File

@@ -111,7 +111,13 @@
"usersManagement": "Управление пользователями", "usersManagement": "Управление пользователями",
"navigationOrganizationSettings": "Настройки организации", "navigationOrganizationSettings": "Настройки организации",
"navigationAccountSettings": "Настройки профиля", "navigationAccountSettings": "Настройки профиля",
"twoFactorPrompt": "Введите 6-значный код, отправленный на ваше устройство", "twoFactorPrompt": "Введите 6-значный код, отправленный на {email}",
"@twoFactorPrompt": {
"description": "Two-factor prompt showing the destination email address",
"placeholders": {
"email": {}
}
},
"twoFactorResend": "Не получили код? Отправить снова", "twoFactorResend": "Не получили код? Отправить снова",
"twoFactorTitle": "Двухфакторная аутентификация", "twoFactorTitle": "Двухфакторная аутентификация",
"twoFactorError": "Неверный код. Пожалуйста, попробуйте снова.", "twoFactorError": "Неверный код. Пожалуйста, попробуйте снова.",

View File

@@ -1,5 +1,9 @@
import 'package:flutter/material.dart'; 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'; import 'package:pweb/generated/i18n/app_localizations.dart';
@@ -8,7 +12,9 @@ class TwoFactorPromptText extends StatelessWidget {
@override @override
Widget build(BuildContext context) => Text( Widget build(BuildContext context) => Text(
AppLocalizations.of(context)!.twoFactorPrompt, AppLocalizations.of(context)!.twoFactorPrompt(
context.watch<TwoFactorProvider>().pendingLogin?.destination ?? '',
),
style: Theme.of(context).textTheme.bodyLarge, style: Theme.of(context).textTheme.bodyLarge,
textAlign: TextAlign.center, textAlign: TextAlign.center,
); );