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

@@ -74,7 +74,7 @@ const SegmentMenu: React.FC<ISegmentMenuProps> = props => {
) : null}
<div className="pl-2 h-6 mt-4 mb-1 flex items-center">
<div className="coz-fg-secondary text-[12px] font-[400] leading-4 shrink-0">
{/**文档列表 */}
{/**document list */}
{I18n.t('knowledge_level_012')}
</div>
</div>
@@ -114,7 +114,7 @@ const SegmentMenu: React.FC<ISegmentMenuProps> = props => {
<div className="flex flex-col gap-1 !overflow-auto">
<div className="w-full pl-2 h-6 items-center flex gap-[4px]">
<div className="coz-fg-secondary text-[12px] font-[400] leading-4 shrink-0">
{/**分段层级 */}
{/**segment hierarchy */}
{I18n.t('knowledge_level_adjust')}
</div>
{treeDisabled ? null : (

View File

@@ -48,10 +48,10 @@ export const SegmentTree: React.FC<ISegmentTreeProps> = ({
disabled,
}) => {
/**
* 选中功能
* select function
*/
const [selected, setSelected] = useState(new Set<string>());
// 分片 id
// Sharding id
const [selectedThroughParent, setSelectedThroughParent] = useState(
new Set<string>(),
);

View File

@@ -114,8 +114,8 @@ export function useSegmentContextMenu({
onContextMenu: (e, node: NodeApi<LevelDocumentTree>) => {
e.preventDefault();
setTreeNode(node);
/** project ide 里面ide 容器设置了 contain: strict, 会导致 fixed position
* 的偏移基础不对,所以这里需要减去 ide 容器的 left top
/** In the project ide, the ide container is set to contain: strict, which will cause a fixed position.
* The base of the offset is wrong, so you need to subtract the left and top values of the ide container here
*/
let clickX = e.pageX;
let clickY = e.pageY;

View File

@@ -140,7 +140,7 @@ export const handleTreeNodeMove = (
};
}
// 如果是同一个 parent且拖动的位置在当前位置之前dropIndex 减 1
// If it is the same parent and the dragged position is before the current position, the dropIndex is reduced by 1.
const originalIndex = parentSegment.children.indexOf(dragSegment.id);
const dropIndex =
originalIndex < positions.dropIndex &&
@@ -224,7 +224,7 @@ export const handleMergeNodes = (
};
}
// 从原父节点的 children 中移除该节点
// Remove the node from the children of the original parent
const parentSegment = resSegments.find(
item => item.id === segmentToMerge.parent,
);
@@ -235,7 +235,7 @@ export const handleMergeNodes = (
}
if (!['table', 'image', 'title'].includes(segmentToMerge?.type ?? '')) {
// 合并文本内容并删除节点
// Merge text content and delete nodes
mergedSegment.text += segmentToMerge.text;
const index = resSegments.findIndex(
item => item.id === segmentToMerge.id,
@@ -244,7 +244,7 @@ export const handleMergeNodes = (
resSegments.splice(index, 1);
}
} else {
// 非section-text类型的节点将其移动到合并后节点的children中
// Nodes of type non-section-text, move them to the children of the merged node
segmentToMerge.parent = mergedSegment.id;
mergedSegment.children.push(segmentToMerge.id);
}