forked from eatvio/eatvio_app
feat(auth): align password policy and handle 429 responses
- map 429 Retry-After to a localized toast in AuthCubit - enforce the 8-character minimum on registration v1 and add the hint - surface errors.password in registration v2 - show password errors from 422 responses in the reset flow - add ru/en localization strings and regenerate l10n - add a regression test for the 429/Retry-After path
This commit is contained in:
@@ -86,18 +86,21 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
static String m26(planName) =>
|
||||
"Завтра начнется прохождение плана «${planName}»";
|
||||
|
||||
static String m27(name, planName) =>
|
||||
"Пользователь ${name} отменил подписку на план «${planName}»";
|
||||
static String m27(seconds) =>
|
||||
"Too many login attempts. Try again in ${seconds} sec.";
|
||||
|
||||
static String m28(name, planName) =>
|
||||
"Пользователь ${name} оплатил план «${planName}»";
|
||||
"Пользователь ${name} отменил подписку на план «${planName}»";
|
||||
|
||||
static String m29(name, planName) =>
|
||||
"Пользователь ${name} оплатил план «${planName}»";
|
||||
|
||||
static String m30(name, planName) =>
|
||||
"Пользователь ${name} подписался на план «${planName}»";
|
||||
|
||||
static String m30(percent) => "Downloading… ${percent}%";
|
||||
static String m31(percent) => "Downloading… ${percent}%";
|
||||
|
||||
static String m31(planName) => "Вы отменили подписку на план «${planName}»";
|
||||
static String m32(planName) => "Вы отменили подписку на план «${planName}»";
|
||||
|
||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||
@@ -838,8 +841,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"password_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"Пароль обязателен для заполнения",
|
||||
),
|
||||
"password_hint": MessageLookupByLibrary.simpleMessage(
|
||||
"At least 8 characters, avoid common passwords",
|
||||
),
|
||||
"password_short": MessageLookupByLibrary.simpleMessage(
|
||||
"В пароле должно быть минимум 6 символов",
|
||||
"В пароле должно быть минимум 8 символов",
|
||||
),
|
||||
"pay": MessageLookupByLibrary.simpleMessage("Оплатить"),
|
||||
"pay_by_qr_code": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -1084,6 +1090,10 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"to_order": MessageLookupByLibrary.simpleMessage("Заказать"),
|
||||
"tommorowPlanWithUserWillStart": m25,
|
||||
"tomorrowYourPlanWillStart": m26,
|
||||
"too_many_login_attempts": m27,
|
||||
"too_many_login_attempts_no_retry": MessageLookupByLibrary.simpleMessage(
|
||||
"Too many login attempts. Please try again later.",
|
||||
),
|
||||
"try_again": MessageLookupByLibrary.simpleMessage("Попробовать снова"),
|
||||
"try_again_2": MessageLookupByLibrary.simpleMessage("Попробуйте ещё раз"),
|
||||
"typeAmoutOfReturn": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -1117,7 +1127,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Верхние показатели давления:",
|
||||
),
|
||||
"upper": MessageLookupByLibrary.simpleMessage("Верхнее"),
|
||||
"userCanceldThePlanSubscription": m27,
|
||||
"userCanceldThePlanSubscription": m28,
|
||||
"userConfirmedPlanCompletion": MessageLookupByLibrary.simpleMessage(
|
||||
"Пользователь подтвердил прохождения плана. В ближайшее время Вы получите",
|
||||
),
|
||||
@@ -1125,8 +1135,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Пользователь подтвердил прохождения плана.",
|
||||
),
|
||||
"userPaidThePlan": m28,
|
||||
"userSubscribedToPlan": m29,
|
||||
"userPaidThePlan": m29,
|
||||
"userSubscribedToPlan": m30,
|
||||
"user_authorization": MessageLookupByLibrary.simpleMessage(
|
||||
"Аутентификация",
|
||||
),
|
||||
@@ -1213,7 +1223,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"video_call_recordings_downloading": MessageLookupByLibrary.simpleMessage(
|
||||
"Downloading…",
|
||||
),
|
||||
"video_call_recordings_downloading_percent": m30,
|
||||
"video_call_recordings_downloading_percent": m31,
|
||||
"video_call_recordings_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"No video consultations yet",
|
||||
),
|
||||
@@ -1307,7 +1317,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"youCanComplain": MessageLookupByLibrary.simpleMessage(
|
||||
"Если вас что-то не устроило, вы можете подать жалобу",
|
||||
),
|
||||
"youCanceledSubscriptionToPlan": m31,
|
||||
"youCanceledSubscriptionToPlan": m32,
|
||||
"youShureYouWantToCancelOrder": MessageLookupByLibrary.simpleMessage(
|
||||
"Вы уверены, что хотите отменить заказ?",
|
||||
),
|
||||
|
||||
@@ -71,7 +71,10 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
|
||||
static String m23(date) => "Старт: ${date}";
|
||||
|
||||
static String m30(percent) => "Скачивание… ${percent}%";
|
||||
static String m27(seconds) =>
|
||||
"Слишком много попыток входа. Повторите через ${seconds} сек.";
|
||||
|
||||
static String m31(percent) => "Скачивание… ${percent}%";
|
||||
|
||||
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||
@@ -485,8 +488,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"password_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"Пароль обязателен для заполнения",
|
||||
),
|
||||
"password_hint": MessageLookupByLibrary.simpleMessage(
|
||||
"Минимум 8 символов, не используйте распространённые пароли",
|
||||
),
|
||||
"password_short": MessageLookupByLibrary.simpleMessage(
|
||||
"В пароле должно быть минимум 6 символов",
|
||||
"В пароле должно быть минимум 8 символов",
|
||||
),
|
||||
"pay_by_qr_code": MessageLookupByLibrary.simpleMessage(
|
||||
"Оплатить по QR-коду",
|
||||
@@ -620,6 +626,10 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"three_options": MessageLookupByLibrary.simpleMessage("3 опции"),
|
||||
"toOffer": MessageLookupByLibrary.simpleMessage("Предложить"),
|
||||
"to_draft": MessageLookupByLibrary.simpleMessage("В черновик"),
|
||||
"too_many_login_attempts": m27,
|
||||
"too_many_login_attempts_no_retry": MessageLookupByLibrary.simpleMessage(
|
||||
"Слишком много попыток входа. Попробуйте позже.",
|
||||
),
|
||||
"unfavorite_foods": MessageLookupByLibrary.simpleMessage(
|
||||
"Нелюбимые продукты",
|
||||
),
|
||||
@@ -708,7 +718,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"video_call_recordings_downloading": MessageLookupByLibrary.simpleMessage(
|
||||
"Скачивание…",
|
||||
),
|
||||
"video_call_recordings_downloading_percent": m30,
|
||||
"video_call_recordings_downloading_percent": m31,
|
||||
"video_call_recordings_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"Пока нет видеоконсультаций",
|
||||
),
|
||||
|
||||
@@ -529,16 +529,46 @@ class S {
|
||||
);
|
||||
}
|
||||
|
||||
/// `В пароле должно быть минимум 6 символов`
|
||||
/// `В пароле должно быть минимум 8 символов`
|
||||
String get password_short {
|
||||
return Intl.message(
|
||||
'В пароле должно быть минимум 6 символов',
|
||||
'В пароле должно быть минимум 8 символов',
|
||||
name: 'password_short',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `At least 8 characters, avoid common passwords`
|
||||
String get password_hint {
|
||||
return Intl.message(
|
||||
'At least 8 characters, avoid common passwords',
|
||||
name: 'password_hint',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Too many login attempts. Try again in {seconds} sec.`
|
||||
String too_many_login_attempts(int seconds) {
|
||||
return Intl.message(
|
||||
'Too many login attempts. Try again in $seconds sec.',
|
||||
name: 'too_many_login_attempts',
|
||||
desc: '',
|
||||
args: [seconds],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Too many login attempts. Please try again later.`
|
||||
String get too_many_login_attempts_no_retry {
|
||||
return Intl.message(
|
||||
'Too many login attempts. Please try again later.',
|
||||
name: 'too_many_login_attempts_no_retry',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Имя пользователя обязательно для заполнения`
|
||||
String get name_empty {
|
||||
return Intl.message(
|
||||
|
||||
Reference in New Issue
Block a user