Browse Source

国际化定制基本结束

xuxueli 7 years ago
parent
commit
68db58ad72

+ 1 - 0
xxl-job-admin/src/main/resources/i18n/message.properties

@@ -29,6 +29,7 @@ system_opt_edit=编辑
 system_opt_del=删除
 system_unvalid=非法
 system_not_found=不存在
+system_nav=导航
 
 ## daterangepicker
 daterangepicker_ranges_recent_hour=最近一小时

+ 5 - 4
xxl-job-admin/src/main/resources/i18n/message_en.properties

@@ -4,9 +4,9 @@ admin_version=1.9.1(SNAPSHOT)
 
 ## system
 system_tips=System message
-system_ok=Confirm
+system_ok=Confirm 
 system_close=Close
-system_save=Save
+system_save=Save 
 system_cancel=Cancel
 system_search=Search
 system_status=Status
@@ -25,10 +25,11 @@ system_show=Show
 system_empty=Empty
 system_opt_suc=operate success
 system_opt_fail=operate fail
-system_opt_edit=Edit
-system_opt_del=Delete
+system_opt_edit=Edit 
+system_opt_del=Delete 
 system_unvalid=illegal
 system_not_found=not exist
+system_nav=Navigation
 
 ## daterangepicker
 daterangepicker_ranges_recent_hour=recent one hour

+ 1 - 1
xxl-job-admin/src/main/webapp/WEB-INF/template/common/common.macro.ftl

@@ -92,7 +92,7 @@
 		<section class="sidebar">
 			<!-- sidebar menu: : style can be found in sidebar.less -->
 			<ul class="sidebar-menu">
-                <li class="header">导航</li>
+                <li class="header">${I18n.system_nav}</li>
 				<li class="nav-click <#if pageName == "jobinfo">active</#if>" ><a href="${request.contextPath}/jobinfo"><i class="fa fa-circle-o text-aqua"></i><span>${I18n.jobinfo_name}</span></a></li>
 				<li class="nav-click <#if pageName == "joblog">active</#if>" ><a href="${request.contextPath}/joblog"><i class="fa fa-circle-o text-yellow"></i><span>${I18n.joblog_name}</span></a></li>
                 <li class="nav-click <#if pageName == "jobgroup">active</#if>" ><a href="${request.contextPath}/jobgroup"><i class="fa fa-circle-o text-green"></i><span>${I18n.jobgroup_name}</span></a></li>

+ 6 - 10
xxl-job-admin/src/main/webapp/static/js/common.1.js

