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

@@ -48,7 +48,7 @@ const leftPanelResourceType = [
];
/**
* IDE 全局逻辑处理
* IDE global logic processing
*/
export const GlobalHandler = ({
spaceId,
@@ -99,7 +99,7 @@ export const GlobalHandler = ({
useWsListener((props: WsMessageProps) => {
if (
// 即将支持,敬请期待
// Support soon, so stay tuned.
!FLAGS['bot.automation.project_multi_tab'] ||
!leftPanelResourceType.includes(props.bizType)
) {
@@ -114,9 +114,9 @@ export const GlobalHandler = ({
}
const isCreateOperate = props.operateType === MessageOperateType.Create;
// 只是创建 workflow 则刷新资源列表
// Just create workflow and refresh the resource list
const isCreateWorkflow = props?.extra?.methodName === 'CreateWorkflow';
// 封装解封场景需要刷新资源列表
// The encapsulation and unsealing scene needs to refresh the resource list.
const isEncapsulateWorkflow =
props?.extra?.methodName === 'EncapsulateWorkflow';

View File

@@ -48,23 +48,23 @@ export const CloseConfirmModal = () => {
}, []);
useEffect(() => {
// 浏览器维度的 dispose 监听
// Dispose listening in the browser dimension
const chromeDispose = windowService.onBeforeUnload(e => {
// 路由判断
// route judgment
const titles = viewService.getOpenTitles();
const hasUnsaved = titles.some(title => title.saving);
// 当存在未保存的项的时候,需要阻止
// When there are unsaved items, they need to be blocked
if (hasUnsaved) {
// 每次浏览器关闭之前都打开阻止关闭的弹窗
// 兼容不同浏览器的行为
// Open the pop-up window that prevents closing before each browser is closed.
// Compatible with the behavior of different browsers
e.preventDefault();
e.stopPropagation();
e.returnValue = '';
return '';
}
});
// 资源维度的 dispose 监听
// Dispose monitoring of the resource dimension
const resourceDisposable = modalService.onModalVisibleChange(opt => {
const { type, options, visible: vis = true } = opt;
if (type === ModalType.CLOSE_CONFIRM) {

View File

@@ -22,9 +22,9 @@ import { CloseConfirmModal } from './close-confirm-modal';
export const GlobalModals = () => (
// do something
<>
{/* 移动资源库全局弹窗 */}
{/* Mobile resource library global pop-up window */}
<ResourceModal />
{/* 保存中资源关闭弹窗 */}
{/* Saving resource closes pop-up window */}
<CloseConfirmModal />
</>
);

View File

@@ -65,7 +65,7 @@ const PrimarySidebarCore = ({
>
<div className={styles.title}>
{I18n.t('project_resource_sidebar_title')}
{/* 即将支持,敬请期待 */}
{/* Support soon, so stay tuned. */}
{FLAGS['bot.automation.dependency_tree'] ? (
<>
<Button

View File

@@ -97,14 +97,14 @@ export const ResourceList = ({
spaceId,
);
// 存在版本信息,预览状态无法创建资源
// Version information exists, preview status cannot create resource
if (commitVersion) {
canCreate = false;
}
const projectRoles = useProjectRole(projectId);
const hideMoreBtn = useMemo(
// 没有任何权限,或者存在版本信息,需要隐藏操作按钮
// There is no permission, or there is version information, you need to hide the operation button.
() => (projectRoles?.length ?? 0) === 0 || !!commitVersion,
[projectRoles, commitVersion],
);
@@ -135,7 +135,7 @@ export const ResourceList = ({
resourceTree={pluginResource}
canCreate={canCreate}
initLoaded={initLoaded}
// 业务实现
// business realization
onChangeName={changeNamePlugin}
onCustomCreate={createPlugin}
onDelete={deletePlugin}
@@ -170,9 +170,9 @@ export const ResourceList = ({
<div className="flex items-center">
{datasetIconMap[resource.biz_extend?.format_type]}
{/**
* 1: 启用
* 2: 删除,一般没有
* 3: 禁用
* 1: Enable
* 2: Delete, generally not
* 3: Disable
*/}
{resource.biz_res_status === 3 ? (
<span className="ml-[3px]"></span>

View File

@@ -91,7 +91,7 @@ export const ResourceTreeModal = ({
project_version: version ? version : undefined,
},
});
// 兼容先请求后返回场景
// Compatibility Request first and then return to the scene
if (selectedWorkflowId === id) {
setData(res?.data || DEFAULT_DATA);
}

View File

@@ -83,7 +83,7 @@ export const SidebarExpand = () => {
}, [pathname]);
useEffect(() => {
// 侧边栏显隐状态切换时,更新按钮状态
// Update button status when sidebar hidden status switch
const disposable = projectIDEServices.view.onSidebarVisibleChange(vis => {
setVisible(vis);
});
@@ -97,7 +97,7 @@ export const SidebarExpand = () => {
setPopoverVisible(false);
}, []);
// 右边分屏不展示 hover icon
// The split screen on the right does not show the hover icon.
if (direction === 'right') {
return null;
}

View File

@@ -78,7 +78,7 @@ export const FullScreenButton = () => {
[fullScreen, keybinding],
);
// 左边分屏不展示全屏按钮
// The left split screen does not display the full screen button.
if (direction === 'left') {
return null;
}
@@ -91,7 +91,7 @@ export const FullScreenButton = () => {
<Tooltip
content={content}
position="bottom"
// 点击后布局变化tooltip 需要手动控制消失
// After clicking, the layout changes, and the tooltip needs to be manually controlled to disappear.
trigger="custom"
visible={tooltipVisible}
>

View File

@@ -51,7 +51,7 @@ export const ReloadButton = ({ widget }: { widget: ProjectIDEWidget }) => {
<Tooltip
content={content}
position="bottom"
// 点击后布局变化tooltip 需要手动控制消失
// After clicking, the layout changes, and the tooltip needs to be manually controlled to disappear.
trigger="custom"
visible={tooltipVisible}
>

View File

@@ -29,12 +29,12 @@ export const TopBar = () => (
<div className={styles.container}>
<Row className={styles['top-bar']}>
<Col span={8} className={styles['left-col']}>
{/* 返回按钮 */}
{/* Back button */}
<GoBackButton />
{/* 项目标题 */}
{/* Project title */}
<ProjectInfo />
</Col>
{/* 海外版暂时不上 uibuilder 切换功能 */}
{/* The overseas version does not have the uibuilder switching function for the time being. */}
<Col span={8} className={styles['middle-col']}>
{IS_OVERSEA ? null : <ModeTab />}
</Col>

View File

@@ -122,7 +122,7 @@ export const Operators = () => {
>
{I18n.t('project_ide_duplicate')}
</Menu.Item>
{/* Tooltip disableFocusListener 失效,等待后续修复完成 */}
{/* Tooltip disableFocusListener failed, waiting for subsequent repairs to complete */}
{canDelete ? (
<Menu.Item
className="min-w-[190px] h-[32px] rounded-[4px]"
@@ -160,8 +160,8 @@ export const Operators = () => {
};
/**
* 为了给左侧一个容器用于计算整体宽度以便实现宽度不够时自动隐藏付费配置文案
* 同时还要兼顾左侧没有任何内容时自动隐藏 divider 的 first:hidden 写法
* In order to give the left side a container for calculating the overall width, in order to automatically hide the paid configuration copy when the width is not enough
* Also take into account the first: hidden writing method that automatically hides the divider when there is no content on the left
*/
function LeftContent({ children }: PropsWithChildren) {
return IS_OVERSEA ? (

View File

@@ -60,7 +60,7 @@ export function MonetizeConfig() {
},
);
/** loading 时展示为激活态(默认值) */
/** Show as active when loading (default) */
const btnDisplayOn = loading ? true : monetizeConfig.isOn;
return (

View File

@@ -59,7 +59,7 @@ export const ProjectInfo = () => {
const { modalContextHolder, openModal } = useUpdateProjectModal({
onSuccess: () => {
updateProjectInfo();
// 更新 info 信息
// Update info
Toast.success(I18n.t('project_ide_toast_edit_success'));
},
});
@@ -71,13 +71,13 @@ export const ProjectInfo = () => {
);
/**
* 可编辑判断:
* 1. 有编辑权限
* 2. 非预览态
* Editable judgment:
* 1. Have editing permission
* 2. Non-preview state
*/
const canEdit = canAuthEdit && !version;
// 打开 project 编辑弹窗
// Open the project editing pop-up
const handleEditProject = useCallback(() => {
openModal({
initialValue,
@@ -119,7 +119,7 @@ export const ProjectInfo = () => {
>
{projectInfo?.name}
</COZTitle>
{/* 权限判断 */}
{/* permission judgment */}
{canEdit ? (
<IconButton
color="secondary"

View File

@@ -39,8 +39,8 @@ import { ShortcutItem } from './shortcut-item';
import styles from './styles.module.less';
// coze 快捷键需要绑定 starling 文案。没有绑定文案的暂时不展示
// 避免添加快捷键导致新增误展示
// Coze shortcut needs to bind starling copy. If there is no bound copy, it will not be displayed for the time being.
// Avoid adding shortcuts to cause new wrong display
const SHOW_SHORTCUTS: string[] = [
Command.Default.VIEW_CLOSE_ALL_WIDGET,
Command.Default.VIEW_CLOSE_CURRENT_WIDGET,

View File

@@ -62,7 +62,7 @@ export const WidgetTitle: React.FC<TitlePropsType> = ({
/>
);
}
// 没有标题还在骨架屏阶段
// No title, still in the skeleton screen stage.
if (!title) {
return null;
} else if (uiState === 'saving') {