Browse Source

后端代码国际化定制

xuxueli 8 years ago
parent
commit
54f6c050c5

+ 3 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/IndexController.java View File

@@ -2,6 +2,7 @@ package com.xxl.job.admin.controller;
2 2
 
3 3
 import com.xxl.job.admin.controller.annotation.PermessionLimit;
4 4
 import com.xxl.job.admin.controller.interceptor.PermissionInterceptor;
5
+import com.xxl.job.admin.core.util.I18nUtil;
5 6
 import com.xxl.job.admin.service.XxlJobService;
6 7
 import com.xxl.job.core.biz.model.ReturnT;
7 8
 import org.apache.commons.lang3.StringUtils;
@@ -67,14 +68,14 @@ public class IndexController {
67 68
 
68 69
 		// param
69 70
 		if (StringUtils.isBlank(userName) || StringUtils.isBlank(password)){
70
-			return new ReturnT<String>(500, "账号或密码为空");
71
+			return new ReturnT<String>(500, I18nUtil.getString("login_param_empty"));
71 72
 		}
72 73
 		boolean ifRem = (StringUtils.isNotBlank(ifRemember) && "on".equals(ifRemember))?true:false;
73 74
 
74 75
 		// do login
75 76
 		boolean loginRet = PermissionInterceptor.login(response, userName, password, ifRem);
76 77
 		if (!loginRet) {
77
-			return new ReturnT<String>(500, "账号或密码错误");
78
+			return new ReturnT<String>(500, I18nUtil.getString("login_param_unvalid"));
78 79
 		}
79 80
 		return ReturnT.SUCCESS;
80 81
 	}

+ 6 - 5
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java View File

@@ -2,6 +2,7 @@ package com.xxl.job.admin.controller;
2 2
 
3 3
 import com.xxl.job.admin.core.model.XxlJobInfo;
4 4
 import com.xxl.job.admin.core.model.XxlJobLogGlue;
5
+import com.xxl.job.admin.core.util.I18nUtil;
5 6
 import com.xxl.job.admin.dao.XxlJobInfoDao;
6 7
 import com.xxl.job.admin.dao.XxlJobLogGlueDao;
7 8
 import com.xxl.job.core.biz.model.ReturnT;
