0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-17 22:31:28 -05:00

Merge pull request #2087 from logto-io/simeng-log-4347

chore(ui): update content
This commit is contained in:
simeng-li 2022-10-11 19:22:33 +08:00 committed by GitHub
commit ad5b7b1aea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 26 deletions

View file

@ -16,16 +16,17 @@ const translation = {
continue: 'Continue',
create_account: 'Create Account',
create: 'Create',
enter_passcode: 'Enter Passcode',
enter_passcode: 'Enter verification code',
confirm: 'Confirm',
cancel: 'Cancel',
save_password: 'Save',
bind: 'Link with {{address}}',
back: 'Go Back',
nav_back: 'Back',
agree: 'Agree',
got_it: 'Got it',
sign_in_with: 'Sign in with {{name}}',
forgot_password: 'Forgot Password?',
forgot_password: 'Forgot your password?',
switch_to: 'Switch to {{method}}',
},
description: {
@ -38,10 +39,10 @@ const translation = {
terms_of_use: 'Terms of Use',
create_account: 'Create Account',
or: 'or',
enter_passcode: 'The passcode has been sent to your {{address}}',
passcode_sent: 'The passcode has been resent',
enter_passcode: 'The verification code has been sent to your {{address}}',
passcode_sent: 'The verification code has been resent',
resend_after_seconds: 'Resend after <span>{{seconds}}</span> seconds',
resend_passcode: 'Resend Passcode',
resend_passcode: 'Resend verification code',
continue_with: 'Continue with',
create_account_id_exists:
'The account with {{type}} {{value}} already exists, would you like to sign in?',
@ -51,11 +52,11 @@ const translation = {
social_create_account: 'No account? You can create a new account and link.',
social_bind_account: 'Already have an account? Sign in to link it with your social identity.',
social_bind_with_existing: 'We find a related account, you can link it directly.',
reset_password: 'Reset Password',
reset_password: 'Reset password',
reset_password_description_email:
'Enter the email address associated with your account, and well email you the verification code to reset your password.',
reset_password_description_sms:
'Enter the phone number associated with your account, and well text you the verification code to reset your password.',
'Enter the phone number associated with your account, and well message you the verification code to reset your password.',
new_password: 'New password',
password_changed: 'Password Changed',
},
@ -69,8 +70,8 @@ const translation = {
invalid_email: 'The email is invalid',
invalid_phone: 'The phone number is invalid',
password_min_length: 'Password requires a minimum of {{min}} characters',
passwords_do_not_match: 'Passwords do not match',
invalid_passcode: 'The passcode is invalid',
passwords_do_not_match: 'Your passwords dont match. Please try again.',
invalid_passcode: 'The verification code is invalid',
invalid_connector_auth: 'The authorization is invalid',
invalid_connector_request: 'The connector data is invalid',
unknown: 'Unknown error. Please try again later.',

View file

@ -21,6 +21,7 @@ const translation = {
enter_passcode: 'Entrer le code',
confirm: 'Confirmer',
cancel: 'Annuler',
save_password: 'Save', // UNTRANSLATED
bind: 'Lier avec {{address}}',
back: 'Aller en arrière',
nav_back: 'Retour',

View file

@ -21,6 +21,7 @@ const translation = {
enter_passcode: '비밀번호 입력',
confirm: '확인',
cancel: '취소',
save_password: 'Save', // UNTRANSLATED
bind: '{{address}}로 연동',
back: '뒤로 가기',
nav_back: '뒤로',
@ -28,7 +29,7 @@ const translation = {
got_it: '알겠습니다',
sign_in_with: '{{name}} 로그인',
forgot_password: '비밀번호를 잊어버리셨나요?',
switch_to: 'Switch to {{method}}', // TODO: untranslated
switch_to: 'Switch to {{method}}', // UNTRANSLATED
},
description: {
email: '이메일',

View file

@ -21,6 +21,7 @@ const translation = {
enter_passcode: 'Digite a senha',
confirm: 'Confirmar',
cancel: 'Cancelar',
save_password: 'Save', // UNTRANSLATED
bind: 'Agregar a {{address}}',
back: 'Voltar',
nav_back: 'Anterior',

View file

@ -21,6 +21,7 @@ const translation = {
enter_passcode: 'Kodu Gir',
confirm: 'Onayla',
cancel: 'İptal Et',
save_password: 'Save', // UNTRANSLATED
bind: '{{address}} ile birleştir',
back: 'Geri Dön',
nav_back: 'Geri',
@ -28,7 +29,7 @@ const translation = {
got_it: 'Anladım',
sign_in_with: '{{name}} ile giriş yap',
forgot_password: 'Şifremi Unuttum?',
switch_to: 'Switch to {{method}}', // TODO: not translated
switch_to: 'Switch to {{method}}', // UNTRANSLATED
},
description: {
email: 'e-posta adresi',

View file

@ -21,14 +21,15 @@ const translation = {
enter_passcode: '输入验证码',
cancel: '取消',
confirm: '确认',
save_password: '保存密码',
bind: '绑定到 {{address}}',
back: '返回',
nav_back: '返回',
agree: '同意',
got_it: '知道了',
sign_in_with: '通过 {{name}} 登录',
forgot_password: '忘记密码?',
switch_to: '切换到{{method}}',
forgot_password: '重置密码',
switch_to: '用{{method}}登录',
},
description: {
email: '邮箱',
@ -51,13 +52,11 @@ const translation = {
social_create_account: '没有帐号?你可以创建一个帐号并绑定。',
social_bind_account: '已有帐号?登录以绑定社交身份。',
social_bind_with_existing: '找到了一个匹配的帐号,你可以直接绑定。',
reset_password: '重置密码',
reset_password_description_email:
'输入与你的帐户关联的电子邮箱地址,我们将通过电子邮件向您发送验证码以重置你的密码。',
reset_password_description_sms:
'输入与你的帐户关联的电话号码,我们将向您发送验证码以重置你的密码。',
reset_password: '重设密码',
reset_password_description_email: '输入邮件地址,领取验证码以重设密码。',
reset_password_description_sms: '输入手机号,领取验证码以重设密码。',
new_password: '新密码',
password_changed: 'Password Changed', // UNTRANSLATED
password_changed: '已重置密码!',
},
error: {
username_password_mismatch: '用户名和密码不匹配',
@ -69,7 +68,7 @@ const translation = {
invalid_email: '无效的邮箱',
invalid_phone: '无效的手机号',
password_min_length: '密码最少需要{{min}}个字符',
passwords_do_not_match: '密码不匹配',
passwords_do_not_match: '你两次输入的密码不一致,请立即确认。',
invalid_passcode: '无效的验证码',
invalid_connector_auth: '登录失败',
invalid_connector_request: '无效的登录请求',

View file

@ -21,12 +21,12 @@ describe('<ResetPassword />', () => {
const { queryByText, container } = renderWithPageContext(<ResetPassword />);
expect(container.querySelector('input[name="new-password"]')).not.toBeNull();
expect(container.querySelector('input[name="confirm-new-password"]')).not.toBeNull();
expect(queryByText('action.confirm')).not.toBeNull();
expect(queryByText('action.save_password')).not.toBeNull();
});
test('password are required', () => {
const { queryByText, getByText } = renderWithPageContext(<ResetPassword />);
const submitButton = getByText('action.confirm');
const submitButton = getByText('action.save_password');
fireEvent.click(submitButton);
expect(queryByText('password_required')).not.toBeNull();
@ -35,7 +35,7 @@ describe('<ResetPassword />', () => {
test('password less than 6 chars should throw', () => {
const { queryByText, getByText, container } = renderWithPageContext(<ResetPassword />);
const submitButton = getByText('action.confirm');
const submitButton = getByText('action.save_password');
const passwordInput = container.querySelector('input[name="new-password"]');
if (passwordInput) {
@ -62,7 +62,7 @@ describe('<ResetPassword />', () => {
test('password mismatch with confirmPassword should throw', () => {
const { queryByText, getByText, container } = renderWithPageContext(<ResetPassword />);
const submitButton = getByText('action.confirm');
const submitButton = getByText('action.save_password');
const passwordInput = container.querySelector('input[name="new-password"]');
const confirmPasswordInput = container.querySelector('input[name="confirm-new-password"]');
@ -94,7 +94,7 @@ describe('<ResetPassword />', () => {
test('should submit properly', async () => {
const { queryByText, getByText, container } = renderWithPageContext(<ResetPassword />);
const submitButton = getByText('action.confirm');
const submitButton = getByText('action.save_password');
const passwordInput = container.querySelector('input[name="new-password"]');
const confirmPasswordInput = container.querySelector('input[name="confirm-new-password"]');

View file

@ -118,7 +118,7 @@ const ResetPassword = ({ className, autoFocus }: Props) => {
<ErrorMessage className={styles.formErrors}>{formErrorMessage}</ErrorMessage>
)}
<Button title="action.confirm" onClick={async () => onSubmitHandler()} />
<Button title="action.save_password" onClick={async () => onSubmitHandler()} />
<input hidden type="submit" />
</form>