Ver código fonte

feat: 汉化

zhangwenya 11 meses atrás
pai
commit
fca1179625
18 arquivos alterados com 99 adições e 99 exclusões
  1. 45 45
      src/main/angular/karma.conf.js
  2. 1 1
      src/main/angular/src/app/core/components/agent-statistic-list/agent-statistic-list.component.ts
  3. 1 1
      src/main/angular/src/app/core/components/call-tree/call-tree-container.component.ts
  4. 11 11
      src/main/angular/src/app/core/components/call-tree/call-tree.component.ts
  5. 1 1
      src/main/angular/src/app/core/components/removable-agent-list/removable-agent-list.component.ts
  6. 5 5
      src/main/angular/src/app/core/components/state-button/state-button.component.ts
  7. 1 1
      src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu-container.component.ts
  8. 1 1
      src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu-for-detail-container.component.ts
  9. 1 1
      src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu.component.html
  10. 4 4
      src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu.component.ts
  11. 1 1
      src/main/angular/src/app/core/components/transaction-list-bottom-contents/transaction-list-bottom-contents-container.component.ts
  12. 4 4
      src/main/angular/src/app/core/components/transaction-short-info/transaction-short-info-container.component.html
  13. 2 2
      src/main/angular/src/app/core/components/transaction-table-grid/transaction-meta-data.service.ts
  14. 9 9
      src/main/angular/src/app/core/components/transaction-table-grid/transaction-table-grid.component.ts
  15. 3 3
      src/main/angular/src/app/core/components/transaction-view-top-contents/transaction-view-top-contents-container.component.ts
  16. 2 2
      src/main/angular/src/app/routes/transaction-detail-page/transaction-detail-page.component.ts
  17. 2 2
      src/main/angular/src/app/routes/transaction-list-page/transaction-list-page.component.ts
  18. 5 5
      src/main/angular/src/assets/i18n/en.json

+ 45 - 45
src/main/angular/karma.conf.js

@@ -2,49 +2,49 @@
 // https://karma-runner.github.io/0.13/config/configuration-file.html
 
 module.exports = function (config) {
-    config.set({
-        basePath: '',
-        frameworks: ['jasmine', 'angular-cli'],
-        plugins: [
-            require('karma-jasmine'),
-            require('karma-chrome-launcher'),
-            require('karma-jasmine-html-report'),
-            require('karma-coverage-istanbul-reporter'),
-            require('@angular/cli/plugins/karma'),
-            require('karma-html-live-reporter')
-        ],
-        client: {
-            clearContext: false
-        },
-        files: [
-            { pattern: './src/test.ts', watched: false }
-        ],
-        preprocessors: {
-            './src/test.ts': ['@angular/cli']
-        },
-        mime: {
-            'text/x-typescript': ['ts', 'tsx']
-        },
-        coverageIstanbulReporter: {
-            reports: ['html', 'lcovonly'],
-            fixWebpackSourcePaths: true
-        },
-        angularCli: {
-            environment: 'dev'
-        },
-        reporters: config.angularCli && config.angularCli.codeCoverage
-            ? ['progress', 'live-html', 'converage-istanbul']
-            : ['progress', 'live-html', 'kjhtml'],
-        htmlLiveReporter: { // port: 5060
-            colorScheme: 'jasmine',
-            defaultTab: 'summary',
-            focusMode: true
-        },
-        port: 9876,
-        colors: true,
-        logLevel: config.LOG_INFO,
-        autoWatch: true,
-        browsers: ['Chrome'],
-        singleRun: false
-    });
+  config.set({
+    basePath: '',
+    frameworks: ['jasmine', 'angular-cli'],
+    plugins: [
+      require('karma-jasmine'),
+      require('karma-chrome-launcher'),
+      require('karma-jasmine-html-report'),
+      require('karma-coverage-istanbul-reporter'),
+      require('@angular/cli/plugins/karma'),
+      require('karma-html-live-reporter')
+    ],
+    client: {
+      clearContext: false
+    },
+    files: [
+      { pattern: './src/test.ts', watched: false }
+    ],
+    preprocessors: {
+      './src/test.ts': ['@angular/cli']
+    },
+    mime: {
+      'text/x-typescript': ['ts', 'tsx']
+    },
+    coverageIstanbulReporter: {
+      reports: ['html', 'lcovonly'],
+      fixWebpackSourcePaths: true
+    },
+    angularCli: {
+      environment: 'dev'
+    },
+    reporters: config.angularCli && config.angularCli.codeCoverage
+      ? ['progress', 'live-html', 'converage-istanbul']
+      : ['progress', 'live-html', 'kjhtml'],
+    htmlLiveReporter: { // port: 5060
+      colorScheme: 'jasmine',
+      defaultTab: 'summary',
+      focusMode: true
+    },
+    port: 9876,
+    colors: true,
+    logLevel: config.LOG_INFO,
+    autoWatch: true,
+    browsers: ['Chrome'],
+    singleRun: false
+  });
 };

