ting.yin 5 роки тому
батько
коміт
68b6e50e5c

+ 3 - 0
stmms-web/src/main/webapp/static/i18n/messages.properties

@@ -11,6 +11,7 @@ mark.control.mode.track=\u5207\u6362\u5230\u8f68\u8ff9\u6a21\u5f0f
 mark.control.mode.common=\u5207\u6362\u5230\u666e\u901a\u6a21\u5f0f
 mark.control.function=\u8bc4\u5377\u529f\u80fd
 mark.control.logout=\u9000\u51fa
+mark.control.init.error=\u521d\u59cb\u5316\u5931\u8d25\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u65b0\u52a0\u8f7d
 #status
 mark.status.student.number=\u8003\u751f\u7f16\u53f7
 mark.status.library.number=\u4efb\u52a1\u7f16\u53f7
@@ -52,6 +53,7 @@ mark.problem=\u95ee\u9898\u5377
 mark.problem.type=\u9009\u62e9\u95ee\u9898\u7c7b\u578b
 mark.problem.confirm=\u786e\u5b9a
 mark.problem.cancel=\u53d6\u6d88
+mark.problem.check=\u8bf7\u9009\u62e9\u95ee\u9898\u5206\u7c7b
 #thumbnail
 mark.thumbnail=\u7f29\u7565\u56fe
 mark.thumbnail.open=\u6253\u5f00
@@ -68,6 +70,7 @@ mark.history.pre=\u524d
 mark.history.success=\u56de\u8bc4\u6210\u529f\uff0c\u603b\u5206\uff1a
 mark.history.problem=\u56de\u8bc4\u6210\u529f\uff0c\u5df2\u63d0\u4ea4\u95ee\u9898\u5377
 mark.history.loading=\u6b63\u5728\u52a0\u8f7d\u8bf7\u7a0d\u5019
+mark.history.error=\u6682\u65f6\u65e0\u6cd5\u8bfb\u53d6\u8bc4\u5377\u5386\u53f2\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5
 #mark-board
 mark.board.submit=\u63d0\u4ea4
 mark.board.total.score=\u603b\u5206

+ 3 - 0
stmms-web/src/main/webapp/static/i18n/messages_en.properties

@@ -11,6 +11,7 @@ mark.control.mode.track=Track Mode
 mark.control.mode.common=Common Mode
 mark.control.function=Marking function
 mark.control.logout=logout
+mark.control.init.error=Initialization failed, please refresh the page!
 #status
 mark.status.student.number=student number
 mark.status.library.number=task number
@@ -52,6 +53,7 @@ mark.problem=Problem
 mark.problem.type=check problem type
 mark.problem.confirm=ok
 mark.problem.cancel=cancel
+mark.problem.check=please check problem type
 #thumbnail
 mark.thumbnail=thumbnail
 mark.thumbnail.open=open
@@ -68,6 +70,7 @@ mark.history.pre=pre
 mark.history.success=successful,score: 
 mark.history.problem=submit problem successful 
 mark.history.loading=loading..
+mark.history.error=Unable to read the history at this time. Please try again later
 #mark-board
 mark.board.submit=submit
 mark.board.total.score=Score\uff1a

+ 3 - 0
stmms-web/src/main/webapp/static/i18n/messages_zh.properties

@@ -11,6 +11,7 @@ mark.control.mode.track=\u5207\u6362\u5230\u8f68\u8ff9\u6a21\u5f0f
 mark.control.mode.common=\u5207\u6362\u5230\u666e\u901a\u6a21\u5f0f
 mark.control.function=\u8bc4\u5377\u529f\u80fd
 mark.control.logout=\u9000\u51fa
+mark.control.init.error=\u521d\u59cb\u5316\u5931\u8d25\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u65b0\u52a0\u8f7d
 #status
 mark.status.student.number=\u8003\u751f\u7f16\u53f7
 mark.status.library.number=\u4efb\u52a1\u7f16\u53f7
@@ -52,6 +53,7 @@ mark.problem=\u95ee\u9898\u5377
 mark.problem.type=\u9009\u62e9\u95ee\u9898\u7c7b\u578b
 mark.problem.confirm=\u786e\u5b9a
 mark.problem.cancel=\u53d6\u6d88
+mark.problem.check=\u8bf7\u9009\u62e9\u95ee\u9898\u5206\u7c7b
 #thumbnail
 mark.thumbnail=\u7f29\u7565\u56fe
 mark.thumbnail.open=\u6253\u5f00
@@ -68,6 +70,7 @@ mark.history.pre=\u524d
 mark.history.success=\u56de\u8bc4\u6210\u529f\uff0c\u603b\u5206\uff1a
 mark.history.problem=\u56de\u8bc4\u6210\u529f\uff0c\u5df2\u63d0\u4ea4\u95ee\u9898\u5377
 mark.history.loading=\u6b63\u5728\u52a0\u8f7d\u8bf7\u7a0d\u5019
+mark.history.error=\u6682\u65f6\u65e0\u6cd5\u8bfb\u53d6\u8bc4\u5377\u5386\u53f2\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5
 #mark-board
 mark.board.submit=\u63d0\u4ea4
 mark.board.total.score=\u603b\u5206

+ 1 - 1
stmms-web/src/main/webapp/static/mark-json/js/mark-control.js

@@ -422,7 +422,7 @@ MarkControl.prototype.start = function (taskOption) {
         markControl.getStatus();
     };
     taskOption.error = function (message) {
-        alert('初始化失败,请刷新页面重新加载');
+        alert(getMessage(mark.control.init.error));
     };
     this.taskControl = new TaskControl(taskOption);
     this.taskControl.init();

+ 25 - 13
stmms-web/src/main/webapp/static/mark-new/js/mark-control.js

@@ -420,7 +420,7 @@ MarkControl.prototype.start = function(taskOption) {
         markControl.getStatus();
     };
     taskOption.error = function(message) {
-        alert('初始化失败,请刷新页面重新加载');
+        alert(getMessage(mark.control.init.error));
     };
     this.taskControl = new TaskControl(taskOption);
     this.taskControl.init();
@@ -660,10 +660,10 @@ MarkControl.prototype.sidebar_dom = '<div class="mark-sidebar span2 hide"></div>
 MarkControl.prototype.center_dom = '<div class="center-content span12"></div>';
 
 MarkControl.prototype.center_header_dom = '<div class="row-fluid"><div class="header"><p class="tips">\
-<em><a href="##" class="btn" id="switch-track-button" style="display:none" data-i18n-text="mark.mode.track">切换到轨迹模式</a>\
-<a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i><span data-i18n-text="mark.assistant"> 小助手</span></a></em>\
+<em><a href="##" class="btn" id="switch-track-button" style="display:none" data-i18n-text="mark.control.mode.track">切换到轨迹模式</a>\
+<a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i><span data-i18n-text="mark.control.assistant"> 小助手</span></a></em>\
 <a class="useinfo" href="#"><i class="icon-user icon-white"></i><i id="mark-user-name"></i></a>\
-<a class="logout" id="logout-link" href="{logoutUrl}"><i class="icon-off icon-white"></i> <i id="logout-title" data-i18n-text="user.logout">退出</i></a>\
+<a class="logout" id="logout-link" href="{logoutUrl}"><i class="icon-off icon-white"></i> <i id="logout-title" data-i18n-text="mark.control.logout">退出</i></a>\
 </p></div></div>';
 
 MarkControl.prototype.center_content_dom = '<div class="row-fluid"></div>';
@@ -672,7 +672,7 @@ MarkControl.prototype.image_content_dom = '<div class="image-content span12"></d
 
 MarkControl.prototype.assistant_dom = '<div class="popover bottom assistant"><div class="arrow"></div></div>';
 
-MarkControl.prototype.mark_function_dom = '<h3 class="popover-title" data-i18n-text="mark.function">评卷功能</h3>\
+MarkControl.prototype.mark_function_dom = '<h3 class="popover-title" data-i18n-text="mark.control.function">评卷功能</h3>\
 <div class="popover-content"><p id="function-list" class="popover-list">\
 </p></div>';
 
@@ -718,14 +718,26 @@ function getDom(content, markControl) {
         content = content.replace(/{logoutUrl}/g, markControl.option.logoutUrl);
     }
     var result = $(content);
-    result.find("[data-i18n-value]").each(function() {
-		$(this).val($.i18n.prop($(this).data("i18n-value")));
-	});
-    result.find("[data-i18n-text]").each(function() {
-		$(this).text($.i18n.prop($(this).data("i18n-text")));
-	});
-    result.find("[data-i18n-placeholder]").each(function() {
-		$(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
+    result.each(function() {
+    	if($(this).data("i18n-value")!=undefined){
+    		$(this).val($.i18n.prop($(this).data("i18n-value")));
+    	}
+		if($(this).data("i18n-text")!=undefined){
+			$(this).text($.i18n.prop($(this).data("i18n-text")));
+		    	}
+		if($(this).data("i18n-placeholder")!=undefined){
+			$(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
+		}
+    	
+    	$(this).find("[data-i18n-value]").each(function() {
+    		$(this).val($.i18n.prop($(this).data("i18n-value")));
+    	});
+    	$(this).find("[data-i18n-text]").each(function() {
+    		$(this).text($.i18n.prop($(this).data("i18n-text")));
+    	});
+    	$(this).find("[data-i18n-placeholder]").each(function() {
+    		$(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
+    	});
 	});
     return result;
 }

+ 1 - 1
stmms-web/src/main/webapp/static/mark-new/js/modules/mark-history.js

@@ -72,7 +72,7 @@ function MarkHistory(option) {
         }
     });
     this.markControl.on('history.get.error', this, function(event, context, data) {
-        alert('暂时无法读取评卷历史,请稍后重试');
+        alert(getMessage("mark.history.error"));
     });
     this.markControl.on('task.submit.success', this, function(event, context, data) {
         if (this.enable) {

+ 1 - 1
stmms-web/src/main/webapp/static/mark-new/js/modules/problem-process.js

@@ -49,7 +49,7 @@ ProblemProcess.prototype.init = function() {
     		self.reset();
     		self.toggle(false);
     	}else{
-    		alert("请选择问题分类");
+    		alert(getMessage("mark.problem.check"));
     	}
     });
     this.popover.find('a.close-btn').click(function() {

+ 2 - 2
stmms-web/src/main/webapp/static/mark-track/js/mark-control.js

@@ -424,7 +424,7 @@ MarkControl.prototype.start = function(taskOption) {
         markControl.getStatus();
     };
     taskOption.error = function(message) {
-        alert('初始化失败,请刷新页面重新加载');
+        alert(getMessage(mark.control.init.error));
     };
     this.taskControl = new TaskControl(taskOption);
     this.taskControl.init();
@@ -578,7 +578,7 @@ MarkControl.prototype.submitTask = function(submitUrl) {
                 }
             }
             if (!(isTag || isTrack)) {
-                markControl.trigger('task.submit.forceSpecialTag', '强制标记已开启,至少使用一个标记');
+                markControl.trigger('task.submit.forceSpecialTag');
                 return;
             }
         }