@@ -34,10 +35,10 @@ public class JobCodeController {
34 35
 		List<XxlJobLogGlue> jobLogGlues = xxlJobLogGlueDao.findByJobId(jobId);
35 36
 
36 37
 		if (jobInfo == null) {
37
-			throw new RuntimeException("抱歉,任务不存在.");
38
+			throw new RuntimeException(I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
38 39
 		}
39 40
 		if (GlueTypeEnum.BEAN == GlueTypeEnum.match(jobInfo.getGlueType())) {
40
-			throw new RuntimeException("该任务非GLUE模式.");
41
+			throw new RuntimeException(I18nUtil.getString("jobinfo_glue_gluetype_unvalid"));
41 42
 		}
42 43
 
43 44
 		// Glue类型-字典
@@ -53,14 +54,14 @@ public class JobCodeController {
53 54
 	public ReturnT<String> save(Model model, int id, String glueSource, String glueRemark) {
54 55
 		// valid
55 56
 		if (glueRemark==null) {
56
-			return new ReturnT<String>(500, "请输入备注");
57
+			return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark")) );
57 58
 		}
58 59
 		if (glueRemark.length()<4 || glueRemark.length()>100) {
59
-			return new ReturnT<String>(500, "备注长度应该在4至100之间");
60
+			return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit"));
60 61
 		}
61 62
 		XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(id);
62 63
 		if (exists_jobInfo == null) {
63
-			return new ReturnT<String>(500, "参数异常");
64
+			return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
64 65
 		}
65 66
 		
66 67
 		// update new code

+ 15 - 14
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java View File

@@ -1,6 +1,7 @@
1 1
 package com.xxl.job.admin.controller;
2 2
 
3 3
 import com.xxl.job.admin.core.model.XxlJobGroup;
4
+import com.xxl.job.admin.core.util.I18nUtil;
4 5
 import com.xxl.job.admin.dao.XxlJobGroupDao;
5 6
 import com.xxl.job.admin.dao.XxlJobInfoDao;
6 7
 import com.xxl.job.core.biz.model.ReturnT;
@@ -42,22 +43,22 @@ public class JobGroupController {
42 43
 
43 44
 		// valid
44 45
 		if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) {
45
-			return new ReturnT<String>(500, "请输入AppName");
46
+			return new ReturnT<String>(500, (I18nUtil.getString("system_please_input")+"AppName") );
46 47
 		}
47
-		if (xxlJobGroup.getAppName().length()>64) {
48
-			return new ReturnT<String>(500, "AppName长度限制为4~64");
48
+		if (xxlJobGroup.getAppName().length()<4 || xxlJobGroup.getAppName().length()>64) {
49
+			return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_appName_length") );
49 50
 		}
50 51
 		if (xxlJobGroup.getTitle()==null || StringUtils.isBlank(xxlJobGroup.getTitle())) {
51
-			return new ReturnT<String>(500, "请输入名称");
52
+			return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) );
52 53
 		}
53 54
 		if (xxlJobGroup.getAddressType()!=0) {
54 55
 			if (StringUtils.isBlank(xxlJobGroup.getAddressList())) {
55
-				return new ReturnT<String>(500, "手动录入注册方式,机器地址不可为空");
56
+				return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") );
56 57
 			}
57 58
 			String[] addresss = xxlJobGroup.getAddressList().split(",");
58 59
 			for (String item: addresss) {
59 60
 				if (StringUtils.isBlank(item)) {
60
-					return new ReturnT<String>(500, "机器地址非法");
61
+					return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") );
61 62
 				}
62 63
 			}
63 64
 		}
@@ -71,22 +72,22 @@ public class JobGroupController {
71 72
 	public ReturnT<String> update(XxlJobGroup xxlJobGroup){
72 73
 		// valid
73 74
 		if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) {
74
-			return new ReturnT<String>(500, "请输入AppName");
75
+			return new ReturnT<String>(500, (I18nUtil.getString("system_please_input")+"AppName") );
75 76
 		}
76
-		if (xxlJobGroup.getAppName().length()>64) {
77
-			return new ReturnT<String>(500, "AppName长度限制为4~64");
77
+		if (xxlJobGroup.getAppName().length()<4 || xxlJobGroup.getAppName().length()>64) {
78
+			return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_appName_length") );
78 79
 		}
79 80
 		if (xxlJobGroup.getTitle()==null || StringUtils.isBlank(xxlJobGroup.getTitle())) {
80
-			return new ReturnT<String>(500, "请输入名称");
81
+			return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) );
81 82
 		}
82 83
 		if (xxlJobGroup.getAddressType()!=0) {
83 84
 			if (StringUtils.isBlank(xxlJobGroup.getAddressList())) {
84
-				return new ReturnT<String>(500, "手动录入注册方式,机器地址不可为空");
85
+				return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") );
85 86
 			}
86 87
 			String[] addresss = xxlJobGroup.getAddressList().split(",");
87 88
 			for (String item: addresss) {
88 89
 				if (StringUtils.isBlank(item)) {
89
-					return new ReturnT<String>(500, "机器地址非法");
90
+					return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") );
90 91
 				}
91 92
 			}
92 93
 		}
@@ -102,12 +103,12 @@ public class JobGroupController {
102 103
 		// valid
103 104
 		int count = xxlJobInfoDao.pageListCount(0, 10, id, null, null);
104 105
 		if (count > 0) {
105
-			return new ReturnT<String>(500, "该分组使用中, 不可删除");
106
+			return new ReturnT<String>(500, I18nUtil.getString("jobgroup_del_limit_0") );
106 107
 		}
107 108
 
108 109
 		List<XxlJobGroup> allList = xxlJobGroupDao.findAll();
109 110
 		if (allList.size() == 1) {
110
-			return new ReturnT<String>(500, "删除失败, 系统需要至少预留一个默认分组");
111
+			return new ReturnT<String>(500, I18nUtil.getString("jobgroup_del_limit_1") );
111 112
 		}
112 113
 
113 114
 		int ret = xxlJobGroupDao.remove(id);

+ 6 - 5
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java View File

@@ -4,6 +4,7 @@ import com.xxl.job.admin.core.model.XxlJobGroup;
4 4
 import com.xxl.job.admin.core.model.XxlJobInfo;
5 5
 import com.xxl.job.admin.core.model.XxlJobLog;
6 6
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
7
+import com.xxl.job.admin.core.util.I18nUtil;
7 8
 import com.xxl.job.admin.dao.XxlJobGroupDao;
8 9
 import com.xxl.job.admin.dao.XxlJobInfoDao;
9 10
 import com.xxl.job.admin.dao.XxlJobLogDao;
@@ -107,7 +108,7 @@ public class JobLogController {
107 108
 		ReturnT<String> logStatue = ReturnT.SUCCESS;
108 109
 		XxlJobLog jobLog = xxlJobLogDao.load(id);
109 110
 		if (jobLog == null) {
110
-            throw new RuntimeException("抱歉,日志ID非法.");
111
+            throw new RuntimeException(I18nUtil.getString("joblog_logid_unvalid"));
111 112
 		}
112 113
 
113 114
         model.addAttribute("triggerCode", jobLog.getTriggerCode());
@@ -147,10 +148,10 @@ public class JobLogController {
147 148
 		XxlJobLog log = xxlJobLogDao.load(id);
148 149
 		XxlJobInfo jobInfo = xxlJobInfoDao.loadById(log.getJobId());
149 150
 		if (jobInfo==null) {
150
-			return new ReturnT<String>(500, "参数异常");
151
+			return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid"));
151 152
 		}
152 153
 		if (ReturnT.SUCCESS_CODE != log.getTriggerCode()) {
153
-			return new ReturnT<String>(500, "调度失败,无法终止日志");
154
+			return new ReturnT<String>(500, I18nUtil.getString("joblog_kill_log_limit"));
154 155
 		}
155 156
 
156 157
 		// request of kill
@@ -165,7 +166,7 @@ public class JobLogController {
165 166
 
166 167
 		if (ReturnT.SUCCESS_CODE == runResult.getCode()) {
167 168
 			log.setHandleCode(ReturnT.FAIL_CODE);
168
-			log.setHandleMsg("人为操作主动终止:" + (runResult.getMsg()!=null?runResult.getMsg():""));
169
+			log.setHandleMsg( I18nUtil.getString("joblog_kill_log_byman")+":" + (runResult.getMsg()!=null?runResult.getMsg():""));
169 170
 			log.setHandleTime(new Date());
170 171
 			xxlJobLogDao.updateHandleInfo(log);
171 172
 			return new ReturnT<String>(runResult.getMsg());
@@ -199,7 +200,7 @@ public class JobLogController {
199 200
 		} else if (type == 9) {
200 201
 			clearBeforeNum = 0;			// 清理所有日志数据
201 202
 		} else {
202
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "清理类型参数异常");
203
+			return new ReturnT<String>(ReturnT.FAIL_CODE, I18nUtil.getString("joblog_clean_type_unvalid"));
203 204
 		}
204 205
 
205 206
 		xxlJobLogDao.clearLog(jobGroup, jobId, clearBeforeTime, clearBeforeNum);

+ 4 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/enums/ExecutorFailStrategyEnum.java View File

@@ -1,13 +1,15 @@
1 1
 package com.xxl.job.admin.core.enums;
2 2
 
3
+import com.xxl.job.admin.core.util.I18nUtil;
4
+
3 5
 /**
4 6
  * Created by xuxueli on 17/5/9.
5 7
  */
6 8
 public enum ExecutorFailStrategyEnum {
7 9
 
8
-    FAIL_ALARM("失败告警"),
10
+    FAIL_ALARM(I18nUtil.getString("jobconf_fail_alarm")),
9 11
 
10
-    FAIL_RETRY("失败重试");
12
+    FAIL_RETRY(I18nUtil.getString("jobconf_fail_retry"));
11 13
 
12 14
     private final String title;
13 15
     private ExecutorFailStrategyEnum(String title) {

+ 11 - 10
xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/ExecutorRouteStrategyEnum.java View File

@@ -1,22 +1,23 @@
1 1
 package com.xxl.job.admin.core.route;
2 2
 
3 3
 import com.xxl.job.admin.core.route.strategy.*;
4
+import com.xxl.job.admin.core.util.I18nUtil;
4 5
 
5 6
 /**
6 7
  * Created by xuxueli on 17/3/10.
7 8
  */
8 9
 public enum ExecutorRouteStrategyEnum {
9 10
 
10
-    FIRST("第一个", new ExecutorRouteFirst()),
11
-    LAST("最后一个", new ExecutorRouteLast()),
12
-    ROUND("轮询", new ExecutorRouteRound()),
13
-    RANDOM("随机", new ExecutorRouteRandom()),
14
-    CONSISTENT_HASH("一致性HASH", new ExecutorRouteConsistentHash()),
15
-    LEAST_FREQUENTLY_USED("最不经常使用", new ExecutorRouteLFU()),
16
-    LEAST_RECENTLY_USED("最近最久未使用", new ExecutorRouteLRU()),
17
-    FAILOVER("故障转移", new ExecutorRouteFailover()),
18
-    BUSYOVER("忙碌转移", new ExecutorRouteBusyover()),
19
-    SHARDING_BROADCAST("分片广播", null);
11
+    FIRST(I18nUtil.getString("jobconf_route_first"), new ExecutorRouteFirst()),
12
+    LAST(I18nUtil.getString("jobconf_route_last"), new ExecutorRouteLast()),
13
+    ROUND(I18nUtil.getString("jobconf_route_round"), new ExecutorRouteRound()),
14
+    RANDOM(I18nUtil.getString("jobconf_route_random"), new ExecutorRouteRandom()),
15
+    CONSISTENT_HASH(I18nUtil.getString("jobconf_route_consistenthash"), new ExecutorRouteConsistentHash()),
16
+    LEAST_FREQUENTLY_USED(I18nUtil.getString("jobconf_route_lfu"), new ExecutorRouteLFU()),
17
+    LEAST_RECENTLY_USED(I18nUtil.getString("jobconf_route_lru"), new ExecutorRouteLRU()),
18
+    FAILOVER(I18nUtil.getString("jobconf_route_failover"), new ExecutorRouteFailover()),
19
+    BUSYOVER(I18nUtil.getString("jobconf_route_busyover"), new ExecutorRouteBusyover()),
20
+    SHARDING_BROADCAST(I18nUtil.getString("jobconf_route_shard"), null);
20 21
 
21 22
     ExecutorRouteStrategyEnum(String title, ExecutorRouter router) {
22 23
         this.title = title;

+ 2 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteBusyover.java View File

@@ -3,6 +3,7 @@ package com.xxl.job.admin.core.route.strategy;
3 3
 import com.xxl.job.admin.core.route.ExecutorRouter;
4 4
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
5 5
 import com.xxl.job.admin.core.trigger.XxlJobTrigger;
6
+import com.xxl.job.admin.core.util.I18nUtil;
6 7
 import com.xxl.job.core.biz.ExecutorBiz;
7 8
 import com.xxl.job.core.biz.model.ReturnT;
8 9
 import com.xxl.job.core.biz.model.TriggerParam;
@@ -33,7 +34,7 @@ public class ExecutorRouteBusyover extends ExecutorRouter {
33 34
                 idleBeatResult = new ReturnT<String>(ReturnT.FAIL_CODE, ""+e );
34 35
             }
35 36
             idleBeatResultSB.append( (idleBeatResultSB.length()>0)?"<br><br>":"")
36
-                    .append("空闲检测:")
37
+                    .append(I18nUtil.getString("jobconf_idleBeat") + ":")
37 38
                     .append("<br>address:").append(address)
38 39
                     .append("<br>code:").append(idleBeatResult.getCode())
39 40
                     .append("<br>msg:").append(idleBeatResult.getMsg());

+ 2 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteFailover.java View File

@@ -3,6 +3,7 @@ package com.xxl.job.admin.core.route.strategy;
3 3
 import com.xxl.job.admin.core.route.ExecutorRouter;
4 4
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
5 5
 import com.xxl.job.admin.core.trigger.XxlJobTrigger;
6
+import com.xxl.job.admin.core.util.I18nUtil;
6 7
 import com.xxl.job.core.biz.ExecutorBiz;
7 8
 import com.xxl.job.core.biz.model.ReturnT;
8 9
 import com.xxl.job.core.biz.model.TriggerParam;
@@ -33,7 +34,7 @@ public class ExecutorRouteFailover extends ExecutorRouter {
33 34
                 beatResult = new ReturnT<String>(ReturnT.FAIL_CODE, ""+e );
34 35
             }
35 36
             beatResultSB.append( (beatResultSB.length()>0)?"<br><br>":"")
36
-                    .append("心跳检测:")
37
+                    .append(I18nUtil.getString("jobconf_beat") + ":")
37 38
                     .append("<br>address:").append(address)
38 39
                     .append("<br>code:").append(beatResult.getCode())
39 40
                     .append("<br>msg:").append(beatResult.getMsg());

+ 8 - 7
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobFailMonitorHelper.java View File

@@ -4,6 +4,7 @@ import com.xxl.job.admin.core.model.XxlJobGroup;
4 4
 import com.xxl.job.admin.core.model.XxlJobInfo;
5 5
 import com.xxl.job.admin.core.model.XxlJobLog;
6 6
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
7
+import com.xxl.job.admin.core.util.I18nUtil;
7 8
 import com.xxl.job.admin.core.util.MailUtil;
8 9
 import com.xxl.job.core.biz.model.ReturnT;
9 10
 import com.xxl.job.core.handler.IJobHandler;
@@ -119,14 +120,14 @@ public class JobFailMonitorHelper {
119 120
 	// ---------------------- alarm ----------------------
120 121
 
121 122
 	// email alarm template
122
-	private static final String mailBodyTemplate = "<h5>监控告警明细:</span>" +
123
+	private static final String mailBodyTemplate = "<h5>" + I18nUtil.getString("jobconf_monitor_detail") + ":</span>" +
123 124
 			"<table border=\"1\" cellpadding=\"3\" style=\"border-collapse:collapse; width:80%;\" >\n" +
124 125
 			"   <thead style=\"font-weight: bold;color: #ffffff;background-color: #ff8c00;\" >" +
125 126
 			"      <tr>\n" +
126
-			"         <td>执行器</td>\n" +
127
-			"         <td>任务ID</td>\n" +
128
-			"         <td>任务描述</td>\n" +
129
-			"         <td>告警类型</td>\n" +
127
+			"         <td>"+ I18nUtil.getString("jobinfo_field_jobgroup") +"</td>\n" +
128
+			"         <td>"+ I18nUtil.getString("jobinfo_field_id") +"</td>\n" +
129
+			"         <td>"+ I18nUtil.getString("jobinfo_field_jobdesc") +"</td>\n" +
130
+			"         <td>"+ I18nUtil.getString("jobconf_monitor_alarm_title") +"</td>\n" +
130 131
 			"      </tr>\n" +
131 132
 			"   <thead/>\n" +
132 133
 			"   <tbody>\n" +
@@ -134,7 +135,7 @@ public class JobFailMonitorHelper {
134 135
 			"         <td>{0}</td>\n" +
135 136
 			"         <td>{1}</td>\n" +
136 137
 			"         <td>{2}</td>\n" +
137
-			"         <td>调度失败</td>\n" +
138
+			"         <td>"+ I18nUtil.getString("jobconf_monitor_alarm_type") +"</td>\n" +
138 139
 			"      </tr>\n" +
139 140
 			"   <tbody>\n" +
140 141
 			"</table>";
@@ -154,7 +155,7 @@ public class JobFailMonitorHelper {
154 155
 			for (String email: emailSet) {
155 156
 				XxlJobGroup group = XxlJobDynamicScheduler.xxlJobGroupDao.load(Integer.valueOf(info.getJobGroup()));
156 157
 
157
-				String title = "调度中心监控报警";
158
+				String title = I18nUtil.getString("jobconf_monitor");
158 159
 				String content = MessageFormat.format(mailBodyTemplate, group!=null?group.getTitle():"null", info.getId(), info.getJobDesc());
159 160
 
160 161
 				MailUtil.sendMail(email, title, content);

+ 22 - 19
xxl-job-admin/src/main/java/com/xxl/job/admin/core/trigger/XxlJobTrigger.java View File

@@ -7,6 +7,7 @@ import com.xxl.job.admin.core.model.XxlJobLog;
7 7
 import com.xxl.job.admin.core.route.ExecutorRouteStrategyEnum;
8 8
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
9 9
 import com.xxl.job.admin.core.thread.JobFailMonitorHelper;
10
+import com.xxl.job.admin.core.util.I18nUtil;
10 11
 import com.xxl.job.core.biz.ExecutorBiz;
11 12
 import com.xxl.job.core.biz.model.ReturnT;
12 13
 import com.xxl.job.core.biz.model.TriggerParam;
@@ -67,17 +68,18 @@ public class XxlJobTrigger {
67 68
 
68 69
                 ReturnT<String> triggerResult = new ReturnT<String>(null);
69 70
                 StringBuffer triggerMsgSb = new StringBuffer();
70
-                triggerMsgSb.append("调度机器:").append(IpUtil.getIp());
71
-                triggerMsgSb.append("<br>执行器-注册方式:").append( (group.getAddressType() == 0)?"自动注册":"手动录入" );
72
-                triggerMsgSb.append("<br>执行器-地址列表:").append(group.getRegistryList());
73
-                triggerMsgSb.append("<br>路由策略:").append(executorRouteStrategyEnum.getTitle()).append("("+i+"/"+addressList.size()+")"); // update01
74
-                triggerMsgSb.append("<br>阻塞处理策略:").append(blockStrategy.getTitle());
75
-                triggerMsgSb.append("<br>失败处理策略:").append(failStrategy.getTitle());
71
+                triggerMsgSb.append(I18nUtil.getString("jobconf_trigger_admin_adress")).append(":").append(IpUtil.getIp());
72
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regtype")).append(":")
73
+                        .append( (group.getAddressType() == 0)?I18nUtil.getString("jobgroup_field_addressType_0"):I18nUtil.getString("jobgroup_field_addressType_1") );
74
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regaddress")).append(":").append(group.getRegistryList());
75
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorRouteStrategy")).append(":").append(executorRouteStrategyEnum.getTitle()).append("("+i+"/"+addressList.size()+")"); // update01
76
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorBlockStrategy")).append(":").append(blockStrategy.getTitle());
77
+                triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailStrategy")).append(":").append(failStrategy.getTitle());
76 78
 
77 79
                 // 3、trigger-valid
78 80
                 if (triggerResult.getCode()==ReturnT.SUCCESS_CODE && CollectionUtils.isEmpty(addressList)) {
79 81
                     triggerResult.setCode(ReturnT.FAIL_CODE);
80
-                    triggerMsgSb.append("<br>----------------------<br>").append("调度失败:").append("执行器地址为空");
82
+                    triggerMsgSb.append("<br>----------------------<br>").append(I18nUtil.getString("jobconf_trigger_address_empty"));
81 83
                 }
82 84
 
83 85
                 if (triggerResult.getCode() == ReturnT.SUCCESS_CODE) {
@@ -97,12 +99,12 @@ public class XxlJobTrigger {
97 99
 
98 100
                     // 4.2、trigger-run (route run / trigger remote executor)
99 101
                     triggerResult = runExecutor(triggerParam, address);     // update03
100
-                    triggerMsgSb.append("<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>触发调度<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
102
+                    triggerMsgSb.append("<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_trigger_run") +"<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
101 103
 
102 104
                     // 4.3、trigger (fail retry)
103 105
                     if (triggerResult.getCode()!=ReturnT.SUCCESS_CODE && failStrategy == ExecutorFailStrategyEnum.FAIL_RETRY) {
104 106
                         triggerResult = runExecutor(triggerParam, address);  // update04
105
-                        triggerMsgSb.append("<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>失败重试<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
107
+                        triggerMsgSb.append("<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_fail_retry") +"<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
106 108
                     }
107 109
                 }
108 110
 
@@ -134,17 +136,18 @@ public class XxlJobTrigger {
134 136
 
135 137
             ReturnT<String> triggerResult = new ReturnT<String>(null);
136 138
             StringBuffer triggerMsgSb = new StringBuffer();
137
-            triggerMsgSb.append("调度机器:").append(IpUtil.getIp());
138
-            triggerMsgSb.append("<br>执行器-注册方式:").append( (group.getAddressType() == 0)?"自动注册":"手动录入" );
139
-            triggerMsgSb.append("<br>执行器-地址列表:").append(group.getRegistryList());
140
-            triggerMsgSb.append("<br>路由策略:").append(executorRouteStrategyEnum.getTitle());
141
-            triggerMsgSb.append("<br>阻塞处理策略:").append(blockStrategy.getTitle());
142
-            triggerMsgSb.append("<br>失败处理策略:").append(failStrategy.getTitle());
139
+            triggerMsgSb.append(I18nUtil.getString("jobconf_trigger_admin_adress")).append(":").append(IpUtil.getIp());
140
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regtype")).append(":")
141
+                    .append( (group.getAddressType() == 0)?I18nUtil.getString("jobgroup_field_addressType_0"):I18nUtil.getString("jobgroup_field_addressType_1") );
142
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobconf_trigger_exe_regaddress")).append(":").append(group.getRegistryList());
143
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorRouteStrategy")).append(":").append(executorRouteStrategyEnum.getTitle());
144
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorBlockStrategy")).append(":").append(blockStrategy.getTitle());
145
+            triggerMsgSb.append("<br>").append(I18nUtil.getString("jobinfo_field_executorFailStrategy")).append(":").append(failStrategy.getTitle());
143 146
 
144 147
             // 3、trigger-valid
145 148
             if (triggerResult.getCode()==ReturnT.SUCCESS_CODE && CollectionUtils.isEmpty(addressList)) {
146 149
                 triggerResult.setCode(ReturnT.FAIL_CODE);
147
-                triggerMsgSb.append("<br>----------------------<br>").append("调度失败:").append("执行器地址为空");
150
+                triggerMsgSb.append("<br>----------------------<br>").append(I18nUtil.getString("jobconf_trigger_address_empty"));
148 151
             }
149 152
 
150 153
             if (triggerResult.getCode() == ReturnT.SUCCESS_CODE) {
@@ -164,12 +167,12 @@ public class XxlJobTrigger {
164 167
 
165 168
                 // 4.2、trigger-run (route run / trigger remote executor)
166 169
                 triggerResult = executorRouteStrategyEnum.getRouter().routeRun(triggerParam, addressList);
167
-                triggerMsgSb.append("<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>触发调度<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
170
+                triggerMsgSb.append("<br><br><span style=\"color:#00c0ef;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_trigger_run") +"<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
168 171
 
169 172
                 // 4.3、trigger (fail retry)
170 173
                 if (triggerResult.getCode()!=ReturnT.SUCCESS_CODE && failStrategy == ExecutorFailStrategyEnum.FAIL_RETRY) {
171 174
                     triggerResult = executorRouteStrategyEnum.getRouter().routeRun(triggerParam, addressList);
172
-                    triggerMsgSb.append("<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>调度失败重试<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
175
+                    triggerMsgSb.append("<br><br><span style=\"color:#F39C12;\" > >>>>>>>>>>>"+ I18nUtil.getString("jobconf_fail_retry") +"<<<<<<<<<<< </span><br>").append(triggerResult.getMsg());
173 176
                 }
174 177
             }
175 178
 
@@ -202,7 +205,7 @@ public class XxlJobTrigger {
202 205
             runResult = new ReturnT<String>(ReturnT.FAIL_CODE, ""+e );
203 206
         }
204 207
 
205
-        StringBuffer runResultSB = new StringBuffer("触发调度:");
208
+        StringBuffer runResultSB = new StringBuffer(I18nUtil.getString("jobconf_trigger_run") + ":");
206 209
         runResultSB.append("<br>address:").append(address);
207 210
         runResultSB.append("<br>code:").append(runResult.getCode());
208 211
         runResultSB.append("<br>msg:").append(runResult.getMsg());

+ 29 - 24
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java View File

@@ -5,6 +5,7 @@ import com.xxl.job.admin.core.model.XxlJobGroup;
5 5
 import com.xxl.job.admin.core.model.XxlJobInfo;
6 6
 import com.xxl.job.admin.core.route.ExecutorRouteStrategyEnum;
7 7
 import com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler;
8
+import com.xxl.job.admin.core.util.I18nUtil;
8 9
 import com.xxl.job.admin.dao.XxlJobGroupDao;
9 10
 import com.xxl.job.admin.dao.XxlJobInfoDao;
10 11
 import com.xxl.job.admin.dao.XxlJobLogDao;
@@ -71,31 +72,31 @@ public class XxlJobServiceImpl implements XxlJobService {
71 72
 		// valid
72 73
 		XxlJobGroup group = xxlJobGroupDao.load(jobInfo.getJobGroup());
73 74
 		if (group == null) {
74
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请选择“执行器”");
75
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_choose")+I18nUtil.getString("jobinfo_field_jobgroup")) );
75 76
 		}
76 77
 		if (!CronExpression.isValidExpression(jobInfo.getJobCron())) {
77
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入格式正确的“Cron”");
78
+			return new ReturnT<String>(ReturnT.FAIL_CODE, I18nUtil.getString("jobinfo_field_cron_unvalid") );
78 79
 		}
79 80
 		if (StringUtils.isBlank(jobInfo.getJobDesc())) {
80
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入“任务描述”");
81
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input")+I18nUtil.getString("jobinfo_field_jobdesc")) );
81 82
 		}
82 83
 		if (StringUtils.isBlank(jobInfo.getAuthor())) {
83
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入“负责人”");
84
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input")+I18nUtil.getString("jobinfo_field_author")) );
84 85
 		}
85 86
 		if (ExecutorRouteStrategyEnum.match(jobInfo.getExecutorRouteStrategy(), null) == null) {
86
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "路由策略非法");
87
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorRouteStrategy")+I18nUtil.getString("system_unvalid")) );
87 88
 		}
88 89
 		if (ExecutorBlockStrategyEnum.match(jobInfo.getExecutorBlockStrategy(), null) == null) {
89
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "阻塞处理策略非法");
90
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorBlockStrategy")+I18nUtil.getString("system_unvalid")) );
90 91
 		}
91 92
 		if (ExecutorFailStrategyEnum.match(jobInfo.getExecutorFailStrategy(), null) == null) {
92
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "失败处理策略非法");
93
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorFailStrategy")+I18nUtil.getString("system_unvalid")) );
93 94
 		}
94 95
 		if (GlueTypeEnum.match(jobInfo.getGlueType()) == null) {
95
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "运行模式非法非法");
96
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_gluetype")+I18nUtil.getString("system_unvalid")) );
96 97
 		}
97 98
 		if (GlueTypeEnum.BEAN==GlueTypeEnum.match(jobInfo.getGlueType()) && StringUtils.isBlank(jobInfo.getExecutorHandler())) {
98
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入“JobHandler”");
99
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input")+"JobHandler") );
99 100
 		}
100 101
 
101 102
 		// fix "\r" in shell
@@ -110,10 +111,12 @@ public class XxlJobServiceImpl implements XxlJobService {
110 111
 				if (StringUtils.isNotBlank(childJobIdItem) && StringUtils.isNumeric(childJobIdItem)) {
111 112
 					XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.valueOf(childJobIdItem));
112 113
 					if (childJobInfo==null) {
113
-						return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format("子任务ID({0})无效", childJobIdItem));
114
+						return new ReturnT<String>(ReturnT.FAIL_CODE,
115
+								MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_not_found")), childJobIdItem));
114 116
 					}
115 117
 				} else {
116
-					return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format("子任务ID({0})格式错误", childJobIdItem));
118
+					return new ReturnT<String>(ReturnT.FAIL_CODE,
119
+							MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_unvalid")), childJobIdItem));
117 120
 				}
118 121
 			}
119 122
 			jobInfo.setChildJobId(StringUtils.join(childJobIds, ","));
@@ -122,7 +125,7 @@ public class XxlJobServiceImpl implements XxlJobService {
122 125
 		// add in db
123 126
 		xxlJobInfoDao.save(jobInfo);
124 127
 		if (jobInfo.getId() < 1) {
125
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "新增任务失败");
128
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_add")+I18nUtil.getString("system_fail")) );
126 129
 		}
127 130
 
128 131
 		// add in quartz
@@ -140,7 +143,7 @@ public class XxlJobServiceImpl implements XxlJobService {
140 143
             } catch (SchedulerException e1) {
141 144
                 logger.error(e.getMessage(), e1);
142 145
             }
143
-            return new ReturnT<String>(ReturnT.FAIL_CODE, "新增任务失败:" + e.getMessage());
146
+            return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_add")+I18nUtil.getString("system_fail"))+":" + e.getMessage());
144 147
         }
145 148
 	}
146 149
 
@@ -149,22 +152,22 @@ public class XxlJobServiceImpl implements XxlJobService {
149 152
 
150 153
 		// valid
151 154
 		if (!CronExpression.isValidExpression(jobInfo.getJobCron())) {
152
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入格式正确的“Cron”");
155
+			return new ReturnT<String>(ReturnT.FAIL_CODE, I18nUtil.getString("jobinfo_field_cron_unvalid") );
153 156
 		}
154 157
 		if (StringUtils.isBlank(jobInfo.getJobDesc())) {
155
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入“任务描述”");
158
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input")+I18nUtil.getString("jobinfo_field_jobdesc")) );
156 159
 		}
157 160
 		if (StringUtils.isBlank(jobInfo.getAuthor())) {
158
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "请输入“负责人”");
161
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input")+I18nUtil.getString("jobinfo_field_author")) );
159 162
 		}
160 163
 		if (ExecutorRouteStrategyEnum.match(jobInfo.getExecutorRouteStrategy(), null) == null) {
161
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "路由策略非法");
164
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorRouteStrategy")+I18nUtil.getString("system_unvalid")) );
162 165
 		}
163 166
 		if (ExecutorBlockStrategyEnum.match(jobInfo.getExecutorBlockStrategy(), null) == null) {
164
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "阻塞处理策略非法");
167
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorBlockStrategy")+I18nUtil.getString("system_unvalid")) );
165 168
 		}
166 169
 		if (ExecutorFailStrategyEnum.match(jobInfo.getExecutorFailStrategy(), null) == null) {
167
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "失败处理策略非法");
170
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_executorFailStrategy")+I18nUtil.getString("system_unvalid")));
168 171
 		}
169 172
 
170 173
 		// ChildJobId valid
@@ -174,14 +177,16 @@ public class XxlJobServiceImpl implements XxlJobService {
174 177
 				if (StringUtils.isNotBlank(childJobIdItem) && StringUtils.isNumeric(childJobIdItem)) {
175 178
 					XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.valueOf(childJobIdItem));
176 179
 					if (childJobInfo==null) {
177
-						return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format("子任务ID({0})无效", childJobIdItem));
180
+						return new ReturnT<String>(ReturnT.FAIL_CODE,
181
+								MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_not_found")), childJobIdItem));
178 182
 					}
179 183
 					// avoid cycle relate
180 184
 					if (childJobInfo.getId() == jobInfo.getId()) {
181
-						return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format("子任务ID({0})不可与父任务重复", childJobIdItem));
185
+						return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format(I18nUtil.getString("jobinfo_field_childJobId_limit"), childJobIdItem));
182 186
 					}
183 187
 				} else {
184
-					return new ReturnT<String>(ReturnT.FAIL_CODE, MessageFormat.format("子任务ID({0})格式错误", childJobIdItem));
188
+					return new ReturnT<String>(ReturnT.FAIL_CODE,
189
+							MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_unvalid")), childJobIdItem));
185 190
 				}
186 191
 			}
187 192
 			jobInfo.setChildJobId(StringUtils.join(childJobIds, ","));
@@ -190,7 +195,7 @@ public class XxlJobServiceImpl implements XxlJobService {
190 195
 		// stage job info
191 196
 		XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(jobInfo.getId());
192 197
 		if (exists_jobInfo == null) {
193
-			return new ReturnT<String>(ReturnT.FAIL_CODE, "参数异常");
198
+			return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_id")+I18nUtil.getString("system_not_found")) );
194 199
 		}
195 200
 		//String old_cron = exists_jobInfo.getJobCron();
196 201
 
@@ -271,7 +276,7 @@ public class XxlJobServiceImpl implements XxlJobService {
271 276
 	public ReturnT<String> triggerJob(int id) {
272 277
         XxlJobInfo xxlJobInfo = xxlJobInfoDao.loadById(id);
273 278
         if (xxlJobInfo == null) {
274
-        	return new ReturnT<String>(ReturnT.FAIL_CODE, "任务ID非法");
279
+        	return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_id")+I18nUtil.getString("system_unvalid")) );
275 280
 		}
276 281
 
277 282
         String group = String.valueOf(xxlJobInfo.getJobGroup());

+ 43 - 2
xxl-job-admin/src/main/resources/i18n/message.properties View File

@@ -12,6 +12,7 @@ system_search=搜索
12 12
 system_status=状态
13 13
 system_opt=操作
14 14
 system_please_input=请输入
15
+system_please_choose=请选择
15 16
 system_success=成功
16 17
 system_fail=失败
17 18
 system_add_suc=新增成功
@@ -26,6 +27,8 @@ system_opt_suc=操作成功
26 27
 system_opt_fail=操作失败
27 28
 system_opt_edit=编辑
28 29
 system_opt_del=删除
30
+system_unvalid=非法
31
+system_not_found=不存在
29 32
 
30 33
 ## daterangepicker
31 34
 daterangepicker_ranges_recent_hour=最近一小时
@@ -58,7 +61,6 @@ dataTable_sLast=末页
58 61
 dataTable_sSortAscending=: 以升序排列此列
59 62
 dataTable_sSortDescending=: 以降序排列此列
60 63
 
61
-
62 64
 ## login
63 65
 login_btn=登录
64 66
 login_remember_me=记住密码
@@ -70,6 +72,8 @@ login_password_empty=请输入登录密码
70 72
 login_password_lt_5=登录密码不应低于5位
71 73
 login_success=登录成功
72 74
 login_fail=登录失败
75
+login_param_empty=账号或密码为空
76
+login_param_unvalid=账号或密码错误
73 77
 
74 78
 ## logout
75 79
 logout_btn=注销
@@ -104,11 +108,13 @@ jobinfo_field_jobgroup=执行器
104 108
 jobinfo_field_jobdesc=任务描述
105 109
 jobinfo_field_gluetype=运行模式
106 110
 jobinfo_field_executorparam=任务参数
111
+jobinfo_field_cron_unvalid=请输入格式正确的Cron
107 112
 jobinfo_field_author=负责人
108 113
 jobinfo_field_alarmemail=报警邮件
109 114
 jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔
110 115
 jobinfo_field_executorRouteStrategy=路由策略
111 116
 jobinfo_field_childJobId=子任务ID
117
+jobinfo_field_childJobId_limit=子任务ID({0})不可与父任务重复
112 118
 jobinfo_field_childJobId_placeholder=请输入子任务的任务ID,如存在多个则逗号分隔
113 119
 jobinfo_field_executorBlockStrategy=阻塞处理策略
114 120
 jobinfo_field_executorFailStrategy=失败处理策略
@@ -122,6 +128,8 @@ jobinfo_opt_run=执行
122 128
 jobinfo_glue_remark=源码备注
123 129
 jobinfo_glue_remark_limit=源码备注长度限制为4~100
124 130
 jobinfo_glue_rollback=版本回溯
131
+jobinfo_glue_jobid_unvalid=任务ID非法
132
+jobinfo_glue_gluetype_unvalid=该任务非GLUE模式
125 133
 
126 134
 ## job log
127 135
 joblog_name=调度日志
@@ -149,14 +157,18 @@ joblog_clean_type_6=清理一万条以前日志数据
149 157
 joblog_clean_type_7=清理三万条以前日志数据
150 158
 joblog_clean_type_8=清理十万条以前日志数据
151 159
 joblog_clean_type_9=清理所有日志数据
160
+joblog_clean_type_unvalid=清理类型参数异常
152 161
 joblog_handleCode_200=成功
153 162
 joblog_handleCode_500=失败
154 163
 joblog_handleCode_501=失败重试
155 164
 joblog_kill_log=终止任务
165
+joblog_kill_log_limit=调度失败,无法终止日志
166
+joblog_kill_log_byman=人为操作主动终止
156 167
 joblog_rolling_log=执行日志
157 168
 joblog_rolling_log_refresh=刷新
158 169
 joblog_rolling_log_triggerfail=任务发起调度失败,无法查看执行日志
159 170
 joblog_rolling_log_failoften=终止请求Rolling日志,请求失败次数超上限,可刷新页面重新加载日志
171
+joblog_logid_unvalid=日志ID非法
160 172
 
161 173
 ## job group
162 174
 jobgroup_name=执行器管理
@@ -169,14 +181,43 @@ jobgroup_field_title=名称
169 181
 jobgroup_field_addressType=注册方式
170 182
 jobgroup_field_addressType_0=自动注册
171 183
 jobgroup_field_addressType_1=手动录入
184
+jobgroup_field_addressType_limit=手动录入注册方式,机器地址不可为空
172 185
 jobgroup_field_registryList=机器地址
186
+jobgroup_field_registryList_unvalid=机器地址格式非法
173 187
 jobgroup_field_registryList_placeholder=请输入执行器地址列表,多地址逗号分隔
174 188
 jobgroup_field_appName_limit=限制以小写字母开头,由小写字母、数字和中划线组成
175 189
 jobgroup_field_appName_length=AppName长度限制为4~64
176 190
 jobgroup_field_title_length=名称长度限制为4~12
177 191
 jobgroup_field_order_digits=请输入整数
178 192
 jobgroup_field_orderrange=取值范围为1~1000
193
+jobgroup_del_limit_0=拒绝删除,该执行器使用中
194
+jobgroup_del_limit_1=拒绝删除, 系统至少保留一个执行器
195
+
196
+## job conf
197
+jobconf_fail_alarm=失败告警
198
+jobconf_fail_retry=失败重试
199
+jobconf_route_first=第一个
200
+jobconf_route_last=最后一个
201
+jobconf_route_round=轮询
202
+jobconf_route_random=随机
203
+jobconf_route_consistenthash=一致性HASH
204
+jobconf_route_lfu=最不经常使用
205
+jobconf_route_lru=最近最久未使用
206
+jobconf_route_failover=故障转移
207
+jobconf_route_busyover=忙碌转移
208
+jobconf_route_shard=分片广播
209
+jobconf_idleBeat=空闲检测
210
+jobconf_beat=心跳检测
211
+jobconf_monitor=调度中心监控报警
212
+jobconf_monitor_detail=监控告警明细
213
+jobconf_monitor_alarm_title=告警类型
214
+jobconf_monitor_alarm_type=调度失败
215
+jobconf_trigger_admin_adress=调度机器
216
+jobconf_trigger_exe_regtype=执行器-注册方式
217
+jobconf_trigger_exe_regaddress=执行器-地址列表
218
+jobconf_trigger_address_empty=调度失败:执行器地址为空
219
+jobconf_trigger_run=触发调度
179 220
 
180 221
 ## help
181 222
 job_help=使用教程
182
-job_help_document=官方文档
223
+job_help_document=官方文档