Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(i18n): amplify tips #10443

Merged
merged 1 commit into from Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/amplify/src/LSAuthenticator.tsx
Expand Up @@ -5,8 +5,8 @@ export function LSAuthenticator({ termsLink, children }: any) {
<Authenticator
formFields={{
signUp: {
email: { order: 1 },
username: { order: 2 },
email: { order: 1, isRequired: true },
username: { order: 2, isRequired: true },
password: { order: 3 },
confirm_password: { order: 4 },
},
Expand Down
7 changes: 6 additions & 1 deletion packages/amplify/src/amplify.ts
Expand Up @@ -7,14 +7,19 @@ import { dict } from 'aws-amplify-react/lib-esm/AmplifyI18n'
dict.zh['Reset Password'] = '重置密码'
dict.zh['Enter your email'] = '请输入邮箱'
dict.zh['Enter your password'] = '请输入密码'
dict.zh['Enter your Username'] = '请输入用户名'
dict.zh['Confirm Password'] = '确认密码'
dict.zh['Please confirm your Password'] = '请确认密码'
dict.zh['Incorrect username or password.'] = '用户名或者密码不正确。如果您的邮箱未验证,请尝试使用用户名(非邮箱)登录,以保证再次邮箱验证流程。'
dict.zh['User already exists'] = '用户名已经存在'
dict.zh['Username or Email'] = '用户名或邮箱'
dict.zh['Enter your Username or Email'] = '请输入用户名或邮箱'

// @ts-ignore attach defaults
dict.en = {
'Incorrect username or password.': 'Incorrect username or password! ' +
'For unconfirmed users, please input your username instead of Email to receive the code.'
'For unconfirmed users, please input your username instead of Email to receive the code.',
'User already exists': 'Username already exists'
}

const fixesMapping = {
Expand Down