From 87c8973c6bc65886e06e796547cd9e386bda328e Mon Sep 17 00:00:00 2001 From: yidafu Date: Sun, 19 Mar 2023 23:08:06 +0800 Subject: [PATCH 1/5] feat: init i18n config and deps --- web/.eslintrc | 2 +- web/package.json | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/.eslintrc b/web/.eslintrc index a4a04e17..5ef3f0aa 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -1,6 +1,6 @@ { "extends": ["plugin:react/recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], - "plugins": ["react", "@typescript-eslint", "prettier"], + "plugins": ["react", "@typescript-eslint", "prettier", "i18n"], "settings": { "react": { "pragma": "React", diff --git a/web/package.json b/web/package.json index 5e666dbd..8bce3a07 100644 --- a/web/package.json +++ b/web/package.json @@ -19,11 +19,15 @@ "@types/node": "^15.0.2", "@types/react": "^17.0.2", "babel-loader": "^8.2.2", + "babel-plugin-i18next-extract": "^0.9.0", "clean-webpack-plugin": "^4.0.0-alpha.0", "css-loader": "^5.2.4", "css-minimizer-webpack-plugin": "^3.0.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.1", + "i18next": "^22.4.12", + "i18next-browser-languagedetector": "^7.0.1", + "i18next-parser": "^1.0.0-beta38", "mini-css-extract-plugin": "^1.6.0", "monaco-editor": "^0.30.1", "monaco-editor-webpack-plugin": "^6.0.0", @@ -45,6 +49,7 @@ "cross-env": "^7.0.3", "eslint": "^7.32.0", "eslint-config-prettier": "^6.9.0", + "eslint-plugin-i18n": "^2.1.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.17.0", "json-format": "^1.0.1", @@ -54,6 +59,7 @@ "pretty-format": "^27.0.2", "react": "^17.0.2", "react-dom": "^17.0.2", + "react-i18next": "^12.2.0", "react-redux": "^6.0.1", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", From 8a5545d47d7f3f824a9f4d907d78c0d660b354f9 Mon Sep 17 00:00:00 2001 From: yidafu Date: Mon, 20 Mar 2023 01:04:22 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 使用 jscodeshift 完成中文字面量的提取和转化 2. 校对了一部分的 t 函数的使用 --- web/ambient/Navigator.d.ts | 3 +- web/locales/README.md | 0 web/locales/en/translation.json | 774 +++++++++++++++++ web/locales/fr/translation.json | 783 ++++++++++++++++++ web/locales/i18n.ts | 30 + web/src/app.tsx | 49 +- web/src/index.tsx | 4 + web/src/menu.ts | 48 +- .../administration/accessLimiting/Page.tsx | 14 +- .../accessLimiting/PageDuck.tsx | 15 +- .../accessLimiting/detail/Page.tsx | 96 ++- .../accessLimiting/getColumns.tsx | 36 +- .../accessLimiting/operations/Create.tsx | 114 ++- .../accessLimiting/operations/CreateDuck.ts | 18 +- .../administration/accessLimiting/types.ts | 45 +- .../polaris/administration/breaker/Page.tsx | 85 +- .../administration/breaker/PageDuck.tsx | 13 +- .../breaker/faultDetect/Page.tsx | 43 +- .../breaker/faultDetect/PageDuck.tsx | 18 +- .../breaker/faultDetect/getColumns.tsx | 20 +- .../breaker/faultDetect/operations/Create.tsx | 66 +- .../faultDetect/operations/CreateDuck.ts | 20 +- .../breaker/faultDetect/types.ts | 4 +- .../administration/breaker/getColumns.tsx | 56 +- .../breaker/operations/Create.tsx | 160 ++-- .../breaker/operations/CreateDuck.ts | 22 +- .../polaris/administration/breaker/types.ts | 23 +- .../dynamicRoute/customRoute/Page.tsx | 23 +- .../dynamicRoute/customRoute/PageDuck.tsx | 15 +- .../dynamicRoute/customRoute/detail/Page.tsx | 64 +- .../dynamicRoute/customRoute/getColumns.tsx | 55 +- .../customRoute/operations/Create.tsx | 149 ++-- .../customRoute/operations/CreateDuck.ts | 24 +- .../dynamicRoute/customRoute/types.ts | 33 +- .../dynamicRoute/graypublish/Page.tsx | 9 +- .../dynamicRoute/graypublish/TabConfig.tsx | 45 +- .../dynamicRoute/testEnvRoute/Page.tsx | 5 +- .../dynamicRoute/testEnvRoute/TabConfig.ts | 13 +- web/src/polaris/alert/Page.tsx | 7 +- web/src/polaris/alert/detail/Page.tsx | 32 +- web/src/polaris/alert/getColumns.tsx | 47 +- web/src/polaris/alert/operation/Create.tsx | 33 +- web/src/polaris/alert/operation/CreateDuck.ts | 22 +- web/src/polaris/alert/types.ts | 41 +- .../polaris/auth/common/UseableResource.tsx | 24 +- web/src/polaris/auth/constants.ts | 9 +- web/src/polaris/auth/login/Page.tsx | 28 +- web/src/polaris/auth/login/PageDuck.ts | 9 +- web/src/polaris/auth/policy/Page.tsx | 66 +- web/src/polaris/auth/policy/PageDuck.ts | 8 +- .../polaris/auth/policy/operation/Create.tsx | 88 +- .../auth/policy/operation/CreateDuck.ts | 14 +- web/src/polaris/auth/user/Page.tsx | 9 +- web/src/polaris/auth/user/PageDuck.tsx | 18 +- web/src/polaris/auth/user/detail/Page.tsx | 37 +- web/src/polaris/auth/user/detail/PageDuck.ts | 22 +- web/src/polaris/auth/user/getColumns.tsx | 27 +- .../auth/user/operation/AttachUserGroup.tsx | 13 +- web/src/polaris/auth/user/operation/Auth.tsx | 13 +- .../polaris/auth/user/operation/AuthDuck.ts | 4 +- .../auth/user/operation/CreateUser.tsx | 36 +- .../auth/user/operation/CreateUserDuck.ts | 32 +- .../auth/user/operation/ModifyComment.tsx | 13 +- .../user/operation/ResourcePrincipalAuth.tsx | 11 +- .../polaris/auth/user/operation/ShowToken.tsx | 5 +- web/src/polaris/auth/userGroup/Page.tsx | 9 +- web/src/polaris/auth/userGroup/PageDuck.tsx | 18 +- .../polaris/auth/userGroup/detail/Page.tsx | 25 +- .../polaris/auth/userGroup/detail/PageDuck.ts | 20 +- web/src/polaris/auth/userGroup/getColumns.tsx | 21 +- .../auth/userGroup/operation/Create.tsx | 17 +- .../auth/userGroup/operation/CreateDuck.ts | 14 +- .../polaris/common/components/BaseLayout.tsx | 70 +- .../polaris/common/components/LabelTable.tsx | 21 +- .../common/components/MetadataSelectPanel.tsx | 11 +- .../common/components/MocacoEditor.tsx | 6 +- .../polaris/common/components/SortList.tsx | 195 +++-- .../common/components/TableFormControl.tsx | 2 +- .../polaris/common/components/TagTable.tsx | 21 +- .../polaris/common/components/TimeSelect.tsx | 7 +- web/src/polaris/common/components/csv.ts | 266 +++--- .../polaris/common/duckComponents/Confirm.tsx | 79 +- .../common/duckComponents/DetailPage.tsx | 85 +- .../polaris/common/duckComponents/Dialog.tsx | 115 ++- .../duckComponents/DispatchProvider.tsx | 40 +- .../common/duckComponents/FieldManager.tsx | 364 ++++---- .../polaris/common/duckComponents/Grid.tsx | 97 +-- .../common/duckComponents/GridPageGrid.tsx | 80 +- .../duckComponents/GridPagePagination.tsx | 62 +- .../duckComponents/SearchableSelect.tsx | 562 ++++++------- .../duckComponents/SearchableTeaSelect.tsx | 101 +-- .../duckComponents/SearchableTransfer.tsx | 23 +- .../common/duckComponents/form/Checkbox.tsx | 12 +- .../common/duckComponents/form/Control.tsx | 5 +- .../common/duckComponents/form/Field.tsx | 26 +- .../common/duckComponents/form/Input.tsx | 5 +- .../duckComponents/form/InputNumber.tsx | 7 +- .../common/duckComponents/form/Number.tsx | 2 +- .../common/duckComponents/form/Select.tsx | 5 +- .../common/duckComponents/form/Switch.tsx | 2 +- .../common/duckComponents/grid/Action.tsx | 36 +- .../common/ducks/AbstractSearchableList.ts | 732 ++++++++-------- web/src/polaris/common/ducks/Confirm.tsx | 52 +- web/src/polaris/common/ducks/DialogPure.ts | 137 ++- web/src/polaris/common/ducks/DynamicDuck.ts | 125 ++- web/src/polaris/common/ducks/Fetcher.ts | 176 ++-- web/src/polaris/common/ducks/Form.ts | 7 +- web/src/polaris/common/ducks/FormDialog.ts | 210 ++--- web/src/polaris/common/ducks/Grid.ts | 223 +++-- web/src/polaris/common/ducks/GridPage.ts | 567 ++++++------- web/src/polaris/common/ducks/Page.ts | 17 +- .../polaris/common/ducks/SearchableList.ts | 54 +- .../polaris/common/ducks/SearchableSelect.ts | 86 +- .../common/ducks/utils/completer/Base.ts | 162 ++-- .../common/ducks/utils/completer/combine.ts | 116 +-- .../common/ducks/utils/completer/filter.ts | 115 ++- .../ducks/utils/completer/getBufferUpdate.ts | 143 ++-- .../common/ducks/utils/completer/index.ts | 10 +- .../ducks/utils/completer/wrapListUpdate.ts | 34 +- web/src/polaris/common/helpers/cacheable.ts | 210 +++-- web/src/polaris/common/helpers/index.tsx | 19 +- web/src/polaris/common/helpers/insertCSS.ts | 29 +- web/src/polaris/common/helpers/log.ts | 72 +- web/src/polaris/common/helpers/saga.ts | 39 +- web/src/polaris/common/helpers/showDialog.tsx | 315 ++++--- web/src/polaris/common/helpers/visibility.ts | 56 +- web/src/polaris/common/helpers/wait.ts | 196 +++-- web/src/polaris/common/hooks/index.ts | 10 +- web/src/polaris/common/hooks/useControlled.ts | 2 +- web/src/polaris/common/types/index.ts | 8 +- web/src/polaris/common/util/apiRequest.ts | 21 +- web/src/polaris/common/util/tips.tsx | 98 +-- .../polaris/configuration/fileGroup/Page.tsx | 20 +- .../configuration/fileGroup/PageDuck.ts | 8 +- .../configuration/fileGroup/detail/Page.tsx | 3 +- .../fileGroup/detail/file/FileDiff.tsx | 9 +- .../fileGroup/detail/file/Page.tsx | 93 ++- .../fileGroup/detail/file/PageDuck.tsx | 22 +- .../fileGroup/detail/file/constants.ts | 7 +- .../detail/file/operation/Create.tsx | 47 +- .../detail/file/operation/CreateDuck.ts | 36 +- .../detail/file/operation/GetFileTemplate.tsx | 26 +- .../file/operation/GetFileTemplateDuck.ts | 6 +- .../configuration/fileGroup/getColumns.tsx | 25 +- .../fileGroup/operation/Create.tsx | 20 +- .../fileGroup/operation/CreateDuck.ts | 16 +- .../configuration/releaseHistory/Page.tsx | 22 +- .../configuration/releaseHistory/PageDuck.tsx | 6 +- .../releaseHistory/getColumns.tsx | 15 +- web/src/polaris/monitor/LabelFetcher.ts | 28 +- web/src/polaris/monitor/MetricFetcher.ts | 40 +- web/src/polaris/monitor/Page.tsx | 102 +-- web/src/polaris/monitor/PageDuck.ts | 90 +- web/src/polaris/monitor/operations/Create.tsx | 185 ++--- .../polaris/monitor/operations/CreateDuck.ts | 126 ++- .../monitor/registryMonitor/MetricCard.tsx | 5 +- .../polaris/monitor/registryMonitor/Page.tsx | 27 +- .../monitor/registryMonitor/overview/Page.tsx | 23 +- .../monitor/registryMonitor/server/Page.tsx | 77 +- .../monitor/registryMonitor/service/Page.tsx | 51 +- .../polaris/monitor/registryMonitor/types.ts | 234 +++--- web/src/polaris/monitor/types.ts | 71 +- web/src/polaris/namespace/Page.tsx | 9 +- web/src/polaris/namespace/PageDuck.ts | 8 +- web/src/polaris/namespace/getColumns.tsx | 23 +- .../polaris/namespace/operation/Create.tsx | 18 +- .../polaris/namespace/operation/CreateDuck.ts | 2 +- web/src/polaris/service/Page.tsx | 42 +- web/src/polaris/service/PageDuck.ts | 4 +- web/src/polaris/service/csvColumns.ts | 19 +- web/src/polaris/service/detail/Page.tsx | 2 +- web/src/polaris/service/detail/PageDuck.ts | 2 +- .../service/detail/circuitBreaker/Page.tsx | 73 +- .../service/detail/circuitBreaker/PageDuck.ts | 24 +- .../detail/circuitBreaker/csvColumns.ts | 9 +- .../detail/circuitBreaker/getColumns.tsx | 39 +- .../circuitBreaker/operations/Create.tsx | 71 +- .../circuitBreaker/operations/CreateDuck.ts | 12 +- .../service/detail/circuitBreaker/types.ts | 192 ++--- web/src/polaris/service/detail/info/Page.tsx | 83 +- .../polaris/service/detail/info/PageDuck.ts | 44 +- .../polaris/service/detail/instance/Page.tsx | 87 +- .../service/detail/instance/PageDuck.ts | 111 ++- .../service/detail/instance/csvColumns.ts | 19 +- .../service/detail/instance/getColumns.tsx | 53 +- .../detail/instance/operations/Create.tsx | 78 +- .../detail/instance/operations/CreateDuck.ts | 10 +- .../polaris/service/detail/instance/types.ts | 11 +- web/src/polaris/service/detail/route/Page.tsx | 54 +- .../polaris/service/detail/route/PageDuck.ts | 8 +- .../service/detail/route/csvColumns.ts | 19 +- .../service/detail/route/getColumns.tsx | 33 +- .../detail/route/operations/Create.tsx | 86 +- .../detail/route/operations/CreateDuck.ts | 36 +- web/src/polaris/service/detail/route/types.ts | 11 +- web/src/polaris/service/detail/types.ts | 11 +- web/src/polaris/service/getColumns.tsx | 21 +- web/src/polaris/service/index.ts | 8 +- web/src/polaris/service/operation/Create.tsx | 32 +- .../polaris/service/operation/CreateDuck.ts | 14 +- web/src/polaris/service/utils.tsx | 5 +- web/src/polaris/serviceAlias/Page.tsx | 26 +- web/src/polaris/serviceAlias/PageDuck.ts | 11 +- web/src/polaris/serviceAlias/getColumns.tsx | 23 +- .../polaris/serviceAlias/operation/Create.tsx | 18 +- .../serviceAlias/operation/CreateDuck.ts | 6 +- web/tsconfig.json | 3 +- 207 files changed, 7491 insertions(+), 5553 deletions(-) create mode 100644 web/locales/README.md create mode 100644 web/locales/en/translation.json create mode 100644 web/locales/fr/translation.json create mode 100644 web/locales/i18n.ts diff --git a/web/ambient/Navigator.d.ts b/web/ambient/Navigator.d.ts index ab9be528..9b3a3e47 100644 --- a/web/ambient/Navigator.d.ts +++ b/web/ambient/Navigator.d.ts @@ -1,4 +1,3 @@ interface Navigator { - msSaveOrOpenBlob: (blob: Blob ,fileName: string) => void + msSaveOrOpenBlob: (blob: Blob, fileName: string) => void } - \ No newline at end of file diff --git a/web/locales/README.md b/web/locales/README.md new file mode 100644 index 00000000..e69de29b diff --git a/web/locales/en/translation.json b/web/locales/en/translation.json new file mode 100644 index 00000000..e72958fe --- /dev/null +++ b/web/locales/en/translation.json @@ -0,0 +1,774 @@ +{ + "文档": "documentation", + "账号信息": "Account Information", + "退出": "quit", + "语言": "Language", + "中文": "Chinese", + "英语": "English", + "北极星服务治理": "Polaris Service Governance", + "命名空间": "Namespace", + "注册中心": "Registration Center", + "服务列表": "List of services", + "服务别名": "Service alias", + "服务网格": "Service mesh", + "动态路由": "Dynamic routing", + "自定义路由": "Custom routes", + "测试环境路由": "Test environment routing", + "灰度发布": "Grayscale publishing", + "熔断降级": "Fusing degrade", + "访问限流": "Access throttling", + "配置中心": "Configure the hub", + "配置分组": "Configure grouping", + "发布历史": "Release history", + "可观测性": "Observability", + "注册配置监控": "Register for configuration monitoring", + "流量监控": "Traffic monitoring", + "权限控制": "Permission control", + "用户": "user", + "用户组": "User groups", + "策略": "tactics", + "多个请求匹配规则之间是且的关系": "Multiple requests match a relationship between a rule that is AND", + "部分匹配运算符的说明如下:": "The partial match operators are described below:", + "包含:多字符串取OR匹配,传入的值只要匹配到其中一个字符串,就算匹配成功。字符串之间使用逗号进行分割。值格式为'value1,value2,value3‘,匹配到其中一个就算成功。": "Contains: Multiple strings take OR matching, and as long as the value passed in matches one of the strings, the match is successful. Strings are separated by commas. The value format is 'value1,value2,value3', and matching one of them is considered successful.", + "不包含:多字符串取反匹配,传入的值必须都没有出现在所配置的字符串列表中,才算匹配通过。值格式为'value1,value2,value3‘,全部不等于才算成功。": "Does not contain: Multi-string negation matching, the passed values must not appear in the configured string list to be considered matched. The value format is 'value1,value2,value3', all of which does not equal success.", + "限流规则名称": "The name of the throttling rule", + "限流类型": "Throttling type", + "限流规则详情": "Details of throttling rules", + "目标服务": "Target service", + "您可以对目标服务的指定接口设置限流规则。当该接口被调用时,符合匹配规则的请求,则会触发限流规则": "You can set throttling rules on specified interfaces of target services. When this interface is called, a throttling rule is triggered for requests that match the rules", + "服务名称": "Service name", + "接口名称": "Interface name", + "请求匹配规则": "Request matching rules", + "类型": "type", + "限流规则": "Throttling rules", + "限流条件": "Current limiting conditions", + "满足以下任意条件即可触发限流": "If any of the following conditions are met, throttling can be triggered", + "限流阈值": "Throttling threshold", + "统计窗口时长": "Statistics window duration", + "请求数阈值": "Threshold for the number of requests", + "次": "times", + "合并计算阈值": "Consolidate the thresholds", + "如果目标请求匹配到多个接口及参数,则将匹配到的所有请求汇合,合并计算阈值,具体规则查看": "If the target request matches multiple interfaces and parameters, all the matching requests are pooled, the threshold is calculated, and the specific rules are viewed", + "是": "be", + "否": "not", + "限流方案": "Current limiting scheme", + "满足限流触发条件后的处理方案": "Scenario for processing after the current limit trigger condition is met", + "限流效果": "Current limiting effect", + "失败处理策略": "Failure handling policy", + "当出现通信失败或者 Token Server 不可用时,限流方案退化到单机限流的模式": "When communication fails or the token server is unavailable, the throttling scheme degrades to the stand-alone mode", + "最大排队时长": "Maximum queue length", + "秒": "second", + "是否启用": "Whether it is enabled", + "ID/规则名": "ID/rule name", + "状态": "state", + "已启用": "Enabled", + "未启用": "Not enabled", + "创建时间/修改时间": "Created/Modified", + "启用时间": "Enable time", + "操作": "operate", + "禁用": "disable", + "启用": "enable", + "编辑": "edit", + "删除": "Delete", + "请选择命名空间": "Please select a namespace", + "请输入Key值": "Please enter the Key value", + "请选择服务名": "Please select a service name", + "请输入Value值": "Please enter the Value value", + "编辑服务限流规则": "Edit the service throttling rule", + "新建服务限流规则": "Create a service throttling rule", + "最长64个字符": "Up to 64 characters", + "没有匹配的服务名称": "There is no matching service name", + "请输入接口名称,默认全选": "Please enter an interface name to select all by default", + "添加": "Add to", + "删除所有": "Delete all", + "提交": "submit", + "取消": "Cancel", + "请填写限流规则名称": "Enter a name for the throttling rule", + "请选择类型": "Please select a type", + "请输入IP": "Please enter the IP", + "请输入value值": "Please enter a value value", + "请输入key值": "Please enter the key value", + "新建限流规则": "Create a throttling rule", + "请输入规则名过滤": "Please enter the rule name to filter", + "全部": "all", + "确认删除限流规则 {{attr0}} 吗?": "Confirm the deletion of throttling rule {{attr0}}?", + "删除后,无法恢复": "Once deleted, it cannot be recovered", + "确认{{attr0}}限流规则 {{attr1}} 吗?": "Confirm {{attr0}}} throttling rule {{attr1}}?", + "单机限流": "Stand-alone current limiting", + "分布式限流": "Distributed throttling", + "快速失败": "Fail fast", + "匀速排队": "Line up at a constant speed", + "全匹配": "Full match", + "正则表达式": "regular expression", + "不等于": "Not equal to", + "包含": "contain", + "不包含": "Does not contain", + "自定义": "Customization", + "请求头(HEADER)": "REQUEST HEADER", + "请求参数(QUERY)": "REQUEST PARAMETERS (QUERY)", + "方法(METHOD)": "METHOD", + "主调服务": "Tuning service", + "主调IP": "Dominant IP", + "退化至单机限流": "Degenerate to stand-alone current limit", + "直接通过": "Direct pass", + "分钟": "minute", + "小时": "hour", + "服务": "serve", + "接口": "interface", + "编辑主动探测规则": "Edit the active probe rule", + "新建主动探测规则": "Create a new active probe rule", + "规则名称": "Rule name", + "描述": "description", + "全部命名空间": "All namespaces", + "全部服务": "All services", + "(输入值){{attr0}}": "(Enter value) {{attr0}}", + "请输入接口名称": "Please enter an interface name", + "周期": "cycle", + "超时时间": "Timeout", + "端口": "port", + "协议": "agreement", + "服务实例下需要存在所选择用于探测的协议,否则无法探测无法生效": "The protocol selected for probing must exist under the service instance, otherwise the probe cannot take effect", + "方法": "method", + "请输入url 以/开头": "Please enter URLs that begin with /", + "header键": "header key", + "header值": "Header value", + "请填写规则名称": "Please fill in the rule name", + "名称只能含有数字,字母,下划线及中划线": "Names can only contain numbers, letters, underscores and hyphens", + "请输入超时时间": "Please enter a timeout period", + "请输入url": "Please enter the URL", + "请输入键": "Please enter a key", + "请输入值": "Please enter a value", + "规则名": "Rule name", + "目标命名空间": "Target namespace", + "目标方法": "Target method", + "请选择条件进行过滤": "Please select criteria to filter", + "确认删除规则 {{attr0}} 吗?": "Confirm delete rule {{attr0}}?", + "命名空间:": "Namespace:", + "服务:": "Serve:", + "被调服务": "Transferred service", + "接口:": "Interface:", + "编辑熔断规则": "Edit the circuit breaker rule", + "新建熔断规则": "Create a new circuit breaker rule", + "匹配条件": "Match criteria", + "熔断配置": "Fusing configuration", + "错误判断条件": "Error judgment conditions", + "满足以下任意应答条件的请求会被标识为错误请求": "Requests that meet any of the following answer criteria are identified as bad requests", + "超过": "exceed", + "毫秒": "millisecond", + "熔断触发条件": "Fusing trigger conditions", + "满足以下任意条件可触发熔断": "A circuit breaker can be triggered if any of the following conditions are met", + "统计周期": "Statistical period", + "最小请求数": "Minimum number of requests", + "个": "piece", + "熔断粒度": "Fusing particle size", + "熔断触发时影响的资源粒度": "Resource granularity affected when a circuit breaker is triggered", + "熔断恢复": "Fusing recovery", + "经过熔断时长后,会触发熔断恢复机制,若符合预期,则结束熔断;否则重新回到熔断阶段": "After the fusing time, the fusing recovery mechanism will be triggered, and if it meets the expectations, the fusing will be terminated; Otherwise, go back to the circuit breaker phase", + "熔断时长": "Duration of circuit breakers", + "熔断恢复策略": "Fusing recovery strategy", + "当满足": "When satisfied", + "个连续成功请求后恢复": "Recover after successive successful requests", + "主动探测": "Active probing", + "开启主动探测时,客户端将会根据您配置的探测规则对目标被调服务进行探测; 主动探测请求与业务调用合并判断熔断恢复(如未匹配到探测规则,则不会生效); 未开启主动探测时,会仅根据业务调用判断熔断恢复。": "When active detection is enabled, the client probes the target service according to the probe rules that you configure. The active probe request and the service call are merged to determine circuit breaker recovery (if the probe rule is not matched, it will not take effect); If active detection is not enabled, circuit breaker recovery is judged based on service calls.", + "查看主动探测规则": "Review the active probe rules", + "熔断后降级": "Degrade after circuit breaker", + "自定义响应": "Customize the response", + "熔断触发后的降级响应策略": "Downgrade response policy after circuit breaker triggering", + "返回码": "Return code", + "是否开启": "Whether it is turned on or not", + "请填写路由规则名称": "Enter a routing rule name", + "请输入接口名": "Please enter an interface name", + "请输入条件": "Please enter conditions", + "请选择熔断粒度": "Please select the fusing particle size", + "源命名空间": "Source namespace", + "源服务": "Source service", + "% (统计周期:": "% (Statistical period:", + ",最小请求数:": ", minimum number of requests:", + "{{attr0}}秒": "{{attr0}} seconds", + "恢复策略": "Recovery policy", + "开启": "Open", + "关闭": "Shut down", + "消息头": "Message headers", + "消息体": "Message body", + "未开启": "Not turned on", + "确认{{attr0}}规则 {{attr1}} 吗?": "Confirm {{attr0}} rule {{attr1}}?", + "时延": "Delay", + "连续错误数": "Number of consecutive errors", + "错误率": "Error rate", + "实例": "instance", + "实例分组": "Instance grouping", + "服务级熔断": "Service-level circuit breaker", + "节点级熔断": "Node-level fusing", + "优先级": "Priority", + "主调请求按照匹配规则匹配成功后,将按照当前规则进行目标服务路由": "After the key request is successfully matched according to the matching rule, the destination service is routed according to the current rule", + "请求会按照规则路由到目标服务分组": "Requests are routed to the target service grouping according to the rules", + "路由策略": "Routing policies", + "规则{{attr0}}": "Rule {{attr0}}", + "来源服务的请求满足以下匹配条件": "The request from the source service satisfies the following match criteria", + "键": "key", + "匹配方式": "Matching method", + "值": "value", + "将转发至目标服务的以下实例分组": "Group the following instances that are forwarded to the target service", + "实例标签": "Instance tags", + "权重": "weight", + "是否隔离": "Whether to isolate", + "命名空间:": "Namespace:", + "服务:": "Serve:", + "没有匹配的标签键": "There is no matching tag key", + "请输入标签键": "Please enter a tag key", + "没有匹配的标签值": "There is no matching tag value", + "请输入标签值": "Please enter a tag value", + "请输入完整标签": "Please enter the full label", + "确认": "Confirm", + "编辑服务路由规则": "Edit the service routing rule", + "新建服务路由规则": "Create a new service routing rule", + "点击切换主被调服务": "Click Switch Primary Transferred Service", + "将转发至目标服务的一下实例分组": "Group the following instances that are forwarded to the target service", + "相对权重,数值范围:0-65535": "Relative weights, numeric range: 0-65535", + "添加规则": "Add a rule", + "优先级数字设置越小,匹配顺序越靠前": "The lower the priority number setting, the higher the match order", + "请输入标签分组": "Please enter a tag group", + "规则1": "Rule 1", + "主调命名空间": "The keynote namespace", + "被调命名空间": "The namespace is called", + "新建路由规则": "Create a new routing rule", + "确认删除路由规则 {{attr0}} 吗?": "Confirm the deletion of routing rule {{attr0}}?", + "确认{{attr0}}路由规则 {{attr1}} 吗?": "Confirm {{attr0}}} routing rule {{attr1}}?", + "等于": "amount", + "正则表达式匹配": "Regular expression matching", + "范围表达式": "Range expression", + "变量": "variable", + "请求Cookie(COOKIE)": "Request Cookie (COOKIE)", + "路径": "path", + "操作指引": "How-to instructions", + "蓝绿发布": "Blue-green release", + "金丝雀发布": "Canary Release", + "全链路灰度发布": "Full-link grayscale release", + "蓝绿发布路由": "Blue-green publish routes", + "金丝雀发布路由": "Canary publishes routes", + "针对是单个服务的服务灰度验证,金丝雀发布允许引流一小部分流量到服务的新版本(比如按灰度用户引流),充分验证微服务新版本的稳定性,验证没问题后,再升级原来的稳定版本。": "For the grayscale verification of a single service, Canary releases a new version that allows a small amount of traffic to be diverted to the service (such as drainage by grayscale users), fully verifies the stability of the new version of the microservice, verifies that there is no problem, and then upgrades the original stable version.", + "场景一": "Scenario one", + "场景二": "Scenario two", + "微服务架构下,有些开发需求,微服务调用链路上的多个微服务同时发生了改动, 通常每个微服务都会有灰度环境或分组来接收灰度流量。此时希望通过进入上游灰度环境的流量, 也能进入下游灰度的环境中,确保1个请求始终在灰度环境中传递,即使这个调用链路上有一些微服务没有灰度环境, 这些应用请求在下游的时候依然能够回到灰度环境中。": "Under the microservice architecture, there are some development requirements, and multiple microservices on the microservice call link are changed at the same time, and usually each microservice will have a grayscale environment or packet to receive grayscale traffic. At this time, it is hoped that through the traffic entering the upstream grayscale environment, it can also enter the downstream grayscale environment to ensure that one request is always passed in the grayscale environment, even if some microservices on this call link do not have a grayscale environment, these application requests can still return to the grayscale environment when downstream.", + "实现方案的两个场景:": "Two scenarios for the implementation scenario:", + "应用场景一:金丝雀环境和稳定环境有独立的域名进行隔离,实现全链路灰度。": "Application scenario 1: The canary environment and the stable environment are isolated by independent domain names to achieve full-link grayscale.", + "应用场景二:使用相同域名,基于请求标签实现全链路灰度。": "Application scenario 2: Use the same domain name to implement full-link grayscale based on request labels.", + "客户端染色": "Client-side staining", + "网关动态染色": "Dynamic staining of gateways", + "网关静态染色": "Gateway static staining", + "客户端染色流程指引": "Client-side dyeing process guidelines", + "网关动态染色流程指引": "Gateway dynamic dyeing process guidance", + "网关静态染色流程指引": "Gateway static staining process guide", + "告警策略名称": "The name of the alarm policy", + "启用状态": "Enabled state", + "监控类型": "Monitoring type", + "更新时间": "Update time", + "触发条件": "Trigger conditions", + "持续": "persistent", + "告警周期": "Alert period", + "每隔": "Everyday", + "告警一次": "Alarm once", + "告警主题": "Alert subject", + "通知回调地址": "Notification callback address", + "策略ID/名称": "Policy ID/Name", + "告警规则": "Alarm rules", + "创建时间": "Creation time", + "编辑告警策略": "Edit the alert policy", + "新建告警策略": "Create an alert policy", + "名字": "name", + "当": "while", + "持续时间": "duration", + "告警消息": "Alert messages", + "请填写名称": "Please fill in the name", + "请填写监控类型": "Please fill in the monitoring type", + "请选择请求指标": "Select a request metric", + "请选择表达式": "Please select an expression", + "请选择阈值": "Please select a threshold", + "请输入持续时长": "Please enter the duration", + "请选择持续时长单位": "Please select a duration unit", + "请选择告警周期": "Select Alert Period", + "请输入告警主题": "Please enter the alert subject", + "请输入告警消息": "Please enter an alarm message", + "业务监控": "Business monitoring", + "监控曲线": "Monitor the curve", + "环比波动": "Month-on-month volatility", + "环比上升": "Sequential increase", + "环比下降": "Decreased sequentially", + "天": "day", + "服务发现连接数": "The number of service discovery connections", + "配置获取连接数": "Configure the number of connections to get", + "客户端数": "Number of clients", + "每1分钟告警一次": "Alerts every 1 minute", + "每5分钟告警一次": "Alerts every 5 minutes", + "每15分钟告警一次": "Alerts every 15 minutes", + "每1小时告警一次": "Alerts every 1 hour", + "每4小时告警一次": "Alarm every 4 hours", + "每天告警一次": "Alert once a day", + "名称": "name", + "所有命名空间": "All namespaces", + "所有服务": "All services", + "所有配置分组": "All configurations are grouped", + "权限": "Permissions", + "读|写": "Read | write", + "权限策略": "Permissions policy", + "可操作资源": "Actionable resources", + "License已超过最大过期时间": "The license has exceeded the maximum expiration time", + "北极星服务治理中心": "Polaris Service Governance Center", + "一个支持多语言、多框架和异构基础设施的服务治理中心,提供服务发现、流量调度、熔断降级、限流鉴权和可观测性等服务治理功能。北极星治理中心默认提供服务注册功能,也可以搭配其他服务注册中心使用。": "A service governance center that supports multi-language, multi-framework, and heterogeneous infrastructure, providing service governance functions such as service discovery, traffic scheduling, circuit breaker degradation, throttling authentication, and observability. The Polaris Governance Center provides service registration by default and can also be used with other service registries.", + "登录": "login", + "外网访问建议设置访问控制策略": "We recommend that you set an access control policy for Internet access", + "初始用户名和密码为": "The initial user name and password are ", + "用户名": "User name", + "密码": "password", + "网络异常或用户名,密码错误": "Network anomalies or wrong username, password", + "请输入用户名": "Please enter a username", + "请输入密码": "Please enter a password", + "选择用户": "Select the user", + "授权": "authorization", + "预览": "Preview", + "编辑策略": "Edit the policy", + "创建策略": "Create a policy", + "备注": "remark", + "角色": "role", + "请选择用户": "Please select a user", + "请选择用户组": "Please select a user group", + "默认策略不可变更授权角色": "The default policy does not change the authorization role", + "资源": "resource", + "全部命名空间(含后续新增)": "All namespaces (with subsequent additions)", + "指定命名空间": "Specifies the namespace", + "全部服务(含后续新增)": "All services (including future additions)", + "指定服务": "Specify the service", + "请选择服务": "Please select a service", + "全部配置分组(含后续新增)": "All configuration groupings (with subsequent additions)", + "指定配置分组": "Specifies the configuration grouping", + "请选择配置分组": "Please select Configure Grouping", + "读操作|写操作": "Read operation | write operation", + "策略名称": "The policy name", + "无选中用户": "No user selected", + "无选中用户组": "No user group selected", + "完成": "finish", + "下一步": "Next", + "上一步": "Previous step", + "编辑成功": "Edit successfully", + "编辑失败": "Edit failed", + "创建成功": "Created successfully", + "创建失败": "Creation failed", + "请输入名称": "Please enter a name", + "只能使用中文、数字、大小写字母 以及- _组成": "Only Chinese, numbers, uppercase and lowercase letters, and - _ can be used", + "最大长度为64": "The maximum length is 64", + "(用户组)": "(User Group)", + "(用户)": "(User)", + "新建策略": "Create a new policy", + "默认策略(": "Default policy (", + "自定义策略(": "Custom policy (", + "无备注": "No remarks", + "用户|用户组": "User|User group", + "暂无对应授权对象": "There is no corresponding authorization object", + "全部{{attr0}}(含后续新增)": "All {{attr0}}} (with subsequent additions)", + "暂无选中策略": "No policy is selected", + "确认删除如下策略?": "Confirm the deletion of the following policies?", + "删除后,策略不可用且无法恢复": "Once deleted, the policy is unavailable and cannot be recovered", + "删除成功": "The deletion was successful", + "删除失败": "Delete failed", + "用户详情({{attr0}})": "User details({{attr0}})", + "用户信息": "User Information", + "修改密码": "Change the password", + "账号名": "Account name", + "账号ID": "Account ID", + "手机号": "Mobile phone number", + "邮箱": "mailbox", + "生效中": "In force", + "已失效": "Expired", + "重置": "reset", + "仅主账号可查看Token": "Only the primary account can view the token", + "修改成功": "The modification was successful", + "修改失败": "Modification failed", + "{{attr0}}成功": "{{attr0}}} succeeds", + "{{attr0}}失败": "{{attr0}}} failed", + "重置成功": "The reset was successful", + "您已成功重置Token,请重新登录。": "You have successfully reset the token, please log in again.", + "重置失败": "Reset failed", + "(当前登录)": "(currently logged in)", + "用户类型": "User type", + "主账号": "Master Account", + "子账号": "Sub-account", + "用户id": "User ID", + "查看Token": "Check out the Token", + "更多": "more", + "关联用户组": "Associate user groups", + "确定": "Are you sure", + "授权策略": "Authorization policy", + "请选择策略": "Please select a policy", + "未做改动": "No changes have been made", + "请输入6至17位的密码": "Please enter a 6 to 17 digit passcode", + "编辑用户": "Edit the user", + "新建用户": "Create a new user", + "旧密码": "Old password", + "如果您忘记了您的旧密码,可以联系您的主账号来重置密码": "If you have forgotten your old password, you can contact your master account to reset it", + "新密码": "New password", + "确认密码": "Confirm the password", + "修改密码成功": "The password was changed successfully", + "您已成功重置密码,请重新登录。": "You have successfully reset your password, please log in again.", + "修改密码失败": "Failed to change password", + "请输入旧密码": "Please enter your old password", + "请输入新密码": "Please enter a new password", + "请确认密码": "Please confirm your password", + "两次输入密码不一致": "The password is entered twice inconsistently", + "修改备注": "Modify the comment", + "请输入备注": "Please enter a comment", + "授予权限的用户或者用户组,具有该命名空间的读写权限,所有用户具有读权限": "The user or user group that grants permission has read and write permissions for the namespace, and all users have read permissions", + "支持按住shift进行多选": "Support holding down shift to multi-select", + "新建": "newly built", + "编辑用户组": "Edit a user group", + "确认删除用户?": "Confirm deleting users?", + "删除后,用户不可用且无法恢复": "Once deleted, the user is unavailable and cannot be recovered", + "查看{{attr0}}的token": "View the token for {{attr0}}", + "用户组详情({{attr0}})": "User Group Details ({{attr0}})", + "用户组名": "User group name", + "用户组ID": "User group ID", + "用户组名称": "User group name", + "用户数量": "Number of users", + "新建用户组": "Create a new user group", + "关联成功": "The association was successful", + "确认删除用户组?": "Confirm deletion of user groups?", + "删除后,用户组不可用且无法恢复": "Once deleted, user groups are unavailable and cannot be recovered", + "因为浏览器限制,此文件仅保存了部分内容": "Due to browser limitations, only part of the contents of this file are saved", + "标签键": "Tag key", + "标签值": "Label value", + "暂无标签": "No label", + "请输入完整键值对": "Please enter the full key-value pair", + "编辑器正在加载中": "The editor is loading", + "排序": "sort", + "标签名": "Label name", + "key 最长不超过128个字符": "The maximum key is 128 characters", + "value 最长不超过4096个字符": "value can be up to 4096 characters long", + "新增": "New", + "近24小时": "Nearly 24 hours", + "近3天": "Nearly 3 days", + "近7天": "Last 7 days", + "加载中": "Loading", + "未找到指定资源,请检查资源是否存在": "The specified resource is not found, check if the resource exists", + "设置成功": "Setup successful", + "请选择您想显示的列表详细信息。": "Please select the list details you want to display.", + "根据您的分辨率,最多可勾选{{attr0}}个字段,已勾选{{attr1}}个。": "Depending on your resolution, up to {{attr0}} fields can be checked, and {{attr1}}} is checked.", + "自定义列表字段": "Custom list fields", + "请选择": "Please select", + "加载失败": "Load failed", + "输入关键字搜索": "Enter a keyword search", + "暂无数据": "No data yet", + "找到{{attr0}}条结果": "Find {{attr0}} results", + "搜索\"{{attr0}}\"暂无数据": "Search for \"{{attr0}}\" and no data", + "已选择 ({{attr0}})": "已選擇({{attr0}})", + "提交失败": "Commit failed", + "[deprecated] 建议使用对象递归,而不在返回值内递归": "[deprecated] It is recommended to use object recursion rather than recursion within the return value", + "当前导出进度:{{attr0}}%": "Current export progress: {{attr0}}%", + "此浏览器版本过低,不支持导出功能": "This browser version is too old to support the export feature", + "因文件过大,自动拆分为多个文件下载": "Due to the large file size, it is automatically split into multiple files for download", + "导出成功": "Export successful", + "导出失败": "Export failed", + "请求错误": "Request error", + "发布成功": "The release was successful", + "发布失败": "Publishing failed", + "编辑待发布": "Edit to be published", + "历史发布": "Historical release", + "当前发布": "Currently published", + "编辑配置文件": "Edit the configuration file", + "新建配置文件": "Create a new profile", + "配置文件名": "Configuration file name", + "可通过/分隔符创建文件夹,强烈建议文件名带上后缀,如:datasource/master": "Folders can be created with the / delimiter, and it is strongly recommended that the file name be suffixed with a suffix, such as datasource/master", + "文件格式: ": "File format:", + "允许数字、英文字母、": "Numbers, English letters,", + "长度不超过1024个字符": "The length does not exceed 1024 characters", + "配置标签": "Configure labels", + "该配置分组为只读配置分组": "The configuration grouping is read-only", + "该命名空间为只读命名空间": "The namespace is read-only", + "请填写文件名": "Please fill in the file name", + "文件夹名字不可为空": "The folder name cannot be empty", + "请选择分组": "Please select a group", + "请选择格式": "Please select a format", + "应用模板": "Apply the template", + "应用": "apply", + "模板": "template", + "提供常用的配置文件模板,以方便进行快速配置": "Provides commonly used profile templates for quick configuration", + "当前选择的模板与配置文件格式不符": "The currently selected template does not match the profile format", + "模板格式": "Template format", + "模板描述": "Template description", + "模板预览": "Template preview", + "请确认应用模板": "Confirm that the template is applied", + "应用所选模板将会覆盖当前已编辑的内容": "Applying the selected template overwrites the currently edited content", + "您当前选择的模板与配置文件格式不符,请检查后重试。": "The template you currently selected does not match the configuration file format, please check and try again.", + "刷新成功": "Refresh succeeded", + "刷新配置": "Refresh the configuration", + "提示": "prompt", + "注意,刷新会导致丢失当前编辑内容": "Note that refreshing causes the current edits to be lost", + "请输入文件名搜索": "Please enter a file name to search", + "查看发布历史": "View the release history", + "最后修改时间": "Last modified", + "最后发布时间": "Last published", + "标签": "label", + "最后修改人": "Last modifier", + "最后发布人": "Last Publisher", + "格式": "format", + "发布": "publish", + "保存": "Save", + "版本": "version", + "发布时间": "Release time", + "请选择发布记录": "Please select Publish Record", + "未搜索到对应文件": "The file was not found", + "待发布": "To be released", + "确认删除配置文件?": "Confirm deleting the profile?", + "删除后,无法恢复。": "Once deleted, it cannot be recovered.", + "确认切换展示节点?": "Confirm switching display nodes?", + "编辑未发布,现在切换将丢失已编辑内容": "The edits were not published, and now the toggle will lose the edited content", + "内容对比": "Content comparison", + "保存成功": "Save successfully", + "保存失败": "Save failed", + "配置文件": "Configuration file", + "配置文件数": "Number of profiles", + "无权限": "No permissions", + "编辑配置文件组": "Edit the profile group", + "新建配置文件组": "Create a new profile group", + "分组名": "The group name", + "高级配置": "Advanced configuration", + "请填写分组名": "Please fill in the group name", + "请填写命名空间": "Please fill in the namespace", + "确认删除配置组": "Confirm the deletion of the configuration group", + "删除配置组也会同时删除配置组下所有配置文件,请谨慎删除。": "Deleting a configuration group also deletes all configuration files under the configuration group.", + "操作人": "Operator", + "查看详情": "See details", + "分组": "grouping", + "近1小时": "Nearly 1 hour", + "近1天": "Last 1 day", + "近1周": "For nearly 1 week", + "新建监控图表": "Create a monitoring chart", + "时间选择": "Time selection", + "指标名": "Indicator name", + "筛选条件": "Filter criteria", + "条件": "condition", + "条件值": "Contingent values", + "步长": "Step", + "主调方": "Principal party", + "主调": "Main key", + "汇总": "Summary", + "被调方": "Transferred party", + "被调": "Tuned", + "查询": "Inquire", + "暂无图表数据": "No chart data available", + "复制分享链接": "Copy the share link", + "保存当前配置": "Save the current configuration", + "载入保存配置": "Onboarding saves the configuration", + "筛选条件:": "Filter by:", + "无": "not", + "路由监控": "Route monitoring", + "熔断监控": "Fusing monitoring", + "限流监控": "Current limit monitoring", + "监控": "monitor", + "本次筛选配置将会请求大量数据": "This filtering configuration will request a large amount of data", + "请确认是否请求": "Please confirm whether it is requested", + "已保存": "Saved", + "客户端节点数": "The number of client nodes", + "客户端连接数": "The number of client connections", + "总请求数": "Total number of requests", + "客户端访问北极星服务端请求数": "The number of client access Polestar server requests", + "请求时延": "Request delay", + "客户端访问北极星服务端请求时延": "The client requests the delay of accessing the Polestar server", + "服务数": "Number of services", + "实例数": "Number of instances", + "配置分组数": "Configure the number of groups", + "配置数": "Number of configurations", + "概览": "Overview", + "服务和配置统计": "Service and configuration statistics", + "北极星服务端请求统计": "Polaris server request statistics", + "1秒": "1 second", + "1分": "1 point", + "5分": "5 points", + "1小时": "1 hour", + "全部命名空间汇总": "All namespaces summarized", + "时间范围": "Time range", + "时间粒度": "Time granularity", + "功能": "function", + "全部功能汇总": "Summary of all features", + "全部接口汇总": "Summary of all interfaces", + "无可选接口": "No optional interface", + "节点": "node", + "全部节点汇总": "All nodes are summarized", + "无节点": "No nodes", + "请求数": "Number of requests", + "失败请求数": "The number of failed requests", + "返回码分布": "Return code distribution", + "所有接口汇总-": "Summary of all interfaces-", + "所有节点汇总": "All nodes are summarized", + "{{attr0}}功能-{{attr1}}接口": "{{attr0}}}功能-{{attr1}}} interface", + "所有接口汇总": "Summary of all interfaces", + "{{attr0}}节点": "{{attr0}} node", + "全部汇总服务": "All summary services", + "无可选服务": "No optional services", + "全部配置分组汇总": "All configurations are grouped and summarized", + "无配置分组": "No configuration grouping", + "总节点数": "Total number of nodes", + "总连接数": "Total number of connections", + "注册中心连接数": "Number of registry connections", + "配置中心连接数": "Configure the number of hub connections", + "成功请求数": "The number of successful requests", + "请求成功率": "Request success rate", + "均值": "mean", + "最大值": "maximum", + "最小值": "minimum", + "总服务数": "Total number of services", + "在线服务数": "Number of online services", + "异常服务数": "The number of exception services", + "离线服务数": "Number of offline services", + "总实例数": "Total number of instances", + "在线实例数": "Number of online instances", + "隔离实例数": "Number of isolated instances", + "异常实例数": "The number of exception instances", + "配置分组总数": "Configure the total number of groups", + "已发布配置文件数": "Published the configuration file", + "总失败请求数": "Total number of failed requests", + "5xx失败请求数": "Number of failed requests in 5xx", + "4xx失败请求数": "4 xx failed requests", + "网络失败数": "Number of network failure", + "服务注册": "Service registration", + "服务发现": "Service discovery", + "健康检查": "Health check", + "配置读取": "Configuration read", + "成功数": "Number of successes", + "最大时延": "Maximum latency", + "平均时延": "Average latency", + "通过数": "Number of passes", + "限流数": "Number of current limits", + "熔断数": "Number of circuit breakers", + "半开数": "Half-open number", + "被调服务名": "The name of the service being transferred", + "被调接口名": "Modulated interface name", + "被调实例分组": "Grouping modulated instance", + "被调实例": "Modulated instance", + "被调请求标签": "The call request label", + "主调服务名": "The key service name", + "主调实例IP": "Advocate tone instance IP", + "主调请求标签": "Advocate tone request label", + "健康实例/总实例数": "Health instance/total number of instances", + "修改时间": "Modification time", + "编辑命名空间": "Edit the namespace", + "新建命名空间": "Create a new namespace", + "高级设置": "Advanced settings", + "请输入命名空间名称": "Please enter the namespace name", + "确认删除命名空间": "Confirm to delete the namespace", + "服务名": "The service name", + "接口名": "Interface name", + "{{attr0}}({{attr1}}匹配)": "{{attr0}}({{attr1}}} match)", + "该命名空间为只读的": "The namespace is read-only", + "无写权限": "Without written permission", + "在该规则前新建规则": "Create a new rule before the rule", + "正则模式下,使用*代表选择所有": "In regular mode, use * to select all", + "手动配置": "Manual configuration", + "JSON配置": "JSON configuration", + "以下服务": "The following services", + "本服务调用以下服务或者接口时": "This service call the following services or interfaces", + "调用本服务的以下接口时": "The following interfaces invoke this service", + "如果满足以下任意条件,进行熔断": "If meet the following conditions, carries on the fuse", + "最大响应时间": "Maximum response time", + "半开时间": "Half-open time", + "编辑方式": "Edit mode", + "JSON编辑": "JSON editor", + "请输入正确的JSON字符串": "Please enter the correct JSON string", + "请输入命名空间": "Please enter a namespace", + "请输入服务名": "Please enter a service name", + "编辑格式": "Edit the format", + "规则类型": "Rule type", + "未更改": "It has not changed", + "向服务器端提交变更": "Commit the changes to the server side", + "当以下服务调用本服务时,遵守下列熔断规则": "When the following services call this service, the following circuit breaker rules shall be observed", + "当本服务调用以下服务时,遵守下列熔断规则": "When this service call the following service, observe the ,following rules of the fuse", + "如果请求标签匹配,按以下策略熔断": "If the request label matches, follow the following policy to circuit breaker", + "熔断条件": "Fusing conditions", + "当请求个数大于{{attr0}}个,且{{attr1}}大于{{attr2}}%时熔断": "", + "以超过{{attr0}}的请求作为超时请求,{{attr1}}大于{{attr2}}%时熔断": "", + "当连续请求错误超过{{attr0}}个时熔断": "When the request error exceeds {{attr0}} a fuse", + "编辑规则": "Edit the rule", + "确认删除规则": "Confirm the deletion of the rule", + "连续错误率": "Continuous error rate", + "正则": "Regex", + "被调规则": "Adjusted rules", + "主调规则": "Tone rules", + "仅用于恢复": "For recovery only", + "用于熔断和恢复": "For fusing and recovery", + "部门": "department", + "业务": "business", + "版本号": "Version number", + "服务标签({{attr0}}个)": "Service Tags ({{attr0}})", + "就近访问": "Access to the nearest", + "实例IP": "Instance IP", + "健康状态": "Health status", + "隔离状态": "The isolated state", + "地区/地域/可用区": "Region/Region/Availability Zone", + "编辑服务实例": "Editing service instance", + "新建服务实例": "The new service instance", + "隔离状态下,主调方无法发现隔离的服务实例,无论实例IP是否健康": "In the isolated state, the host cannot discover the isolated service instance, regardless of whether the IP address of the instance is healthy", + "多个IP以英文逗号、英文分号、空格或换行分隔,每次最多添加100个IP": "Multiple IP commas in English, English semicolons, Spaces or line breaks space, add 100 IP at most", + "多个端口以英文逗号、英文分号、空格或换行分隔,每次最多添加100个端口": "Multiple ports are separated by commas, semicolons, spaces, or line breaks, and you can add up to 100 ports at a time", + "实例标签可用于标识实例的用处、特征, 标签数量不能超过64": "Instance tags can be used to identify the usefulness and characteristics of an instance, and the number of tags cannot exceed 64", + "地域信息": "Geographic information", + "请输入 Region": "Please enter Region", + "请输入 Zone": "Please enter Zone", + "请输入 Campus": "Please enter the Campus", + "开启健康检查": "Enable Health Check", + "如果开启,服务端负责检查服务实例的健康状态": "If enabled, the server is responsible for checking the health status of the service instance", + "健康检查方式": "Health check way", + "检查方式": "Check the way", + "请填写IP": "Please fill in the IP", + "请填写端口": "Please fill in the port", + "请填写权重": "Please fill in the weight", + "请选择检查方式": "Please choose the way to check", + "请填写TTL": "Please fill out the TTL", + "请选择实例": "Please select the instance", + "其他操作": "Other operating", + "复制IP": "Copy the IP", + "修改权重": "Modify the weight", + "修改健康状态": "Modify the health", + "修改隔离状态": "Modify the isolation", + "实例ID": "Instance ID", + "检查方式:": "Inspection method:", + "展示全部": "Show all", + "确认删除实例": "Confirm to delete the instance", + "心跳上报": "The heartbeat report", + "健康": "health", + "异常": "abnormal", + "隔离": "isolation", + "不隔离": "Don't isolate", + "请求标签": "Request the label", + "当以下服务调用本服务时": "When the following service call this service", + "当本服务调用以下服务时": "When this service call the following services", + "对带有以下标签的请求": "With the following the request of the label", + "标签键不能为空": "The TAB key can't be empty", + "标签值不能为空": "The label value cannot be empty", + "标签键不能一致": "TAB key cannot be consistent", + "新建一条规则": "A new rule", + "当以下服务调用本服务时,遵守下列路由规则": "When the following service call this service, abide by the following routing rules", + "当本服务调用以下服务时,遵守以下路由规则": "When this service call the following services, abide by the following routing rules", + "如果请求标签匹配,按权重和优先级路由到以下实例分组": "If the request label match, according to the weight and priority routing packet to the following examples", + "实例分组{{attr0}}": "Examples of grouping {{attr0}}", + "编辑路由规则": "Edit the routing rules", + "确认删除路由规则": "Confirm delete routing rules", + "图表编辑": "Graph editor", + "服务信息": "The service information", + "服务实例": "Service instance", + "路由规则": "Routing rules", + "熔断规则": "Rules of the fuse", + "编辑服务": "Editing service", + "新建服务": "The new service", + "开启就近访问": "Open access to the nearest", + "服务标签": "Service tag", + "服务标签可用于标识服务的用处、特征,格式为key:value": "Service tag can be used to identify services use, features, format for key: value", + "长度不超过1024个字符,标签数量不能超过64个": "Length of not more than 1024 characters, tag number cannot exceed 64", + "确认删除服务": "Confirm the deletion service", + "标签展示": "The label to show", + "指向服务": "Pointing to the service", + "别名所在命名空间": "Alias in the namespace", + "请选择指向服务": "Please select a service", + "请选择别名所在命名空间": "Please select a namespace alias is", + "请填写别名": "Please fill out the alias", + "服务别名可以看作是服务的映射,访问服务别名等同于访问服务,允许多个服务别名指向同一个服务": "Service alias can be regarded as a mapping, access server alias is equivalent to access services, allows multiple alias point to the same services", + "新建别名": "The new alias", + "确认删除服务别名": "Confirm the deletion service alias" +} \ No newline at end of file diff --git a/web/locales/fr/translation.json b/web/locales/fr/translation.json new file mode 100644 index 00000000..8acfd332 --- /dev/null +++ b/web/locales/fr/translation.json @@ -0,0 +1,783 @@ +{ + "文档": "文档", + "账号信息": "账号信息", + "退出": "退出", + "北极星服务治理": "", + "命名空间": "", + "注册中心": "", + "服务列表": "", + "服务别名": "", + "服务网格": "", + "动态路由": "", + "自定义路由": "", + "测试环境路由": "", + "灰度发布": "", + "熔断降级": "", + "访问限流": "", + "配置中心": "", + "配置分组": "配置分组", + "发布历史": "", + "可观测性": "", + "注册配置监控": "", + "流量监控": "", + "权限控制": "", + "用户": "", + "用户组": "", + "策略": "", + "多个请求匹配规则之间是且的关系": "多个请求匹配规则之间是且的关系", + "部分匹配运算符的说明如下:": "部分匹配运算符的说明如下:", + "包含:多字符串取OR匹配,传入的值只要匹配到其中一个字符串,就算匹配成功。字符串之间使用逗号进行分割。值格式为'value1,value2,value3‘,匹配到其中一个就算成功。": "包含:多字符串取OR匹配,传入的值只要匹配到其中一个字符串,就算匹配成功。字符串之间使用逗号进行分割。值格式为'value1,value2,value3‘,匹配到其中一个就算成功。", + "不包含:多字符串取反匹配,传入的值必须都没有出现在所配置的字符串列表中,才算匹配通过。值格式为'value1,value2,value3‘,全部不等于才算成功。": "不包含:多字符串取反匹配,传入的值必须都没有出现在所配置的字符串列表中,才算匹配通过。值格式为'value1,value2,value3‘,全部不等于才算成功。", + "限流规则名称": "", + "限流类型": "", + "限流规则详情": "", + "目标服务": "", + "您可以对目标服务的指定接口设置限流规则。当该接口被调用时,符合匹配规则的请求,则会触发限流规则": "", + "服务名称": "", + "接口名称": "", + "请求匹配规则": "", + "类型": "", + "限流规则": "", + "限流条件": "限流条件", + "满足以下任意条件即可触发限流": "满足以下任意条件即可触发限流", + "限流阈值": "", + "统计窗口时长": "", + "请求数阈值": "", + "次": "", + "合并计算阈值": "", + "如果目标请求匹配到多个接口及参数,则将匹配到的所有请求汇合,合并计算阈值,具体规则查看": "", + "是": "", + "否": "", + "限流方案": "限流方案", + "满足限流触发条件后的处理方案": "满足限流触发条件后的处理方案", + "限流效果": "", + "失败处理策略": "", + "当出现通信失败或者 Token Server 不可用时,限流方案退化到单机限流的模式": "", + "最大排队时长": "", + "秒": "", + "是否启用": "", + "ID/规则名": "", + "状态": "", + "已启用": "", + "未启用": "", + "创建时间/修改时间": "", + "启用时间": "", + "操作": "", + "禁用": "", + "启用": "", + "编辑": "", + "删除": "", + "请选择命名空间": "", + "请输入Key值": "", + "请选择服务名": "", + "请输入Value值": "", + "编辑服务限流规则": "", + "新建服务限流规则": "", + "最长64个字符": "", + "没有匹配的服务名称": "", + "请输入接口名称,默认全选": "", + "添加": "添加", + "删除所有": "删除所有", + "提交": "提交", + "取消": "取消", + "请填写限流规则名称": "", + "请选择类型": "", + "请输入IP": "", + "请输入value值": "", + "请输入key值": "", + "新建限流规则": "新建限流规则", + "请输入规则名过滤": "", + "全部": "", + "确认删除限流规则 {{attr0}} 吗?": "", + "删除后,无法恢复": "", + "确认{{attr0}}限流规则 {{attr1}} 吗?": "", + "单机限流": "", + "分布式限流": "", + "快速失败": "", + "匀速排队": "", + "全匹配": "", + "正则表达式": "", + "不等于": "", + "包含": "", + "不包含": "", + "自定义": "", + "请求头(HEADER)": "", + "请求参数(QUERY)": "", + "方法(METHOD)": "", + "主调服务": "", + "主调IP": "", + "退化至单机限流": "", + "直接通过": "", + "分钟": "", + "小时": "", + "服务": "", + "接口": "", + "编辑主动探测规则": "", + "新建主动探测规则": "新建主动探测规则", + "规则名称": "", + "描述": "", + "全部命名空间": "", + "全部服务": "", + "(输入值){{attr0}}": "", + "请输入接口名称": "", + "周期": "", + "超时时间": "", + "端口": "", + "协议": "", + "服务实例下需要存在所选择用于探测的协议,否则无法探测无法生效": "", + "方法": "", + "请输入url 以/开头": "", + "header键": "", + "header值": "", + "请填写规则名称": "", + "名称只能含有数字,字母,下划线及中划线": "", + "请输入超时时间": "", + "请输入url": "", + "请输入键": "", + "请输入值": "", + "规则名": "", + "目标命名空间": "", + "目标方法": "", + "请选择条件进行过滤": "", + "确认删除规则 {{attr0}} 吗?": "", + "命名空间:": "命名空间:", + "服务:": "服务:", + "被调服务": "", + "接口:": "接口:", + "编辑熔断规则": "", + "新建熔断规则": "", + "匹配条件": "", + "熔断配置": "", + "错误判断条件": "", + "满足以下任意应答条件的请求会被标识为错误请求": "满足以下任意应答条件的请求会被标识为错误请求", + "超过": "", + "毫秒": "", + "熔断触发条件": "熔断触发条件", + "满足以下任意条件可触发熔断": "满足以下任意条件可触发熔断", + "统计周期": "", + "最小请求数": "", + "个": "", + "熔断粒度": "", + "熔断触发时影响的资源粒度": "熔断触发时影响的资源粒度", + "熔断恢复": "熔断恢复", + "经过熔断时长后,会触发熔断恢复机制,若符合预期,则结束熔断;否则重新回到熔断阶段": "经过熔断时长后,会触发熔断恢复机制,若符合预期,则结束熔断;否则重新回到熔断阶段", + "熔断时长": "", + "熔断恢复策略": "", + "当满足": "当满足", + "个连续成功请求后恢复": "个连续成功请求后恢复", + "主动探测": "", + "开启主动探测时,客户端将会根据您配置的探测规则对目标被调服务进行探测; 主动探测请求与业务调用合并判断熔断恢复(如未匹配到探测规则,则不会生效); 未开启主动探测时,会仅根据业务调用判断熔断恢复。": "开启主动探测时,客户端将会根据您配置的探测规则对目标被调服务进行探测; 主动探测请求与业务调用合并判断熔断恢复(如未匹配到探测规则,则不会生效); 未开启主动探测时,会仅根据业务调用判断熔断恢复。", + "查看主动探测规则": "查看主动探测规则", + "熔断后降级": "", + "自定义响应": "", + "熔断触发后的降级响应策略": "熔断触发后的降级响应策略", + "返回码": "", + "是否开启": "", + "请填写路由规则名称": "", + "请输入接口名": "", + "请输入条件": "", + "请选择熔断粒度": "", + "源命名空间": "", + "源服务": "", + "% (统计周期:": "% (统计周期:", + ",最小请求数:": ",最小请求数:", + "{{attr0}}秒": "", + "恢复策略": "", + "开启": "", + "关闭": "", + "消息头": "", + "消息体": "", + "未开启": "", + "确认{{attr0}}规则 {{attr1}} 吗?": "", + "时延": "", + "连续错误数": "", + "错误率": "", + "实例": "", + "实例分组": "实例分组", + "服务级熔断": "", + "节点级熔断": "", + "优先级": "", + "主调请求按照匹配规则匹配成功后,将按照当前规则进行目标服务路由": "主调请求按照匹配规则匹配成功后,将按照当前规则进行目标服务路由", + "请求会按照规则路由到目标服务分组": "请求会按照规则路由到目标服务分组", + "路由策略": "", + "规则{{attr0}}": "", + "来源服务的请求满足以下匹配条件": "来源服务的请求满足以下匹配条件", + "键": "", + "匹配方式": "", + "值": "", + "将转发至目标服务的以下实例分组": "将转发至目标服务的以下实例分组", + "实例标签": "", + "权重": "", + "是否隔离": "", + "命名空间:": "命名空间:", + "服务:": "服务:", + "没有匹配的标签键": "", + "请输入标签键": "", + "没有匹配的标签值": "", + "请输入标签值": "", + "请输入完整标签": "", + "确认": "", + "编辑服务路由规则": "", + "新建服务路由规则": "", + "点击切换主被调服务": "点击切换主被调服务", + "将转发至目标服务的一下实例分组": "将转发至目标服务的一下实例分组", + "相对权重,数值范围:0-65535": "", + "添加规则": "添加规则", + "优先级数字设置越小,匹配顺序越靠前": "", + "请输入标签分组": "", + "规则1": "", + "主调命名空间": "", + "被调命名空间": "", + "新建路由规则": "", + "确认删除路由规则 {{attr0}} 吗?": "", + "确认{{attr0}}路由规则 {{attr1}} 吗?": "", + "等于": "", + "正则表达式匹配": "", + "范围表达式": "", + "变量": "", + "请求Cookie(COOKIE)": "", + "路径": "", + "操作指引": "操作指引", + "蓝绿发布": "", + "金丝雀发布": "", + "全链路灰度发布": "", + "蓝绿发布路由": "", + "金丝雀发布路由": "", + "针对是单个服务的服务灰度验证,金丝雀发布允许引流一小部分流量到服务的新版本(比如按灰度用户引流),充分验证微服务新版本的稳定性,验证没问题后,再升级原来的稳定版本。": "", + "场景一": "", + "场景二": "", + "微服务架构下,有些开发需求,微服务调用链路上的多个微服务同时发生了改动, 通常每个微服务都会有灰度环境或分组来接收灰度流量。此时希望通过进入上游灰度环境的流量, 也能进入下游灰度的环境中,确保1个请求始终在灰度环境中传递,即使这个调用链路上有一些微服务没有灰度环境, 这些应用请求在下游的时候依然能够回到灰度环境中。": "微服务架构下,有些开发需求,微服务调用链路上的多个微服务同时发生了改动, 通常每个微服务都会有灰度环境或分组来接收灰度流量。此时希望通过进入上游灰度环境的流量, 也能进入下游灰度的环境中,确保1个请求始终在灰度环境中传递,即使这个调用链路上有一些微服务没有灰度环境, 这些应用请求在下游的时候依然能够回到灰度环境中。", + "实现方案的两个场景:": "实现方案的两个场景:", + "应用场景一:金丝雀环境和稳定环境有独立的域名进行隔离,实现全链路灰度。": "应用场景一:金丝雀环境和稳定环境有独立的域名进行隔离,实现全链路灰度。", + "应用场景二:使用相同域名,基于请求标签实现全链路灰度。": "应用场景二:使用相同域名,基于请求标签实现全链路灰度。", + "客户端染色": "", + "网关动态染色": "", + "网关静态染色": "", + "客户端染色流程指引": "", + "网关动态染色流程指引": "", + "网关静态染色流程指引": "", + "告警策略名称": "", + "启用状态": "", + "监控类型": "", + "更新时间": "", + "触发条件": "", + "持续": "持续", + "告警周期": "", + "每隔": "每隔", + "告警一次": "告警一次", + "告警主题": "", + "通知回调地址": "", + "策略ID/名称": "", + "告警规则": "", + "创建时间": "", + "编辑告警策略": "", + "新建告警策略": "", + "名字": "", + "当": "", + "持续时间": "", + "告警消息": "", + "请填写名称": "", + "请填写监控类型": "", + "请选择请求指标": "", + "请选择表达式": "", + "请选择阈值": "", + "请输入持续时长": "", + "请选择持续时长单位": "", + "请选择告警周期": "", + "请输入告警主题": "", + "请输入告警消息": "", + "业务监控": "", + "监控曲线": "", + "环比波动": "", + "环比上升": "", + "环比下降": "", + "天": "", + "服务发现连接数": "", + "配置获取连接数": "", + "客户端数": "", + "每1分钟告警一次": "", + "每5分钟告警一次": "", + "每15分钟告警一次": "", + "每1小时告警一次": "", + "每4小时告警一次": "", + "每天告警一次": "", + "名称": "", + "所有命名空间": "", + "所有服务": "", + "所有配置分组": "", + "权限": "", + "读|写": "", + "权限策略": "", + "可操作资源": "", + "License已超过最大过期时间": "", + "北极星服务治理中心": "北极星服务治理中心", + "一个支持多语言、多框架和异构基础设施的服务治理中心,提供服务发现、流量调度、熔断降级、限流鉴权和可观测性等服务治理功能。北极星治理中心默认提供服务注册功能,也可以搭配其他服务注册中心使用。": "一个支持多语言、多框架和异构基础设施的服务治理中心,提供服务发现、流量调度、熔断降级、限流鉴权和可观测性等服务治理功能。北极星治理中心默认提供服务注册功能,也可以搭配其他服务注册中心使用。", + "登录": "登录", + "外网访问建议设置访问控制策略": "外网访问建议设置访问控制策略", + "初始用户名和密码为": "初始用户名和密码为", + "用户名": "", + "密码": "", + "网络异常或用户名,密码错误": "", + "请输入用户名": "", + "请输入密码": "", + "选择用户": "", + "授权": "", + "预览": "", + "编辑策略": "", + "创建策略": "", + "备注": "", + "角色": "", + "请选择用户": "", + "请选择用户组": "", + "默认策略不可变更授权角色": "", + "资源": "", + "全部命名空间(含后续新增)": "", + "指定命名空间": "", + "全部服务(含后续新增)": "", + "指定服务": "", + "请选择服务": "", + "全部配置分组(含后续新增)": "", + "指定配置分组": "", + "请选择配置分组": "", + "读操作|写操作": "", + "策略名称": "", + "无选中用户": "", + "无选中用户组": "", + "完成": "", + "下一步": "", + "上一步": "", + "编辑成功": "", + "编辑失败": "", + "创建成功": "", + "创建失败": "", + "请输入名称": "", + "只能使用中文、数字、大小写字母 以及- _组成": "", + "最大长度为64": "", + "(用户组)": "", + "(用户)": "", + "新建策略": "", + "默认策略(": "默认策略(", + "自定义策略(": "自定义策略(", + "无备注": "", + "用户|用户组": "", + "暂无对应授权对象": "", + "全部{{attr0}}(含后续新增)": "", + "暂无选中策略": "", + "确认删除如下策略?": "", + "删除后,策略不可用且无法恢复": "", + "删除成功": "", + "删除失败": "", + "用户详情({{attr0}})": "", + "用户信息": "", + "修改密码": "", + "账号名": "", + "账号ID": "", + "手机号": "", + "邮箱": "", + "生效中": "", + "已失效": "", + "重置": "", + "仅主账号可查看Token": "", + "修改成功": "", + "修改失败": "", + "{{attr0}}成功": "", + "{{attr0}}失败": "", + "重置成功": "", + "您已成功重置Token,请重新登录。": "", + "重置失败": "", + "(当前登录)": "", + "用户类型": "", + "主账号": "", + "子账号": "", + "用户id": "", + "查看Token": "", + "更多": "", + "关联用户组": "", + "确定": "确定", + "授权策略": "", + "请选择策略": "", + "未做改动": "", + "请输入6至17位的密码": "", + "编辑用户": "", + "新建用户": "", + "旧密码": "", + "如果您忘记了您的旧密码,可以联系您的主账号来重置密码": "", + "新密码": "", + "确认密码": "", + "修改密码成功": "", + "您已成功重置密码,请重新登录。": "", + "修改密码失败": "", + "请输入旧密码": "", + "请输入新密码": "", + "请确认密码": "", + "两次输入密码不一致": "", + "修改备注": "", + "请输入备注": "", + "授予权限的用户或者用户组,具有该命名空间的读写权限,所有用户具有读权限": "", + "支持按住shift进行多选": "", + "新建": "新建", + "编辑用户组": "", + "确认删除用户?": "", + "删除后,用户不可用且无法恢复": "", + "查看{{attr0}}的token": "", + "用户组详情({{attr0}})": "", + "用户组名": "", + "用户组ID": "", + "用户组名称": "", + "用户数量": "", + "新建用户组": "", + "关联成功": "", + "确认删除用户组?": "", + "删除后,用户组不可用且无法恢复": "", + "因为浏览器限制,此文件仅保存了部分内容": "", + "标签键": "", + "标签值": "", + "暂无标签": "", + "请输入完整键值对": "", + "编辑器正在加载中": { + "": "" + }, + "排序": "", + "标签名": "", + "key 最长不超过128个字符": "", + "value 最长不超过4096个字符": "", + "新增": "新增", + "近24小时": "", + "近3天": "", + "近7天": "", + "加载中": "", + "未找到指定资源,请检查资源是否存在": "", + "设置成功": "", + "请选择您想显示的列表详细信息。": "", + "根据您的分辨率,最多可勾选{{attr0}}个字段,已勾选{{attr1}}个。": "", + "自定义列表字段": "", + "请选择": "", + "加载失败": "", + "输入关键字搜索": "", + "暂无数据": "", + "找到{{attr0}}条结果": "", + "搜索\"{{attr0}}\"暂无数据": "", + "已选择 ({{attr0}})": "", + "提交失败": "", + "[deprecated] 建议使用对象递归,而不在返回值内递归": "", + "当前导出进度:{{attr0}}%": "", + "此浏览器版本过低,不支持导出功能": "", + "因文件过大,自动拆分为多个文件下载": "", + "导出成功": "", + "导出失败": "", + "请求错误": "", + "发布成功": "", + "发布失败": "", + "编辑待发布": "", + "历史发布": "历史发布", + "当前发布": "当前发布", + "编辑配置文件": "", + "新建配置文件": "", + "配置文件名": "", + "可通过/分隔符创建文件夹,强烈建议文件名带上后缀,如:datasource/master": { + "json": "" + }, + "文件格式: ": "", + "允许数字、英文字母、": { + "、-、_,限制128个字符": "" + }, + "长度不超过1024个字符": "", + "配置标签": "", + "该配置分组为只读配置分组": "", + "该命名空间为只读命名空间": "", + "请填写文件名": "", + "文件夹名字不可为空": "", + "请选择分组": "", + "请选择格式": "", + "应用模板": "应用模板", + "应用": "", + "模板": "", + "提供常用的配置文件模板,以方便进行快速配置": "", + "当前选择的模板与配置文件格式不符": "", + "模板格式": "", + "模板描述": "", + "模板预览": "", + "请确认应用模板": "", + "应用所选模板将会覆盖当前已编辑的内容": "", + "您当前选择的模板与配置文件格式不符,请检查后重试。": "", + "刷新成功": "", + "刷新配置": "刷新配置", + "提示": "", + "注意,刷新会导致丢失当前编辑内容": "注意,刷新会导致丢失当前编辑内容", + "请输入文件名搜索": "", + "查看发布历史": "查看发布历史", + "最后修改时间": "", + "最后发布时间": "", + "标签": "", + "最后修改人": "", + "最后发布人": "", + "格式": "", + "发布": "发布", + "保存": "保存", + "版本": "", + "发布时间": "", + "请选择发布记录": "请选择发布记录", + "未搜索到对应文件": "未搜索到对应文件", + "待发布": "待发布", + "确认删除配置文件?": "", + "删除后,无法恢复。": "", + "确认切换展示节点?": "", + "编辑未发布,现在切换将丢失已编辑内容": "", + "内容对比": "", + "保存成功": "", + "保存失败": "", + "配置文件": "", + "配置文件数": "", + "无权限": "", + "编辑配置文件组": "", + "新建配置文件组": "", + "分组名": "", + "高级配置": "高级配置", + "请填写分组名": "", + "请填写命名空间": "", + "确认删除配置组": "", + "删除配置组也会同时删除配置组下所有配置文件,请谨慎删除。": "", + "操作人": "", + "查看详情": "", + "分组": "", + "近1小时": "", + "近1天": "", + "近1周": "", + "新建监控图表": "", + "时间选择": "", + "指标名": "", + "筛选条件": "", + "条件": "", + "条件值": "", + "步长": "步长", + "主调方": "主调方", + "主调": "", + "汇总": "", + "被调方": "被调方", + "被调": "", + "查询": "查询", + "暂无图表数据": "", + "复制分享链接": "复制分享链接", + "保存当前配置": "保存当前配置", + "载入保存配置": "载入保存配置", + "筛选条件:": "筛选条件:", + "无": "", + "路由监控": "", + "熔断监控": "", + "限流监控": "", + "监控": "", + "本次筛选配置将会请求大量数据": "", + "请确认是否请求": "", + "已保存": "", + "客户端节点数": "", + "客户端连接数": "", + "总请求数": "", + "客户端访问北极星服务端请求数": "客户端访问北极星服务端请求数", + "请求时延": "", + "客户端访问北极星服务端请求时延": "客户端访问北极星服务端请求时延", + "服务数": "", + "实例数": "", + "配置分组数": "", + "配置数": "", + "概览": "", + "服务和配置统计": "", + "北极星服务端请求统计": "", + "1秒": "", + "1分": "", + "5分": "", + "1小时": "", + "全部命名空间汇总": "", + "时间范围": "", + "时间粒度": "", + "功能": "", + "全部功能汇总": "", + "全部接口汇总": "", + "无可选接口": "无可选接口", + "节点": "", + "全部节点汇总": "", + "无节点": "无节点", + "请求数": "", + "失败请求数": "", + "返回码分布": "", + "所有接口汇总-": "", + "所有节点汇总": "", + "{{attr0}}功能-{{attr1}}接口": "", + "所有接口汇总": "", + "{{attr0}}节点": "", + "全部汇总服务": "", + "无可选服务": "无可选服务", + "全部配置分组汇总": "", + "无配置分组": "无配置分组", + "总节点数": "", + "总连接数": "", + "注册中心连接数": "", + "配置中心连接数": "", + "成功请求数": "", + "请求成功率": "", + "均值": "", + "最大值": "", + "最小值": "", + "总服务数": "", + "在线服务数": "", + "异常服务数": "", + "离线服务数": "", + "总实例数": "", + "在线实例数": "", + "隔离实例数": "", + "异常实例数": "", + "配置分组总数": "", + "已发布配置文件数": "", + "总失败请求数": "", + "5xx失败请求数": "", + "4xx失败请求数": "", + "网络失败数": "", + "服务注册": "", + "服务发现": "", + "健康检查": "", + "配置读取": "", + "成功数": "", + "最大时延": "", + "平均时延": "", + "通过数": "", + "限流数": "", + "熔断数": "", + "半开数": "", + "被调服务名": "", + "被调接口名": "", + "被调实例分组": "", + "被调实例": "", + "被调请求标签": "", + "主调服务名": "", + "主调实例IP": "", + "主调请求标签": "", + "健康实例/总实例数": "", + "修改时间": "", + "编辑命名空间": "", + "新建命名空间": "", + "高级设置": "", + "请输入命名空间名称": "", + "确认删除命名空间": "", + "服务名": "", + "接口名": "", + "{{attr0}}({{attr1}}匹配)": "", + "该命名空间为只读的": "", + "无写权限": "", + "在该规则前新建规则": "", + "正则模式下,使用*代表选择所有": "", + "手动配置": "", + "JSON配置": "", + "以下服务": "", + "本服务调用以下服务或者接口时": "", + "调用本服务的以下接口时": "", + "如果满足以下任意条件,进行熔断": "如果满足以下任意条件,进行熔断", + "最大响应时间": "", + "半开时间": "", + "编辑方式": "", + "JSON编辑": "", + "请输入正确的JSON字符串": "", + "请输入命名空间": "", + "请输入服务名": "", + "编辑格式": "", + "规则类型": "", + "未更改": "", + "向服务器端提交变更": "", + "当以下服务调用本服务时,遵守下列熔断规则": "", + "当本服务调用以下服务时,遵守下列熔断规则": "", + "如果请求标签匹配,按以下策略熔断": "", + "熔断条件": "", + "当请求个数大于{{attr0}}个,且{{attr1}}大于{{attr2}}%时熔断": "", + "以超过{{attr0}}的请求作为超时请求,{{attr1}}大于{{attr2}}%时熔断": "", + "当连续请求错误超过{{attr0}}个时熔断": "", + "编辑规则": "", + "确认删除规则": "", + "连续错误率": "", + "精确": "", + "正则": "", + "被调规则": "", + "主调规则": "", + "仅用于恢复": "", + "用于熔断和恢复": "", + "部门": "", + "业务": "", + "版本号": "", + "服务标签({{attr0}}个)": "", + "就近访问": "", + "实例IP": "", + "健康状态": "", + "隔离状态": "", + "地区/地域/可用区": "", + "编辑服务实例": "", + "新建服务实例": "", + "隔离状态下,主调方无法发现隔离的服务实例,无论实例IP是否健康": "", + "多个IP以英文逗号、英文分号、空格或换行分隔,每次最多添加100个IP": "", + "多个端口以英文逗号、英文分号、空格或换行分隔,每次最多添加100个端口": "", + "实例标签可用于标识实例的用处、特征, 标签数量不能超过64": "", + "地域信息": "", + "请输入 Region": "", + "请输入 Zone": "", + "请输入 Campus": "", + "开启健康检查": "开启健康检查", + "如果开启,服务端负责检查服务实例的健康状态": "", + "健康检查方式": "", + "检查方式": "", + "请填写IP": "", + "请填写端口": "", + "请填写权重": "", + "请选择检查方式": "", + "请填写TTL": "", + "请选择实例": "", + "其他操作": "其他操作", + "复制IP": "复制IP", + "修改权重": "修改权重", + "修改健康状态": "修改健康状态", + "修改隔离状态": "修改隔离状态", + "实例ID": "", + "检查方式:": "检查方式:", + "展示全部": "展示全部", + "确认删除实例": "", + "心跳上报": "", + "健康": "", + "异常": "", + "隔离": "", + "不隔离": "", + "请求标签": "", + "当以下服务调用本服务时": "", + "当本服务调用以下服务时": "", + "对带有以下标签的请求": "对带有以下标签的请求", + "按权重和优先级路由到以下实例分组": "按权重和优先级路由到以下实例分组", + "标签键不能为空": "", + "标签值不能为空": "", + "标签键不能一致": "", + "新建一条规则": "", + "当以下服务调用本服务时,遵守下列路由规则": "", + "当本服务调用以下服务时,遵守以下路由规则": "", + "如果请求标签匹配,按权重和优先级路由到以下实例分组": "", + "实例分组{{attr0}}": "", + "编辑路由规则": "", + "确认删除路由规则": "", + "图表编辑": "", + "服务信息": "", + "服务实例": "", + "路由规则": "", + "熔断规则": "", + "编辑服务": "", + "新建服务": "", + "开启就近访问": "", + "服务标签": "", + "服务标签可用于标识服务的用处、特征,格式为key:value": "", + "长度不超过1024个字符,标签数量不能超过64个": "", + "确认删除服务": "", + "标签展示": "", + "指向服务": "", + "别名所在命名空间": "", + "请选择指向服务": "", + "请选择别名所在命名空间": "", + "请填写别名": "", + "服务别名可以看作是服务的映射,访问服务别名等同于访问服务,允许多个服务别名指向同一个服务": "服务别名可以看作是服务的映射,访问服务别名等同于访问服务,允许多个服务别名指向同一个服务", + "新建别名": "", + "确认删除服务别名": "", + "中文字符串": "", + "模板字符串{{attr0}}#{{attr1}}": "", + "中文属性": "", + "中文内容": "中文内容" +} diff --git a/web/locales/i18n.ts b/web/locales/i18n.ts new file mode 100644 index 00000000..ddbae94c --- /dev/null +++ b/web/locales/i18n.ts @@ -0,0 +1,30 @@ +import i18n from 'i18next' +import detector from 'i18next-browser-languagedetector' +import React from 'react' +import { initReactI18next } from 'react-i18next' + +import en from './en/translation.json' + +export function initI18n() { + i18n + .use(detector) + .use(initReactI18next) + .init({ + resources: { + en: { + translation: en, + }, + }, + lng: 'zh', + fallbackLng: 'zh', + interpolation: { + escapeValue: false, + }, + }) +} + +export default i18n + +export function Slot(props: { content: React.ReactNode }) { + return React.createElement(React.Fragment, null, props.content) +} diff --git a/web/src/app.tsx b/web/src/app.tsx index df00fbab..a13e73a6 100644 --- a/web/src/app.tsx +++ b/web/src/app.tsx @@ -1,8 +1,10 @@ -import React, { useCallback } from 'react' +import { Trans, useTranslation } from 'react-i18next' +import React, { useCallback, useState, useEffect } from 'react' import { Layout, NavMenu, Menu, List } from 'tea-component' import { Switch, Route, useHistory } from 'react-router-dom' const { Header, Body, Sider, Content } = Layout -import { MenuConfig, MenuItemConfig } from './menu' +import { getMenuConfig, MenuItemConfig } from './menu' + import { connectWithDuck } from './polaris/common/helpers' import MonitorPage from '@src/polaris/monitor/Page' import FlowMonitorDuck from '@src/polaris/monitor/FlowMonitorDuck' @@ -119,6 +121,8 @@ import RegistryMonitorPageDuck from '@src/polaris/monitor/registryMonitor/PageDu const RegistryMonitor = connectWithDuck(RegistryMonitorPage, RegistryMonitorPageDuck) export default function root() { + const { t, i18n } = useTranslation() + const history = useHistory() const [selected, setSelected] = React.useState(history.location.pathname.match(/^\/(\w+)/)?.[1] || 'service') const getMenuItemProps = id => ({ @@ -129,14 +133,20 @@ export default function root() { }, }) const [authOpen, setAuthOpen] = React.useState(null) + const [lang, setLang] = useState('zh') const fetchAuth = useCallback(async () => { const authOpen = await cacheCheckAuth({}) setAuthOpen(authOpen) }, []) - React.useEffect(() => { + + useEffect(() => { fetchAuth() }, [fetchAuth]) + useEffect(() => { + i18n.changeLanguage(lang) + }, [lang]) + function recursiveRenderMenuItem(menuItem: MenuItemConfig) { if (!menuItem) { return