@@ -2,7 +2,11 @@ $(function(){
 
 	// logout
 	$("#logoutBtn").click(function(){
-		layer.confirm( I18n.logout_confirm , {icon: 3, title: I18n.system_tips }, function(index){
+		layer.confirm( I18n.logout_confirm , {
+			icon: 3,
+			title: I18n.system_tips ,
+            btn: [ I18n.system_ok, I18n.system_cancel ]
+		}, function(index){
 			layer.close(index);
 
 			$.post(base_url + "/logout", function(data, status) {
@@ -11,18 +15,10 @@ $(function(){
                     setTimeout(function(){
                         window.location.href = base_url + "/";
                     }, 500);
-					/*layer.open({
-						title: I18n.system_tips ,
-						content: I18n.logout_success ,
-						icon: '1',
-						end: function(layero, index){
-							window.location.href = base_url + "/";
-						}
-					});*/
 				} else {
 					layer.open({
 						title: I18n.system_tips ,
-                        btn: [ I18n.system_ok , I18n.system_close ],
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.logout_fail),
 						icon: '2'
 					});

+ 1 - 0
xxl-job-admin/src/main/webapp/static/js/index.js

@@ -62,6 +62,7 @@ $(function () {
                 } else {
                     layer.open({
                         title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
                         content: (data.msg || I18n.job_dashboard_report_loaddata_fail ),
                         icon: '2'
                     });

+ 4 - 0
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js

@@ -39,6 +39,7 @@ $(function() {
 		if (!glueRemark) {
 			layer.open({
 				title: I18n.system_tips,
+                btn: [ I18n.system_ok],
 				content: I18n.system_please_input + I18n.jobinfo_glue_remark ,
 				icon: '2'
 			});
@@ -47,6 +48,7 @@ $(function() {
 		if (glueRemark.length <4 || glueRemark.length > 100) {
 			layer.open({
 				title: I18n.system_tips ,
+                btn: [ I18n.system_ok ],
 				content: I18n.jobinfo_glue_remark_limit ,
 				icon: '2'
 			});
@@ -66,6 +68,7 @@ $(function() {
 				if (data.code == 200) {
 					layer.open({
 						title: I18n.system_tips,
+                        btn: [ I18n.system_ok ],
 						content: (I18n.system_save + I18n.system_success) ,
 						icon: '1',
 						end: function(layero, index){
@@ -76,6 +79,7 @@ $(function() {
 				} else {
 					layer.open({
 						title: I18n.system_tips,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || (I18n.system_save + I18n.system_fail) ),
 						icon: '2'
 					});

+ 11 - 1
xxl-job-admin/src/main/webapp/static/js/jobgroup.index.1.js

@@ -4,7 +4,11 @@ $(function() {
 	$('.remove').on('click', function(){
 		var id = $(this).attr('id');
 
-		layer.confirm( (I18n.system_ok + I18n.jobgroup_del + '?') , {icon: 3, title: I18n.system_tips }, function(index){
+		layer.confirm( (I18n.system_ok + I18n.jobgroup_del + '?') , {
+			icon: 3,
+			title: I18n.system_tips ,
+            btn: [ I18n.system_ok, I18n.system_cancel ]
+		}, function(index){
 			layer.close(index);
 
 			$.ajax({
@@ -16,6 +20,7 @@ $(function() {
 					if (data.code == 200) {
 						layer.open({
 							title: I18n.system_tips ,
+                            btn: [ I18n.system_ok ],
 							content: (I18n.jobgroup_del + I18n.system_success),
 							icon: '1',
 							end: function(layero, index){
@@ -25,6 +30,7 @@ $(function() {
 					} else {
 						layer.open({
 							title: I18n.system_tips,
+                            btn: [ I18n.system_ok ],
 							content: (data.msg || (I18n.jobgroup_del + I18n.system_fail)),
 							icon: '2'
 						});
@@ -97,6 +103,7 @@ $(function() {
 					$('#addModal').modal('hide');
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: I18n.system_add_suc ,
 						icon: '1',
 						end: function(layero, index){
@@ -106,6 +113,7 @@ $(function() {
 				} else {
 					layer.open({
 						title: I18n.system_tips,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.system_add_fail  ),
 						icon: '2'
 					});
@@ -203,6 +211,7 @@ $(function() {
 
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: I18n.system_update_suc ,
 						icon: '1',
 						end: function(layero, index){
@@ -212,6 +221,7 @@ $(function() {
 				} else {
 					layer.open({
 						title: I18n.system_tips,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.system_update_fail  ),
 						icon: '2'
 					});

+ 11 - 11
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js

@@ -204,7 +204,11 @@ $(function() {
 		
 		var id = $(this).parent('p').attr("id");
 
-		layer.confirm( I18n.system_ok + typeName + '?', {icon: 3, title: I18n.system_tips }, function(index){
+		layer.confirm( I18n.system_ok + typeName + '?', {
+			icon: 3,
+			title: I18n.system_tips ,
+            btn: [ I18n.system_ok, I18n.system_cancel ]
+		}, function(index){
 			layer.close(index);
 
 			$.ajax({
@@ -219,7 +223,7 @@ $(function() {
 
 						layer.open({
 							title: I18n.system_tips,
-                            btn: [ I18n.system_ok , I18n.system_close ],
+                            btn: [ I18n.system_ok ],
 							content: typeName + I18n.system_success ,
 							icon: '1',
 							end: function(layero, index){
@@ -232,7 +236,7 @@ $(function() {
 					} else {
 						layer.open({
 							title: I18n.system_tips,
-                            btn: [ I18n.system_ok , I18n.system_close ],
+                            btn: [ I18n.system_ok ],
 							content: (data.msg || typeName + I18n.system_fail ),
 							icon: '2'
 						});
@@ -289,6 +293,7 @@ $(function() {
 					$('#addModal').modal('hide');
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: I18n.system_add_suc ,
 						icon: '1',
 						end: function(layero, index){
@@ -299,6 +304,7 @@ $(function() {
     			} else {
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.system_add_fail),
 						icon: '2'
 					});
@@ -348,14 +354,6 @@ $(function() {
 
         var id = $(this).parent('p').attr("id");
         var row = tableData['key'+id];
-        /*if (!row) {
-            layer.open({
-                title: I18n.system_tips ,
-                content: ("数据加载失败,请刷新页面"),
-                icon: '2'
-            });
-            return;
-        }*/
 
 		// base data
 		$("#updateModal .form input[name='id']").val( row.id );
@@ -422,6 +420,7 @@ $(function() {
 					$('#updateModal').modal('hide');
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: I18n.system_update_suc ,
 						icon: '1',
 						end: function(layero, index){
@@ -432,6 +431,7 @@ $(function() {
     			} else {
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.system_update_fail ),
 						icon: '2'
 					});

+ 10 - 1
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js

@@ -21,6 +21,7 @@ $(function() {
 				} else {
 					layer.open({
 						title: I18n.system_tips ,
+                        btn: [ I18n.system_ok ],
 						content: (data.msg || I18n.system_api_error ),
 						icon: '2'
 					});
@@ -240,7 +241,11 @@ $(function() {
 	$('#joblog_list').on('click', '.logKill', function(){
 		var _id = $(this).attr('_id');
 
-        layer.confirm( (I18n.system_ok + I18n.joblog_kill_log + '?'), {icon: 3, title: I18n.system_tips }, function(index){
+        layer.confirm( (I18n.system_ok + I18n.joblog_kill_log + '?'), {
+        	icon: 3,
+			title: I18n.system_tips ,
+            btn: [ I18n.system_ok, I18n.system_cancel ]
+		}, function(index){
             layer.close(index);
 
             $.ajax({
@@ -252,6 +257,7 @@ $(function() {
                     if (data.code == 200) {
                         layer.open({
                             title: I18n.system_tips,
+                            btn: [ I18n.system_ok ],
                             content: I18n.system_opt_suc ,
                             icon: '1',
                             end: function(layero, index){
@@ -261,6 +267,7 @@ $(function() {
                     } else {
                         layer.open({
                             title: I18n.system_tips,
+                            btn: [ I18n.system_ok ],
                             content: (data.msg || I18n.system_opt_fail ),
                             icon: '2'
                         });
@@ -297,6 +304,7 @@ $(function() {
 				$('#clearLogModal').modal('hide');
 				layer.open({
 					title: I18n.system_tips ,
+                    btn: [ I18n.system_ok ],
 					content: (I18n.joblog_clean_log + I18n.system_success) ,
 					icon: '1',
 					end: function(layero, index){
@@ -306,6 +314,7 @@ $(function() {
 			} else {
 				layer.open({
 					title: I18n.system_tips ,
+                    btn: [ I18n.system_ok ],
 					content: (data.msg || (I18n.joblog_clean_log + I18n.system_fail) ),
 					icon: '2'
 				});

+ 0 - 8
xxl-job-admin/src/main/webapp/static/js/login.1.js

@@ -52,14 +52,6 @@ $(function(){
                     setTimeout(function(){
                         window.location.href = base_url;
                     }, 500);
-                    /*layer.open({
-                        title: I18n.system_tips,
-                        content: I18n.login_success,
-                        icon: '1',
-                        end: function(layero, index){
-                            window.location.href = base_url;
-                        }
-                    });*/
 				} else {
                     layer.open({
                         title: I18n.system_tips,