fix: i18n
This commit is contained in:
parent
896fd7f9ce
commit
c04a4049c5
|
@ -8,6 +8,7 @@ import io.metersphere.commons.constants.ParamConstants;
|
|||
import io.metersphere.commons.utils.EncryptUtils;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.dto.LoadTestDTO;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.service.SystemParameterService;
|
||||
import io.metersphere.service.UserService;
|
||||
import io.metersphere.track.request.testreview.SaveCommentRequest;
|
||||
|
@ -80,8 +81,9 @@ public class MailService {
|
|||
"</head>\n" +
|
||||
"<body style=\"text-align: left\">\n" +
|
||||
" <div>\n" +
|
||||
" <h3>" + type + "定时任务结果通知</h3>\n" +
|
||||
" <p> 尊敬的用户:您好,您所执行的" + testName + "运行失败</p>\n" +
|
||||
" <h3>" + type + Translator.get("timing_task_result_notification") + "</h3>\n" +
|
||||
" <p> 尊敬的用户:您好,<p><br/>" +
|
||||
"<p>您所执行的" + testName + "运行失败</p>\n" +
|
||||
" </div>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
|
@ -93,7 +95,7 @@ public class MailService {
|
|||
"</head>\n" +
|
||||
"<body style=\"text-align: left\">\n" +
|
||||
" <div>\n" +
|
||||
" <h3>" + type + "定时任务结果通知</h3>\n" +
|
||||
" <h3>" + type + Translator.get("timing_task_result_notification") + "</h3>\n" +
|
||||
" <p> 尊敬的用户:您好," + testName + "运行成功</p>\n" +
|
||||
" </div>\n" +
|
||||
"</body>\n" +
|
||||
|
@ -101,7 +103,7 @@ public class MailService {
|
|||
try {
|
||||
MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
|
||||
helper.setFrom(javaMailSender.getUsername());
|
||||
helper.setSubject("MeterSphere定时任务结果通知");
|
||||
helper.setSubject(Translator.get("timing_task_result_notification"));
|
||||
String users[] = {};
|
||||
List<String> successEmailList = new ArrayList<>();
|
||||
List<String> failEmailList = new ArrayList<>();
|
||||
|
@ -130,12 +132,12 @@ public class MailService {
|
|||
helper.setTo(users);
|
||||
|
||||
} catch (MessagingException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.error(e);
|
||||
}
|
||||
try {
|
||||
javaMailSender.send(mimeMessage);
|
||||
} catch (MailException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +190,7 @@ public class MailService {
|
|||
"</head>\n" +
|
||||
"<body style=\"text-align: left\">\n" +
|
||||
" <div>\n" +
|
||||
" <p>" + reviewRequest.getCreator() + "发起的" + reviewRequest.getName() + "的计划开始时间是" + start + ",计划结束时间为" + end + "请跟进" + "</p>\n" +
|
||||
" <p>" + reviewRequest.getCreator() + "发起的:" + "</p><br/>" + reviewRequest.getName() + "</p><br/>" + "计划开始时间是" + start + ",计划结束时间为" + end + "请跟进" + "</p>\n" +
|
||||
" </div>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
|
@ -200,7 +202,7 @@ public class MailService {
|
|||
"</head>\n" +
|
||||
"<body style=\"text-align: left\">\n" +
|
||||
" <div>\n" +
|
||||
" <p>" + testCaseWithBLOBs.getMaintainer() + "发起的" + testCaseWithBLOBs.getName() + "添加评论:" + request.getDescription() + "</p>\n" +
|
||||
" <p>" + testCaseWithBLOBs.getMaintainer() + "发起的" + "</p><br/>" + testCaseWithBLOBs.getName() + "</p><br/>" + "添加评论:" + request.getDescription() + "</p>\n" +
|
||||
" </div>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
|
@ -212,15 +214,14 @@ public class MailService {
|
|||
"</head>\n" +
|
||||
"<body style=\"text-align: left\">\n" +
|
||||
" <div>\n" +
|
||||
" <p>" + reviewRequest.getCreator() + "发起的" + reviewRequest.getName() + "的计划开始时间是" + start + ",计划结束时间为" + end + "已完成" + "</p>\n" +
|
||||
" <p>" + reviewRequest.getCreator() + "发起的:" + "</p><br/>" + reviewRequest.getName() + "</p><br/>" + "计划开始时间是" + start + ",计划结束时间为" + end + "已完成" + "</p>\n" +
|
||||
" </div>\n" +
|
||||
"</body>\n" +
|
||||
"</html>";
|
||||
;
|
||||
try {
|
||||
MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
|
||||
helper.setFrom(javaMailSender.getUsername());
|
||||
helper.setSubject("测试评审任务通知");
|
||||
helper.setSubject(Translator.get("test_review_task_notice"));
|
||||
String users[] = {};
|
||||
List<String> emails = new ArrayList<>();
|
||||
try {
|
||||
|
@ -239,12 +240,12 @@ public class MailService {
|
|||
helper.setTo(users);
|
||||
|
||||
} catch (MessagingException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.error(e);
|
||||
}
|
||||
try {
|
||||
javaMailSender.send(mimeMessage);
|
||||
} catch (MailException e) {
|
||||
e.printStackTrace();
|
||||
LogUtil.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,8 +151,9 @@ quota_max_threads_excess_workspace=The maximum number of concurrent threads exce
|
|||
quota_max_threads_excess_organization=The maximum number of concurrent threads exceeds the organization quota
|
||||
quota_duration_excess_workspace=The stress test duration exceeds the work space quota
|
||||
quota_duration_excess_organization=The stress test duration exceeds the organization quota
|
||||
|
||||
email_subject=Metersphere timing task result notification
|
||||
import_xmind_count_error=The number of use cases imported into the mind map cannot exceed 500
|
||||
import_xmind_not_found=Test case not found
|
||||
license_valid_license_error=Authorization authentication failed
|
||||
timing_task_result_notification="Timing task result notification"
|
||||
test_review_task_notice="Test review task notice"
|
||||
|
|
|
@ -155,6 +155,7 @@ email_subject=MeterSphere定时任务结果通知
|
|||
import_xmind_count_error=思维导图导入用例数量不能超过 500 条
|
||||
license_valid_license_error=授权认证失败
|
||||
import_xmind_not_found=未找到测试用例
|
||||
|
||||
timing_task_result_notification="定时任务结果通知"
|
||||
test_review_task_notice="测试评审任务通知"
|
||||
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@ quota_duration_excess_workspace=壓測時長超過工作空間限額
|
|||
quota_duration_excess_organization=壓測時長超過組織限額
|
||||
license_valid_license_error=授權驗證失敗
|
||||
license_valid_license_code=授權碼已經存在
|
||||
|
||||
|
||||
email_subject=MeterSphere定時任務結果通知
|
||||
import_xmind_count_error=思維導圖導入用例數量不能超過 500 條
|
||||
import_xmind_not_found=未找到测试用例
|
||||
timing_task_result_notification="定時任務結果通知"
|
||||
test_review_task_notice="測試評審任務通知"
|
Loading…
Reference in New Issue