+ 1 - 1
src/main/angular/src/app/core/components/agent-statistic-list/agent-statistic-list.component.ts

@@ -91,7 +91,7 @@ export class AgentStatisticListComponent implements OnInit  {
                 tooltipField: 'application'
             },
             {
-                headerName: `代理Id`,
+                headerName: `代理`,
                 field: 'agent',
                 width: 300,
                 filter: 'agTextColumnFilter',

+ 1 - 1
src/main/angular/src/app/core/components/call-tree/call-tree-container.component.ts

@@ -103,7 +103,7 @@ export class CallTreeContainerComponent implements OnInit, OnDestroy {
     onCellDoubleClicked(contents: string): void {
         this.dynamicPopupService.openPopup({
             data: {
-                title: 'Contents',
+                title: '内容',
                 contents,
                 type: 'plain'
             },

+ 11 - 11
src/main/angular/src/app/core/components/call-tree/call-tree.component.ts

@@ -177,7 +177,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Method',
+                headerName: '方法',
                 field: 'method',
                 width: 420,
                 cellRenderer: 'agGroupCellRenderer',
@@ -197,14 +197,14 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Argument',
+                headerName: '参数',
                 field: 'argument',
                 width: 250,
                 cellStyle: this.argumentCellStyle,
                 tooltipField: 'argument'
             },
             {
-                headerName: 'StartTime',
+                headerName: '开始时间',
                 field: 'startTime',
                 width: 100,
                 suppressSizeToFit: true,
@@ -213,7 +213,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Gap(ms)',
+                headerName: '间隔(ms)',
                 field: 'gap',
                 width: 75,
                 suppressSizeToFit: true,
@@ -223,7 +223,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Exec(ms)',
+                headerName: '执行(ms)',
                 field: 'exec',
                 width: 78,
                 suppressSizeToFit: true,
@@ -233,7 +233,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Exec(%)',
+                headerName: '执行率(%)',
                 field: 'execPer',
                 width: 100,
                 minWidth: 100,
@@ -267,7 +267,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Self(ms)',
+                headerName: '本人(ms)',
                 field: 'selp',
                 width: 78,
                 suppressSizeToFit: true,
@@ -277,7 +277,7 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 }
             },
             {
-                headerName: 'Class',
+                headerName: '',
                 field: 'clazz',
                 width: 150,
                 tooltipField: 'clazz'
@@ -289,19 +289,19 @@ export class CallTreeComponent implements OnInit, OnChanges, AfterViewInit {
                 tooltipField: 'api'
             },
             {
-                headerName: 'Agent Id',
+                headerName: '代理',
                 field: 'agent',
                 width: 150,
                 tooltipField: 'agent'
             },
             {
-                headerName: 'Application',
+                headerName: '应用',
                 field: 'application',
                 width: 150,
                 tooltipField: 'application'
             },
             {
-                headerName: 'Agent Name',
+                headerName: '代理名称',
                 field: 'agentName',
                 width: 150,
                 tooltipField: 'agentName'

+ 1 - 1
src/main/angular/src/app/core/components/removable-agent-list/removable-agent-list.component.ts

@@ -56,7 +56,7 @@ export class RemovableAgentListComponent implements OnInit {
                         cellStyle: this.alignCenterCellStyle
                     },
                     {
-                        headerName: '代理Id',
+                        headerName: '代理',
                         field: 'agentId',
                         width: 250,
                         cellStyle: this.alignCenterCellStyle

+ 5 - 5
src/main/angular/src/app/core/components/state-button/state-button.component.ts

@@ -1,11 +1,11 @@
 import { Component, OnInit, Output, OnChanges, EventEmitter, SimpleChanges, Input } from '@angular/core';
 
 export enum BUTTON_STATE {
-    PAUSE = 'Pause',
-    RESUME = 'Resume',
-    COMPLETED = 'Completed',
-    MORE = 'More',
-    DONE = 'Done'
+    PAUSE = '暂停',
+    RESUME = '概述',
+    COMPLETED = '完成',
+    MORE = '更多',
+    DONE = '结束'
 }
 
 @Component({

+ 1 - 1
src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu-container.component.ts

@@ -84,7 +84,7 @@ export class TransactionDetailMenuContainerComponent implements OnInit, OnDestro
         } else {
             this.dynamicPopupService.openPopup({
                 data: {
-                    title: 'Notice',
+                    title: '注意',
                     contents: this.transactionDetailInfo.disableButtonMessage,
                     type: 'html'
                 },

+ 1 - 1
src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu-for-detail-container.component.ts

@@ -71,7 +71,7 @@ export class TransactionDetailMenuForDetailContainerComponent implements OnInit
         } else {
             this.dynamicPopupService.openPopup({
                 data: {
-                    title: 'Notice',
+                    title: '注意',
                     contents: this.transactionDetailInfo.disableButtonMessage,
                     type: 'html'
                 },

+ 1 - 1
src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu.component.html

@@ -3,7 +3,7 @@
         <button *ngFor="let tab of tabList" [class.active]="isActive(tab.key)" (click)="onClickTab(tab.key)">
             {{tab.display}}
         </button>
-        <button (click)="openDetailView()">Mixed View <i class="fas fa-external-link-square-alt" aria-hidden="true"></i></button>
+        <button (click)="openDetailView()">混合视图 <i class="fas fa-external-link-square-alt" aria-hidden="true"></i></button>
         <button class="l-log-info" (click)="openLogView()" [class.disabled]="!hasInfo()" *ngIf="hasLogView()">{{transactionDetailInfo.logButtonName}} <i [ngClass]="getLogIcon()" aria-hidden="true"></i></button>
     </div>
     <span class="l-transaction-state" [hidden]="!hasState()" [ngClass]="getStateClass()"><i class="fas fa-th-list"></i> {{transactionDetailInfo?.completeState}}</span>

+ 4 - 4
src/main/angular/src/app/core/components/transaction-detail-menu/transaction-detail-menu.component.ts

@@ -16,16 +16,16 @@ export class TransactionDetailMenuComponent implements OnInit {
     tabList = [
         {
             key: 'callTree',
-            display: 'Call Tree'
+            display: '调用关系树'
         }, {
             key: 'serverMap',
-            display: 'Server Map'
+            display: '服务器映射'
         }, {
             key: 'timeline',
-            display: 'Timeline'
+            display: '时间轴'
         }, {
             key: 'timelineV2',
-            display: 'Timeline Beta'
+            display: '时间轴 Beta'
         }
     ];
 

+ 1 - 1
src/main/angular/src/app/core/components/transaction-list-bottom-contents/transaction-list-bottom-contents-container.component.ts

@@ -64,7 +64,7 @@ export class TransactionListBottomContentsContainerComponent implements OnInit,
         this.message$ = this.transactionMetaDataService.onTransactionDataLoad$.pipe(
             map(({length}: ITransactionMetaData[]) => length === 0),
             filter((isEmpty: boolean) => !isEmpty),
-            switchMap(() => this.translateService.get('TRANSACTION_LIST.SELECT_TRANSACTION'))
+            switchMap(() => this.translateService.get('请选择事务列表中的事务')) //TRANSACTION_LIST.SELECT_TRANSACTION
         );
         this.connectStore();
     }

+ 4 - 4
src/main/angular/src/app/core/components/transaction-short-info/transaction-short-info-container.component.html

@@ -1,6 +1,6 @@
 <div class="font-opensans l-route">
-    <div [attr.title]="applicationName">ApplicationName : {{applicationName}}</div>
-    <div [attr.title]="agentId">AgentId : {{agentId}}</div>
-    <div [attr.title]="transactionId">TransactionId : {{transactionId}}</div>
-    <div [attr.title]="path">Path : {{path}}</div>
+    <div [attr.title]="applicationName">应用名称 : {{applicationName}}</div>
+    <div [attr.title]="agentId">代理 : {{agentId}}</div>
+    <div [attr.title]="transactionId">事务 : {{transactionId}}</div>
+    <div [attr.title]="path">路径 : {{path}}</div>
 </div>

+ 2 - 2
src/main/angular/src/app/core/components/transaction-table-grid/transaction-meta-data.service.ts

@@ -54,7 +54,7 @@ export class TransactionMetaDataService {
         this.onTransactionDataFecthState$ = this.outTransactionDataFetchState.asObservable();
 
         this.enableServerSideScan = this.webAppSettingDataService.getExperimentalOption('scatterScan');
-        this.translateService.get('TRANSACTION_LIST.TRANSACTION_RETRIEVE_ERROR').subscribe((text: string) => {
+        this.translateService.get('事务列表检索错误').subscribe((text: string) => {
             this.retrieveErrorMessage = text;
         });
     }
@@ -100,7 +100,7 @@ export class TransactionMetaDataService {
 
             if (this.requestSourceData.length === 0) {
                 this.onError({
-                    data: {title: 'Notice', contents: this.retrieveErrorMessage, type: 'html'},
+                    data: {title: '注意', contents: this.retrieveErrorMessage, type: 'html'},
                     component: MessagePopupContainerComponent,
                 });
             } else {

+ 9 - 9
src/main/angular/src/app/core/components/transaction-table-grid/transaction-table-grid.component.ts

@@ -148,7 +148,7 @@ export class TransactionTableGridComponent implements OnInit, OnChanges {
                 suppressSizeToFit: true
             },
             {
-                headerName: 'StartTime',
+                headerName: '开始时间',
                 field: 'startTime',
                 width: 170,
                 valueFormatter: (params: any) => {
@@ -157,7 +157,7 @@ export class TransactionTableGridComponent implements OnInit, OnChanges {
                 suppressSizeToFit: true
             },
             {
-                headerName: 'Path',
+                headerName: '路径',
                 field: 'path',
                 width: 370,
                 cellRenderer: (params: any) => {
@@ -173,14 +173,14 @@ export class TransactionTableGridComponent implements OnInit, OnChanges {
                 tooltipField: 'path'
             },
             {
-                headerName: 'EndPoint',
+                headerName: '端点',
                 field: 'endpoint',
                 width: 130,
                 cellStyle: this.alignLeftCellStyle,
                 suppressSizeToFit: true
             },
             {
-                headerName: 'Res(ms)',
+                headerName: '响应时间(ms)',
                 field: 'responseTime',
                 width: 70,
                 cellStyle: this.alignRightCellStyle,
@@ -191,7 +191,7 @@ export class TransactionTableGridComponent implements OnInit, OnChanges {
                 suppressSizeToFit: true
             },
             {
-                headerName: 'Exception',
+                headerName: '异常',
                 field: 'exception',
                 width: 50,
                 cellStyle: () => {
@@ -207,25 +207,25 @@ export class TransactionTableGridComponent implements OnInit, OnChanges {
                 suppressSizeToFit: true
             },
             {
-                headerName: 'Agent Id',
+                headerName: '代理',
                 field: 'agentId',
                 width: 200,
                 tooltipField: 'agentId'
             },
             {
-                headerName: 'Client IP',
+                headerName: '客户端IP',
                 field: 'clientIp',
                 width: 150
             },
             {
-                headerName: 'Transaction',
+                headerName: '事务',
                 field: 'traceId',
                 width: 270,
                 // suppressSizeToFit: true,
                 tooltipField: 'traceId'
             },
             {
-                headerName: 'Agent Name',
+                headerName: '代理名称',
                 field: 'agentName',
                 width: 100,
                 tooltipField: 'agentName'

+ 3 - 3
src/main/angular/src/app/core/components/transaction-view-top-contents/transaction-view-top-contents-container.component.ts

@@ -45,15 +45,15 @@ export class TransactionViewTopContentsContainerComponent implements OnInit, OnD
     private initTabList(): void {
         this.tabList = [{
             id: 'heap',
-            display: 'Heap',
+            display: '',
         },
         {
             id: 'nonHeap',
-            display: 'Non Heap',
+            display: '',
         },
         {
             id: 'cpu',
-            display: 'CPU Load',
+            display: 'CPU负载',
         }];
     }
 

+ 2 - 2
src/main/angular/src/app/routes/transaction-detail-page/transaction-detail-page.component.ts

@@ -36,7 +36,7 @@ export class TransactionDetailPageComponent implements OnInit, OnDestroy {
     ) {}
 
     ngOnInit() {
-        this.translateService.get('TRANSACTION_LIST.TRANSACTION_RETRIEVE_ERROR').subscribe((text: string) => {
+        this.translateService.get('事务列表检索错误').subscribe((text: string) => {
             this.errorMessage = text;
         });
 
@@ -46,7 +46,7 @@ export class TransactionDetailPageComponent implements OnInit, OnDestroy {
                 if (!urlService.hasValue(UrlQuery.TRANSACTION_INFO)) {
                     this.dynamicPopupService.openPopup({
                         data: {
-                            title: 'Notice',
+                            title: '注意',
                             contents: this.errorMessage,
                             type: 'html'
                         },

+ 2 - 2
src/main/angular/src/app/routes/transaction-list-page/transaction-list-page.component.ts

@@ -34,14 +34,14 @@ export class TransactionListPageComponent implements OnInit {
     ) {}
 
     ngOnInit() {
-        this.translateService.get('TRANSACTION_LIST.TRANSACTION_RETRIEVE_ERROR').subscribe((text: string) => {
+        this.translateService.get('事务列表检索错误').subscribe((text: string) => {
             this.errorMessage = text;
         });
 
         if (!this.newUrlStateNotificationService.hasValue(UrlQuery.DRAG_INFO)) {
             this.dynamicPopupService.openPopup({
                 data: {
-                    title: 'Notice',
+                    title: '注意',
                     contents: this.errorMessage,
                     type: 'html'
                 },

+ 5 - 5
src/main/angular/src/assets/i18n/en.json

@@ -405,7 +405,7 @@
             }],
             "AGENT_CHART": {
                 "HEAP": [{
-                    "TITLE": "Heap",
+                    "TITLE": "",
                     "DESC": "JVM 的堆信息和所需的主要垃圾收集时间",//"JVM's heap information and major garbage collection time required",
                     "CATEGORY": [{
                         "TITLE": "Legend",
@@ -422,16 +422,16 @@
                     }]
                 }],
                 "NON_HEAP": [{
-                    "TITLE": "Non-Heap",
-                    "DESC": "JVM 的非堆信息和主要垃圾收集所需的时间",//"JVM's non-heap information and major garbage collection time required",
+                    "TITLE": "",
+                    "DESC": "JVM 的信息和主要垃圾收集所需的时间",//"JVM's non-heap information and major garbage collection time required",
                     "CATEGORY": [{
                         "TITLE": "Legend",
                         "ITEMS": [{
                             "NAME": "Max",
-                            "DESC": "最大非堆大小"//"Maximum non-heap size"
+                            "DESC": "最大大小"//"Maximum non-heap size"
                         }, {
                             "NAME": "Used",
-                            "DESC": "当前正在使用的非堆大小"//"Non-heap size currently in use"
+                            "DESC": "当前正在使用的大小"//"Non-heap size currently in use"
                         }, {
                             "NAME": "Major ",
                             "DESC": "大型垃圾收集所需的时间(如果发生多次,则在括号中显示大型 GC 的次数)"//"Time required for major garbage collection (number of Major GCs in parenthesis if it occurred more than once)"