diff --git a/public/locales/en-US/dashboard.json b/public/locales/en-US/dashboard.json
index b892f8a..af541e8 100644
--- a/public/locales/en-US/dashboard.json
+++ b/public/locales/en-US/dashboard.json
@@ -88,6 +88,36 @@
"webauthnDes": "Whether to allow users to log in using a hardware authenticator, the website must enable HTTPS for this to work.",
"webauthn": "Hardware authenticator",
"defaultGroup": "Default group",
- "defaultGroupDes": "The initial user group after user registration."
+ "defaultGroupDes": "The initial user group after user registration.",
+ "testMailSent": "Test email is sent.",
+ "testSMTPSettings": "Test SMTP settings",
+ "testSMTPTooltip": "Before sending a test email, please save the changed SMTP settings; the email delivery results will not be fed back immediately, if you do not receive a test email for a long time, please check the error log output by Cloudreve in the terminal.",
+ "recipient": "Recipient",
+ "send": "Send",
+ "smtp": "SMTP",
+ "senderName": "Sender name",
+ "senderNameDes": "The sender's name displayed in the email.",
+ "senderAddress": "Sender address",
+ "senderAddressDes": "Email address of the sender.",
+ "smtpServer": "SMTP server",
+ "smtpServerDes": "SMTP server address, without port number.",
+ "smtpPort": "SMTP Port",
+ "smtpPortDes": "Port of SMTP server.",
+ "smtpUsername": "SMTP Username",
+ "smtpUsernameDes": "SMTP username, generally the same as the sender address.",
+ "smtpPassword": "SMTP Password",
+ "smtpPasswordDes": "Password of the sender mailbox.",
+ "replyToAddress": "Reply to address",
+ "replyToAddressDes": "The mailbox used to receive reply emails when users reply to emails sent by the system.",
+ "enforceSSL": "Enforce SSL connection",
+ "enforceSSLDes": "Whether to enforce an SSL encrypted connection. If you cannot send emails, you can turn this off and Cloudreve will try to use STARTTLS and decide whether to use encrypted connections.",
+ "smtpTTL": "SMTP connection TTL (seconds)",
+ "smtpTTLDes": "SMTP connections established during the TTL period will be reused by new mail delivery requests.",
+ "emailTemplates": "Email templates",
+ "activateNewUser": "Activate new user",
+ "activateNewUserDes": "Template for activation email after new user registration.",
+ "resetPassword": "Reset password",
+ "resetPasswordDes": "Template reset password.",
+ "sendTestEmail": "Send test email"
}
}
\ No newline at end of file
diff --git a/public/locales/zh-CN/dashboard.json b/public/locales/zh-CN/dashboard.json
index d3e09c1..85969e9 100644
--- a/public/locales/zh-CN/dashboard.json
+++ b/public/locales/zh-CN/dashboard.json
@@ -88,6 +88,36 @@
"webauthnDes": "是否允许用户使用绑定的外部验证器登录,站点必须启动 HTTPS 才能使用。",
"webauthn": "外部验证器登录",
"defaultGroup": "默认用户组",
- "defaultGroupDes": "用户注册后的初始用户组"
+ "defaultGroupDes": "用户注册后的初始用户组",
+ "testMailSent": "测试邮件已发送",
+ "testSMTPSettings": "发件测试",
+ "testSMTPTooltip": "发送测试邮件前,请先保存已更改的邮件设置;邮件发送结果不会立即反馈,如果您长时间未收到测试邮件,请检查 Cloudreve 在终端输出的错误日志。",
+ "recipient": "收件人地址",
+ "send": "发送",
+ "smtp": "发信",
+ "senderName": "发件人名",
+ "senderNameDes": "邮件中展示的发件人姓名",
+ "senderAddress": "发件人邮箱",
+ "senderAddressDes": "发件邮箱的地址",
+ "smtpServer": "SMTP 服务器",
+ "smtpServerDes": "发件服务器地址,不含端口号",
+ "smtpPort": "SMTP 端口",
+ "smtpPortDes": "发件服务器地址端口号",
+ "smtpUsername": "SMTP 用户名",
+ "smtpUsernameDes": "发信邮箱用户名,一般与邮箱地址相同",
+ "smtpPassword": "SMTP 密码",
+ "smtpPasswordDes": "发信邮箱密码",
+ "replyToAddress": "回信邮箱",
+ "replyToAddressDes": "用户回复系统发送的邮件时,用于接收回信的邮箱",
+ "enforceSSL": "强制使用 SSL 连接",
+ "enforceSSLDes": "是否强制使用 SSL 加密连接。如果无法发送邮件,可关闭此项, Cloudreve 会尝试使用 STARTTLS 并决定是否使用加密连接",
+ "smtpTTL": "SMTP 连接有效期 (秒)",
+ "smtpTTLDes": "有效期内建立的 SMTP 连接会被新邮件发送请求复用",
+ "emailTemplates": "邮件模板",
+ "activateNewUser": "新用户激活",
+ "activateNewUserDes": "新用户注册后激活邮件的模板",
+ "resetPassword": "重置密码",
+ "resetPasswordDes": "密码重置邮件模板",
+ "sendTestEmail": "发送测试邮件"
}
}
\ No newline at end of file
diff --git a/src/Admin.js b/src/Admin.js
index d26cceb..75beaf1 100644
--- a/src/Admin.js
+++ b/src/Admin.js
@@ -52,6 +52,18 @@ const theme = createTheme(
palette: {
background: {},
},
+ overrides: {
+ MuiButton: {
+ root: {
+ textTransform: "none",
+ },
+ },
+ MuiTab: {
+ root: {
+ textTransform: "none",
+ },
+ },
+ },
},
zhCN
);
diff --git a/src/component/Admin/Setting/Mail.js b/src/component/Admin/Setting/Mail.js
index 943f566..8d7e10f 100644
--- a/src/component/Admin/Setting/Mail.js
+++ b/src/component/Admin/Setting/Mail.js
@@ -17,6 +17,7 @@ import { toggleSnackbar } from "../../../redux/explorer";
import API from "../../../middleware/Api";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Switch from "@material-ui/core/Switch";
+import { useTranslation } from "react-i18next";
const useStyles = makeStyles((theme) => ({
root: {
@@ -41,6 +42,9 @@ const useStyles = makeStyles((theme) => ({
}));
export default function Mail() {
+ const { t } = useTranslation("dashboard", { keyPrefix: "settings" });
+ const { t: tVas } = useTranslation("dashboard", { keyPrefix: "vas" });
+ const { t: tGlobal } = useTranslation("common");
const classes = useStyles();
const [loading, setLoading] = useState(false);
const [test, setTest] = useState(false);
@@ -103,7 +107,7 @@ export default function Mail() {
to: tesInput,
})
.then(() => {
- ToggleSnackbar("top", "right", "测试邮件已发送", "success");
+ ToggleSnackbar("top", "right", t("testMailSent"), "success");
})
.catch((error) => {
ToggleSnackbar("top", "right", error.message, "error");
@@ -138,7 +142,7 @@ export default function Mail() {
options: option,
})
.then(() => {
- ToggleSnackbar("top", "right", "设置已更改", "success");
+ ToggleSnackbar("top", "right", t("saved"), "success");
reload();
})
.catch((error) => {
@@ -156,22 +160,18 @@ export default function Mail() {
onClose={() => setTest(false)}
aria-labelledby="form-dialog-title"
>
-