Skip to content

Commit 03be3c5

Browse files
author
agile.zhou
committed
Update all coments to ENGLISH
1 parent d10e241 commit 03be3c5

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

src/AgileConfig.Server.UI/react-ui-antd/src/global.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ol {
4646
}
4747
}
4848

49-
// 兼容IE11
49+
// Compatible with IE11
5050
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
5151
body .ant-design-pro > .ant-layout {
5252
min-height: 100vh;

src/AgileConfig.Server.UI/react-ui-antd/src/layouts/SecurityLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
3535
const { isReady } = this.state;
3636
const { children, loading, currentUser } = this.props;
3737
// You can replace it to your authentication rule (such as check token exists)
38-
// 你可以把它替换成你自己的登录认证规则(比如判断 token 是否存在)
38+
// You can replace it with your own login authentication rules (such as checking if token exists)
3939
const isLogin = currentUser && currentUser.userid;
4040

4141
if ((!isLogin && loading) || !isReady) {

src/AgileConfig.Server.UI/react-ui-antd/src/locales/zh-CN/pages.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,17 @@ export default {
270270
'pages.user.status.deleted': '已删除',
271271
'pages.user.confirm_reset': '确定重置用户',
272272
'pages.user.confirm_delete': '确定删除用户',
273-
'pages.user.reset_password_default': '的密码为默认密码【123456】?',
273+
'pages.user.reset_password_default': '的密码为默认密码【123456】?',
274274

275-
// 服务管理
275+
// Service Management
276276
'pages.service.table.cols.servicename': '服务名',
277277
'pages.service.table.cols.serviceid': '服务ID',
278278
'pages.service.table.cols.registertime': '注册时间',
279279
'pages.service.table.cols.action': '操作',
280280
'pages.service.table.cols.action.delete': '删除',
281281
'pages.service.confirm_delete_selected': '确定删除选中的服务吗?',
282282

283-
// 节点管理 - 只添加缺失的键值
283+
// Node Management - Add missing keys only
284284
'pages.node.table.cols.action.add': '新建节点',
285285
'pages.node.table.cols.action.edit': '编辑',
286286
'pages.node.table.cols.action.delete': '删除',
@@ -292,7 +292,7 @@ export default {
292292
'pages.node.status.unhealthy': '不健康',
293293
'pages.node.confirm_delete': '确定删除节点',
294294

295-
// 首页
295+
// Home Page
296296
'pages.home.empty_node_confirm': '节点列表为空,是否添加当前节点',
297297
'pages.home.to_node_list': '到节点列表?',
298298
'pages.home.summary.apps': '应用数',
@@ -302,7 +302,7 @@ export default {
302302
'pages.home.latest_visit_apps': '最近访问的应用',
303303
'pages.home.node_client_chart': '节点客户端统计',
304304

305-
// 服务管理
305+
// Service Management
306306
'pages.services.serviceId': '服务ID',
307307
'pages.services.serviceName': '服务名',
308308
'pages.services.ip': 'IP',
@@ -330,7 +330,7 @@ export default {
330330
'pages.services.checkUrl.placeholder': '请输入检测URL',
331331
'pages.services.alarmUrl.placeholder': '请输入告警URL',
332332

333-
// 节点管理
333+
// Node Management
334334
'pages.nodes.title': '节点管理',
335335
'pages.nodes.address': '地址',
336336
'pages.nodes.remark': '备注',
@@ -350,7 +350,7 @@ export default {
350350
'pages.nodes.addressPlaceholder': '请输入节点地址',
351351
'pages.nodes.remarkPlaceholder': '请输入备注',
352352

353-
// 文本编辑器
353+
// Text Editor
354354
'pages.configs.textEditor.title': '按 TEXT 视图编辑',
355355
'pages.configs.textEditor.format': '严格按照 KEY=VALUE 格式编辑,每行一个配置',
356356
'pages.configs.textEditor.patchMode': '补丁模式更新',
@@ -364,7 +364,7 @@ export default {
364364
'pages.configs.import_success': '导入成功',
365365
'pages.configs.import_fail': '导入失败请重试!',
366366

367-
// 首页
367+
// Home Page
368368
'pages.home.consoleNode': '控制台节点',
369369
'pages.home.recentVisit': '最近访问',
370370

src/AgileConfig.Server.UI/react-ui-antd/src/pages/Apps/comps/userAuth.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react';
88
import { AppListItem, UserAppAuth } from "../data";
99
import { getUserAppAuth } from "../service";
1010

11-
// 统一接口定义缩进
11+
// Unified interface definition indentation
1212
export type UserAuthProps = {
1313
onSubmit: (values: UserAppAuth) => Promise<void>;
1414
onCancel: () => void;
@@ -21,7 +21,7 @@ const UserAuth: React.FC<UserAuthProps> = (props) => {
2121
const [users, setUsers] = useState<{ label: string; value: string }[]>();
2222
const [userAppAuthState, setUserAppAuthState] = useState<UserAppAuth>();
2323

24-
// 优化useEffect缩进
24+
// Optimize useEffect indentation
2525
useEffect(() => {
2626
allUsers().then((resp) => {
2727
const usermp = resp.data.map((x: { userName: string; id: string; team: string }) => {
@@ -45,7 +45,7 @@ const UserAuth: React.FC<UserAuthProps> = (props) => {
4545
}
4646
}, [props.value?.id]);
4747

48-
// 统一JSX属性缩进
48+
// Unified JSX attributes indentation
4949
return userAppAuthState ? (
5050
<ModalForm
5151
title={props.value?.name + ' - ' + intl.formatMessage({ id: 'pages.app.auth.title' })}

src/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/comps/JsonEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const JsonEditor: React.FC<JsonEditorProps> = (props) => {
123123
beforeMount={(monaco) => {
124124
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
125125
validate: true,
126-
allowComments: true,//是否允许json内容中带注释
126+
allowComments: true,//whether to allow comments in json content
127127
schemaValidation: 'error',
128128
});
129129
}}

src/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ const configs: React.FC = (props: any) => {
629629
// <Button key="6" onClick={()=>{
630630
// setTextEditorVisible(true);
631631
// }}>
632-
// 编辑 TEXT
632+
// Edit TEXT
633633
// </Button>
634634
]}
635635
rowSelection={{

src/AgileConfig.Server.UI/react-ui-antd/src/pages/OIDC/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { message } from 'antd';
99

1010
const logs:React.FC = (props: any) => {
1111
const intl = getIntl(getLocale());
12-
const search = props.location.search; // 获取 URL 中的查询字符串,如 "?foo=bar"
13-
const params = new URLSearchParams(search); // 使用 URLSearchParams 解析查询字符串
12+
const search = props.location.search; // Get query string from URL, e.g. "?foo=bar"
13+
const params = new URLSearchParams(search); // Use URLSearchParams to parse query string
1414
const code = params.get('code');
1515
console.log('OIDC code', code);
1616
if (code) {

src/AgileConfig.Server.UI/react-ui-antd/src/typings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface Window {
3333
declare let ga: () => void;
3434

3535
// preview.pro.ant.design only do not use in your production ;
36-
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
36+
// preview.pro.ant.design specific environment variable, please do not use it in your project.
3737
declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined;
3838

3939
declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;

src/AgileConfig.Server.UI/react-ui-antd/src/utils/authority.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function getAuthority(str?: string): string | string[] {
1717
return [authority];
1818
}
1919
// preview.pro.ant.design only do not use in your production.
20-
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
20+
// preview.pro.ant.design specific environment variable, please do not use it in your project.
2121
if (!authority && ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
2222
return ['admin'];
2323
}

src/AgileConfig.Server.UI/react-ui-antd/src/utils/request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const codeMessage = {
2626
const errorHandler = (error: { response: Response }): Response => {
2727
const { response } = error;
2828
if (response && response.status) {
29-
const errorText = codeMessage[response.status] || response.statusText;
29+
const errorText = codeMessage[response.status as keyof typeof codeMessage] || response.statusText;
3030
const { status, url } = response;
3131

3232
if (status === 401 || status === 403) {
@@ -67,8 +67,8 @@ if (NODE_ENV === 'development') {
6767
/** 配置request请求时的默认参数 */
6868
const request = extend({
6969
prefix: requestPrefix,
70-
errorHandler, // 默认错误处理
71-
credentials: 'same-origin', // 默认请求是否带上cookie,
70+
errorHandler, // default error handler
71+
credentials: 'same-origin', // whether requests include cookies by default
7272
});
7373

7474
request.interceptors.request.use(authHeaderInterceptor);

0 commit comments

Comments
 (0)