mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
chore: update translations
This commit is contained in:
parent
41c2a4c9b0
commit
cc91d908f5
5 changed files with 32 additions and 12 deletions
|
@ -280,10 +280,17 @@ class SignInBloc extends Bloc<SignInEvent, SignInState> {
|
|||
emailError: null,
|
||||
);
|
||||
case ErrorCode.UserUnauthorized:
|
||||
final errorMsg = error.msg;
|
||||
String msg = LocaleKeys.signIn_generalError.tr();
|
||||
if (errorMsg.contains('rate limit')) {
|
||||
msg = LocaleKeys.signIn_limitRateError.tr();
|
||||
} else if (errorMsg.contains('invalid')) {
|
||||
msg = LocaleKeys.signIn_tokenHasExpiredOrInvalid.tr();
|
||||
}
|
||||
return state.copyWith(
|
||||
isSubmitting: false,
|
||||
successOrFail: FlowyResult.failure(
|
||||
FlowyError(msg: LocaleKeys.signIn_limitRateError.tr()),
|
||||
FlowyError(msg: msg),
|
||||
),
|
||||
);
|
||||
default:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy_ui/appflowy_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class ContinueWithEmail extends StatelessWidget {
|
||||
const ContinueWithEmail({
|
||||
|
@ -12,7 +14,7 @@ class ContinueWithEmail extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AFFilledTextButton.primary(
|
||||
text: 'Continue with email',
|
||||
text: LocaleKeys.signIn_continueWithEmail.tr(),
|
||||
size: AFButtonSize.l,
|
||||
alignment: Alignment.center,
|
||||
onTap: onTap,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/user/application/sign_in_bloc.dart';
|
||||
import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/logo/logo.dart';
|
||||
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
||||
import 'package:appflowy_ui/appflowy_ui.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
@ -78,7 +80,7 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
if (!isEnteringPasscode) {
|
||||
return [
|
||||
AFFilledTextButton.primary(
|
||||
text: 'Enter code manually',
|
||||
text: LocaleKeys.signIn_enterCodeManually.tr(),
|
||||
onTap: () => setState(() => isEnteringPasscode = true),
|
||||
size: AFButtonSize.l,
|
||||
alignment: Alignment.center,
|
||||
|
@ -90,10 +92,10 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
return [
|
||||
// Enter code manually
|
||||
SizedBox(
|
||||
height: 40, // fixme: use the height from the designer
|
||||
height: 40,
|
||||
child: AFTextField(
|
||||
controller: passcodeController,
|
||||
hintText: 'Enter code',
|
||||
hintText: LocaleKeys.signIn_enterCode.tr(),
|
||||
keyboardType: TextInputType.number,
|
||||
radius: 10,
|
||||
autoFocus: true,
|
||||
|
@ -118,7 +120,7 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
List<Widget> _buildBackToLogin() {
|
||||
return [
|
||||
AFGhostTextButton(
|
||||
text: 'Back to login',
|
||||
text: LocaleKeys.signIn_backToLogin.tr(),
|
||||
size: AFButtonSize.s,
|
||||
onTap: widget.backToLogin,
|
||||
textColor: (context, isHovering, disabled) {
|
||||
|
@ -142,7 +144,7 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
|
||||
// title
|
||||
Text(
|
||||
'Check your email',
|
||||
LocaleKeys.signIn_checkYourEmail.tr(),
|
||||
style: theme.textStyle.heading.h3(
|
||||
color: theme.textColorScheme.primary,
|
||||
),
|
||||
|
@ -151,7 +153,7 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
|
||||
// description
|
||||
Text(
|
||||
'A temporary verification link has been sent. Please check your inbox at',
|
||||
LocaleKeys.signIn_temporaryVerificationSent.tr(),
|
||||
style: theme.textStyle.body.standard(
|
||||
color: theme.textColorScheme.primary,
|
||||
),
|
||||
|
@ -172,7 +174,7 @@ class _ContinueWithMagicLinkOrPasscodePageState
|
|||
_dismissLoadingDialog();
|
||||
|
||||
toastificationItem = showToastNotification(
|
||||
message: 'Signing in...',
|
||||
message: LocaleKeys.signIn_signingIn.tr(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ class AppFlowyThemeBuilder {
|
|||
quaternary: colorScheme.neutral.neutral100,
|
||||
quaternaryHover: colorScheme.neutral.neutral200,
|
||||
transparent: colorScheme.neutral.alphaWhite0,
|
||||
primaryAlpha5: colorScheme.neutral.alphaGrey100005,
|
||||
primaryAlpha5: colorScheme.neutral.alphaGrey10005,
|
||||
primaryAlpha5Hover: colorScheme.neutral.alphaGrey100010,
|
||||
primaryAlpha80: colorScheme.neutral.alphaGrey100080,
|
||||
primaryAlpha80Hover: colorScheme.neutral.alphaGrey100070,
|
||||
|
|
|
@ -69,7 +69,16 @@
|
|||
"logIn": "Log in",
|
||||
"generalError": "Something went wrong. Please try again later",
|
||||
"limitRateError": "For security reasons, you can only request a magic link every 60 seconds",
|
||||
"magicLinkSentDescription": "A Magic Link was sent to your email. Click the link to complete your login. The link will expire after 5 minutes."
|
||||
"magicLinkSentDescription": "A Magic Link was sent to your email. Click the link to complete your login. The link will expire after 5 minutes.",
|
||||
"tokenHasExpiredOrInvalid": "The token has expired or is invalid. Please try again.",
|
||||
"signingIn": "Signing in...",
|
||||
"checkYourEmail": "Check your email",
|
||||
"temporaryVerificationSent": "A temporary verification link has been sent. Please check your inbox at",
|
||||
"continueToSignIn": "Continue to sign in",
|
||||
"backToLogin": "Back to login",
|
||||
"enterCode": "Enter code",
|
||||
"enterCodeManually": "Enter code manually",
|
||||
"continueWithEmail": "Continue with email"
|
||||
},
|
||||
"workspace": {
|
||||
"chooseWorkspace": "Choose your workspace",
|
||||
|
@ -3210,4 +3219,4 @@
|
|||
"rewrite": "Rewrite",
|
||||
"insertBelow": "Insert below"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue