2 Komitmen f131d70b2f ... bc32e2449a

Pembuat SHA1 Pesan Tanggal
  zlSun bc32e2449a 强制指定时间格式,而非从后端获取 11 bulan lalu
  zlSun a7c1cdd6d7 血缘图中的汉化以及对应提示汉化 11 bulan lalu

+ 2 - 1
atlas/js/main.js

@@ -180,7 +180,8 @@ require.config({
                 }
                 if (void 0 !== response["atlas.ui.default.version"] && (Globals.DEFAULT_UI = response["atlas.ui.default.version"]), 
                 void 0 !== response["atlas.ui.date.format"]) {
-                    Globals.dateTimeFormat = response["atlas.ui.date.format"];
+                    // Globals.dateTimeFormat = response["atlas.ui.date.format"];
+                    Globals.dateTimeFormat = "YYYY-MM-DD HH:mm:ss";
                     var dateFormatSeperated = Globals.dateTimeFormat.split(" ");
                     dateFormatSeperated[0] && (Globals.dateFormat = dateFormatSeperated[0]);
                 }

+ 1 - 1
atlas/js/utils/Utils.js

@@ -148,7 +148,7 @@ define([ "require", "utils/Globals", "pnotify", "utils/Messages", "utils/Enums",
         if (error && error.status) if (401 == error.status) redirectToLoginPage(); else if (419 == error.status) redirectToLoginPage(); else if (403 == error.status) Utils.serverErrorHandler(error, "You are not authorized"); else if ("0" == error.status && "abort" != error.statusText) {
             var diffTime = new Date().getTime() - prevNetworkErrorTime;
             diffTime > 3e3 && (prevNetworkErrorTime = new Date().getTime(), Utils.notifyError({
-                content: "Network Connection Failure : It seems you are not connected to the internet. Please check your internet connection and try again"
+                content: "网路连接失败。请检查您与服务器的连接。"
             }));
         } else skipDefaultError !== !0 && Utils.serverErrorHandler(error, defaultErrorMessage); else skipDefaultError !== !0 && Utils.serverErrorHandler(error, defaultErrorMessage);
     }, Utils.serverErrorHandler = function(response, defaultErrorMessage) {

+ 3 - 3
atlas/js/views/graph/LineageLayoutView.js

@@ -134,7 +134,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
         onClickSaveSvg: function(e, a) {
             var that = this;
             return that.lineageRelationshipLength >= 1e3 ? void Utils.notifyInfo({
-                content: "There was an error in downloading lineage: Lineage exceeds display parameters!"
+                content: "下载血缘时发生了错误: 血缘超过了显示数量参数!"
             }) : void this.LineageHelperRef.exportLineage();
         },
         onClickZoomIn: function() {
@@ -161,7 +161,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                         var relationsReverse = data.relations ? data.relations.reverse() : null, lineageMaxRelationCount = 9e3;
                         relationsReverse.length > lineageMaxRelationCount && (data.relations = relationsReverse.splice(relationsReverse.length - lineageMaxRelationCount, relationsReverse.length - 1),
                         Utils.notifyInfo({
-                            content: "Lineage exceeds display parameters and hence only upto 9000 relationships from this lineage can be displayed"
+                            content: "血缘超过最大显示数,因此只能显示该血缘中的9000个关系"
                         })), that.lineageRelationshipLength = data.relations.length, that.createGraph(data),
                         that.renderLineageTypeSearch(data);
                     }
@@ -217,7 +217,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/LineageLayoutView_tmpl", "collec
                     var guid = d.clickedData;
                     that.guid == guid ? Utils.notifyInfo({
                         html: !0,
-                        content: "You are already on <b>" + that.entityName + "</b> detail page."
+                        content: "你已经在 <b>" + that.entityName + "</b> 的页面了."
                     }) : Utils.setUrl({
                         url: "#!/detailPage/" + guid + "?tabActive=lineage",
                         mergeBrowserUrl: !1,

+ 3 - 3
atlas/js/views/graph/RelationshipLayoutView.js

@@ -93,7 +93,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/RelationshipLayoutView_tmpl", "c
                     obj.color), name = obj.name, relationship = (options.typeName, obj.relationship || !1), icon = (obj.entity || !1, 
                     '<i class="fa fa-trash"></i>'), title = "Deleted";
                     return relationship && (icon = '<i class="fa fa-long-arrow-right"></i>', status = Enums.entityStateReadOnly[options.relationshipStatus || options.status] ? "deleted-relation" : "", 
-                    title = "Relationship Deleted"), "<li class=" + status + "><a style='color:" + entityColor + "' href=#!/detailPage/" + options.guid + "?tabActive=relationship>" + _.escape(name) + " (" + options.typeName + ')</a><button type="button" title="' + title + '" class="btn btn-sm deleteBtn deletedTableBtn btn-action ">' + icon + "</button></li>";
+                    title = "关系已删除"), "<li class=" + status + "><a style='color:" + entityColor + "' href=#!/detailPage/" + options.guid + "?tabActive=relationship>" + _.escape(name) + " (" + options.typeName + ')</a><button type="button" title="' + title + '" class="btn btn-sm deleteBtn deletedTableBtn btn-action ">' + icon + "</button></li>";
                 }, name = options.entityName ? options.entityName : Utils.getName(options, "displayText");
                 return "ACTIVE" == options.entityStatus ? "ACTIVE" == options.relationshipStatus ? entityTypeHtml = getdefault({
                     color: activeEntityColor,
@@ -115,7 +115,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/RelationshipLayoutView_tmpl", "c
                     name: name
                 }), entityTypeHtml + "</pre>";
             };
-            this.ui.searchNode.hide(), this.$("[data-id='typeName']").text(typeName);
+            this.ui.searchNode.hide(), this.$("[data-id='typeName']").text(Utils.toChinese(typeName) );
             var getElement = function(options) {
                 var entityTypeButton = (options.entityName ? options.entityName : Utils.getName(options, "displayText"), 
                 getEntityTypelist(options));
@@ -183,7 +183,7 @@ define([ "require", "backbone", "hbs!tmpl/graph/RelationshipLayoutView_tmpl", "c
                 }), countBox.append("text").attr("dx", 18).attr("dy", -16).attr("text-anchor", "middle").attr("fill", defaultEntityColor).text(function(d) {
                     if (_.isArray(d.value) && d.value.length > 1) return d.value.length;
                 }), node.append("text").attr("x", -15).attr("y", "35").text(function(d) {
-                    return d.name;
+                    return Utils.toChinese(d.name);
                 }), simulation.nodes(nodes).on("tick", ticked), simulation.force("link").links(links);
             }
             function ticked() {