فهرست منبع

improved i18n

kaori 4 سال پیش
والد
کامیت
c0e6d3d5f6

+ 4 - 2
resource/locales/en_US/translation.json

@@ -846,13 +846,15 @@
   },
   "forgot_password":{
     "forgot_password": "Forgot Password?",
-    "send_email": "Send",
+    "send": "Send",
     "return_to_login": "Return to login",
     "reset_password": "Reset Password",
     "sign_in_instead": "Sign in instead",
     "password_reset_request_desc": "You can reset your password here.",
     "password_reset_excecution_desc": "Enter a new password",
     "new_password": "New Password",
-    "confirm_new_password": "Confirm the new password"
+    "confirm_new_password": "Confirm the new password",
+    "email_is_required": "Email is required",
+    "success_to_send_email": "Success to send email"
   }
 }

+ 4 - 2
resource/locales/ja_JP/translation.json

@@ -840,13 +840,15 @@
   },
   "forgot_password":{
     "forgot_password": "パスワードをお忘れですか?",
-    "send_email": "送信",
+    "send": "送信",
     "return_to_login": "ログイン画面に戻る",
     "reset_password": "パスワード リセット",
     "sign_in_instead": "ログインする",
     "password_reset_request_desc": "ここからパスワードリセットできます",
     "password_reset_excecution_desc": "新しいパスワードを入力してください",
     "new_password": "新しいパスワード",
-    "confirm_new_password": "新しいパスワードの確認"
+    "confirm_new_password": "新しいパスワードの確認",
+    "email_is_required": "メールを入力してください",
+    "success_to_send_email": "メールを送信しました"
   }
 }

+ 4 - 2
resource/locales/zh_CN/translation.json

@@ -851,13 +851,15 @@
   },
   "forgot_password":{
     "forgot_password": "忘记密码?",
-    "send_email": "发送",
+    "send": "发送",
     "return_to_login": "返回登录",
     "reset_password": "重设密码",
     "sign_in_instead": "改为登录",
     "password_reset_request_desc": "您可以在此处重置密码",
     "password_reset_excecution_desc": "输入新的密码",
     "new_password": "新密码",
-    "confirm_new_password": "确认新密码"
+    "confirm_new_password": "确认新密码",
+    "email_is_required": "电子邮件是必需的",
+    "success_to_send_email": "我发了一封电子邮件"
   }
 }

+ 4 - 3
src/client/js/components/PasswordResetRequestForm.jsx

@@ -1,7 +1,7 @@
 import React, { useState } from 'react';
 import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
-import { /* toastSuccess, */ toastError } from '../util/apiNotification';
+import { toastSuccess, toastError } from '../util/apiNotification';
 
 import AppContainer from '../services/AppContainer';
 import { withUnstatedContainers } from './UnstatedUtils';
@@ -19,12 +19,13 @@ const PasswordResetRequestForm = (props) => {
   const sendPasswordResetRequestMail = async(e) => {
     e.preventDefault();
     if (email == null) {
-      toastError('err', 'Email is required.');
+      toastError('err', t('forgot_password.email_is_required'));
       return;
     }
 
     try {
       await appContainer.apiPost('/forgot-password', { email });
+      toastSuccess(t('forgot_password.success_to_send_email'));
     }
     catch (err) {
       toastError('err', err);
@@ -43,7 +44,7 @@ const PasswordResetRequestForm = (props) => {
           className="btn btn-lg btn-primary btn-block"
           type="submit"
         >
-          Reset Password
+          {t('forgot_password.send')}
         </button>
       </div>
       <a href="/login">