chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -23,7 +23,7 @@ export const REAL_DATA_MOCKSET = {
name: I18n.t('real_data'),
};
// 初始化仅有real_data
// Initialization only real_data
export const MOCK_OPTION_LIST = [REAL_DATA_MOCKSET];
export const POLLING_INTERVAL = 10000;

View File

@@ -146,7 +146,7 @@ export const useInitialGetEnabledMockSet = ({
}
};
// 取消
// cancel
const cancel = () => {
pollingTurnRef.current = undefined;
cancelReq.current?.();

View File

@@ -94,11 +94,11 @@
line-height: 16px;
}
/** 创建框 **/
/** Create box **/
.mock-creation-modal {
:global {
.semi-modal-content .semi-modal-body {
/** 保证内部 tooltip 不被遮盖 **/
/** Make sure the internal tooltip is not covered **/
overflow: unset
}
@@ -114,7 +114,7 @@
}
div.mock-creation-modal-editor {
/** 兼容 modal 在小窗口下 body 高度不生效的问题 */
/** Compatible modal body height does not take effect in small windows */
height: calc(100vh - 316px);
max-height: 500px;
}

View File

@@ -46,7 +46,7 @@ interface MockDataCardProps {
bizCtx: infra.BizCtx;
}
/** mock data 展示卡片 */
/** Mock data display card */
export function MockDataCard({
mock,
readOnly,

View File

@@ -55,18 +55,18 @@ import { useSaveMockData } from '../hook/use-save-mock-data';
import s from './index.module.less';
export enum CreationMode {
/** 弹窗形式 */
/** pop-up window */
MODAL = 'modal',
/** 嵌入页面 */
/** embed page */
CARD = 'card',
}
interface MockDataCreateCardProps {
mode: CreationMode;
mockInfo?: MockDataInfo;
// mode 为 modal 时生效
// Effective when modal mode
visible?: boolean;
// mode 为 modal 时生效
// Effective when modal mode
onCancel?: () => void;
onSuccess: (data?: mockset.MockRule[]) => void;
bizCtx: infra.BizCtx;
@@ -76,7 +76,7 @@ interface MockDataCreateCardProps {
};
}
/** 创建or编辑 mock data - */
/** Create or edit mock data - */
export function MockDataCreateCard({
mode,
mockInfo,
@@ -96,7 +96,7 @@ export function MockDataCreateCard({
useTransSchema(schema);
const { mock_set_id, tool_id } = useParams<DynamicParams>();
// space信息
// Space information
const spaceType = useSpaceStore(store => store.space.space_type);
const isPersonal = spaceType === SpaceType.Personal;

View File

@@ -91,7 +91,7 @@ export const MockDataList = forwardRef(
const [deleteModalVisible, setDeleteModalVisible] =
useState<boolean>(false);
const [deleting, setDeleting] = useState<boolean>(false);
// 当前选中状态
// Currently selected
const [currentSelect, setCurrentSelect] = useState<
MockDataInfo | undefined
>();
@@ -99,7 +99,7 @@ export const MockDataList = forwardRef(
const routeResponse = usePageJumpResponse(PageType.PLUGIN_MOCK_DATA);
const { mock_set_id, space_id, tool_id } = useParams<DynamicParams>();
// space信息
// Space information
const spaceType = useSpaceStore(store => store.space.space_type);
const isPersonal = spaceType === SpaceType.Personal;
@@ -113,7 +113,7 @@ export const MockDataList = forwardRef(
setDeleteModalVisible(true);
};
// 获取当前 mock set 下的 mock data
// Get the mock data under the current mock set
const getMockData = async (needScrollToTop?: boolean) => {
try {
setLoading(true);
@@ -181,11 +181,11 @@ export const MockDataList = forwardRef(
}
};
// 前端更新
// frontend update
const updateList = (data: MockRule, action: RuleActions) => {
let len = 0;
if (action === RuleActions.CREATE) {
// 创建场景直接 force update
// Create scenes to force updates directly
getMockData(true);
} else if (action === RuleActions.DELETE) {
len = mockDataList.length - 1;
@@ -228,7 +228,7 @@ export const MockDataList = forwardRef(
useEffect(() => {
if (routeResponse?.generationMode) {
// 清除跳转参数
// Clear jump parameters
const state = {
...history.state,
usr: { ...(history.state.usr || {}), generationMode: undefined },

View File

@@ -42,12 +42,12 @@ export function MockSetPageBreadcrumb({
}: MockSetPageBreadcrumbProps) {
const routeResponse = usePageJumpResponse(PageType.PLUGIN_MOCK_DATA);
// 插件详情
// plugin details
const [pluginInfo, setPluginInfo] = useState<PluginMetaInfo>({
name: routeResponse?.pluginName,
});
// 获取当前 plugin 信息
// Get current plugin information
const getPluginInfo = async () => {
try {
const res = await DeveloperApi.GetPluginInfo(

View File

@@ -162,7 +162,7 @@ const MockSetSelectComp = (
const bizCtx: BizCtx = {
...bizSceneCtx,
connectorUID: uid,
connectorID: CONNECTOR_ID, // 业务线为Coze
connectorID: CONNECTOR_ID, // Business line for Coze
};
const { jump } = usePageJumpService();
@@ -449,7 +449,7 @@ const MockSetSelectComp = (
content={getTooltipInfo()}
visible={disabled && focused}
position="left"
style={{ display: disabled ? 'block' : 'none' }} // visible disabled不生效
style={{ display: disabled ? 'block' : 'none' }} // Visible disabled not effective
>
<div
style={style}

View File

@@ -71,7 +71,7 @@ export const MockSetDeleteModal = ({
} = mockSetInfo || {};
const [mockSetRefCount, setMockSetRefCount] = useState(-1);
// space信息
// Space information
const spaceType = useSpaceStore(s => s.space.space_type);
const isPersonal = spaceType === SpaceType.Personal;