From 5bb6ca625b279ae7b8c2f33fe9d913ae0329142d Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Thu, 16 Dec 2021 15:36:18 +0800 Subject: [PATCH] feat: use i18n --- src/locales/lang/en.ts | 16 +++++++++------- src/locales/lang/zh.ts | 10 ++++++---- src/views/dashboard/List.vue | 6 +++--- src/views/dashboard/New.vue | 28 +++++++++++++++++----------- 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 089d589d..ca98a81a 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -17,6 +17,7 @@ const msg = { generalService: "General Service", services: "Services", + service: "Service", traces: "Traces", metrics: "Metrics", serviceMesh: "Service Mesh", @@ -43,8 +44,14 @@ const msg = { eventList: "Event List", databasePanel: "Database Panel", meshServicePanel: "Service Panel", - newDashboard: "New a dashboard", + newDashboard: "Create a new dashboard", dashboardEdit: "Edit the dashboard", + edit: "Edit", + delete: "Delete", + layer: "Layer", + endpoint: "Endpoint", + instance: "Instance", + create: "Create", hourTip: "Select Hour", minuteTip: "Select Minute", secondTip: "Select Second", @@ -71,9 +78,6 @@ const msg = { reload: "Reload", usermode: "User Mode", editmode: "Edit Mode", - currentService: "Current Service", - currentEndpoint: "Current Endpoint", - currentInstance: "Current Instance", currentVersion: "Current Version", currentPage: "Current Page", version: "Version", @@ -109,8 +113,6 @@ const msg = { all: "All", success: "Success", error: "Error", - service: "Service", - instance: "Instance", endpoints: "Endpoints", cache: "Cache", global: "Global", @@ -190,7 +192,6 @@ const msg = { noneParentService: "No Parent Service", serviceGroup: "Service Group", endpointFilter: "Endpoint Filter", - editConfig: "Edit Config", databaseView: "Database", browserView: "Browser", metricsView: "NOC - Network Operation Center", @@ -257,6 +258,7 @@ const msg = { scope: "Scope", destService: "Destination Service", destServiceInstance: "Destination Service Instance", + destEndpoint: "Destination Endpoint", eventSource: "Event Source", modalTitle: "Inspection", selectRedirectPage: "Do you want to inspect Traces or Logs of %s service?", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index d3a8eea7..12e6b7f4 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -45,6 +45,11 @@ const msg = { meshServicePanel: "服务面板", newDashboard: "新增仪表盘", dashboardEdit: "编辑仪表盘", + edit: "编辑", + delete: "删除", + layer: "层", + endpoint: "端点", + create: "新建", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", @@ -70,9 +75,6 @@ const msg = { reload: "刷新", usermode: "用户模式", editmode: "编辑模式", - currentService: "当前服务", - currentEndpoint: "当前端点", - currentInstance: "当前实例", currentVersion: "当前版本", currentPage: "当前页面", version: "版本", @@ -190,7 +192,6 @@ const msg = { noneParentService: "不设置父服务", serviceGroup: "服务组", endpointFilter: "端点过滤器", - editConfig: "编辑", databaseView: "数据库视图", browserView: "浏览器视图", metricsView: "大屏视图", @@ -255,6 +256,7 @@ const msg = { scope: "范围", destService: "终点服务", destServiceInstance: "终点实例", + destEndpoint: "终点端点", eventSource: "事件资源", modalTitle: "查看", selectRedirectPage: "查看 %s 服务的追踪或日志?", diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index ef53affe..6f936fb7 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -40,17 +40,17 @@ limitations under the License. --> diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index 8181114a..0cb46eb7 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. -->