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

@@ -60,7 +60,7 @@ export const getColumns = (
const dataWidth = width ? width : initWidth;
const isLast = index === _list.length - 1;
switch (i.type) {
// 文本
// Text
case FieldItemType.Text:
res = {
// @ts-expect-error -- linter-disable-autofix
@@ -71,7 +71,7 @@ export const getColumns = (
width: isLast ? undefined : dataWidth,
};
break;
// 整数
// integer
case FieldItemType.Number:
res = {
// @ts-expect-error -- linter-disable-autofix
@@ -82,7 +82,7 @@ export const getColumns = (
width: isLast ? undefined : dataWidth,
};
break;
// 数字
// number
case FieldItemType.Float:
res = {
// @ts-expect-error -- linter-disable-autofix
@@ -93,7 +93,7 @@ export const getColumns = (
width: isLast ? undefined : dataWidth,
};
break;
// 时间
// time
case FieldItemType.Date:
res = {
// @ts-expect-error -- linter-disable-autofix
@@ -104,7 +104,7 @@ export const getColumns = (
width: isLast ? undefined : dataWidth,
};
break;
// 布尔
// Boolean
case FieldItemType.Boolean:
res = {
// @ts-expect-error -- linter-disable-autofix

View File

@@ -116,7 +116,7 @@ export const DataTable = forwardRef<DataTableRef, DatabaseTable>(
const resizeList = columns.list.filter(
item => item.dataIndex !== col.dataIndex,
);
// 计算拖拽列能拖拽的最小宽度,小于最小宽度则返回最小宽度
// Calculate the minimum width that the drag column can drag, and return the minimum width if it is less than the minimum width
const widthCount = resizeList.reduce(
(prev, cur) => Number(prev) + Number(cur.width),
0,

View File

@@ -75,7 +75,7 @@ const ResetBtn: React.FC<DatabaseTable> = props => {
close();
},
className: s['reset-confirm-modal'],
// ToolPane z-index 1000,所以此处需要加 1001 z-index,避免被 database 数据面板遮住
// ToolPane's z-index is 1000, so you need to add 1001 z-index here to avoid being obscured by the database data panel
zIndex: 1001,
});

View File

@@ -14,5 +14,5 @@
* limitations under the License.
*/
// Coze的渠道id在某些场景下需要写死传递给后端
// Coze's channel ID, in some scenarios, needs to be written dead and passed to the backend
export const COZE_CONNECTOR_ID = '10000010';

View File

@@ -53,7 +53,7 @@ export const useFileList = (
};
try {
const res = await fileboxApi.FileList({
// 前端从 1 开始计数,方便 Math.ceil 计算,传给后端时手动减 1
// The front end starts counting from 1, which is convenient for Math.ceil calculation. When passing to the back end, manually subtract 1.
page_num: page - 1,
page_size: pageSize,
bid: botId,

View File

@@ -61,15 +61,15 @@ export const useUploadModal = (params: UseUploadModalParams) => {
unitList.some(
i =>
/**
* 1. 未上传成功的
* 2. 校验失败的
* 3. 名字为空的(名字为空暂不影响 validateMessage所以需要单独判断
* 1. Unsuccessful upload
* 2. Validation failed
* 3. The name is empty (the name is empty will not affect the validateMessage for the time being, so it needs to be judged separately)
*/
i.status !== UploadStatus.SUCCESS || i.validateMessage || !i.name,
);
const handleUnitListUpdate = (data: UnitItem[]) => {
// 防止重命名后再上传被覆盖
// Prevent renaming and then uploading from being overwritten.
const newData = data.map(i => {
let resultName = i.name;
unitList.forEach(u => {

View File

@@ -42,7 +42,7 @@ export const ImageList: FC<ImageListProps> = props => {
<CardGroup spacing={12} className={s['card-group']}>
{images?.map(i => {
const {
// MainURL 加载太慢了,列表中使用 ThumbnailURL 进行缩略图展示
// MainURL is too slow to load, the list uses ThumbnailURL for thumbnail display
ThumbnailURL: url,
MainURL: previewUrl,
FileID: id,
@@ -68,7 +68,7 @@ export const ImageList: FC<ImageListProps> = props => {
cover={
<Image
src={url}
// 仅设置宽度,高度会按图片原比例自动缩放
// Only set the width, and the height will be automatically scaled according to the original scale of the picture.
width={209}
className={s['card-cover']}
preview={{

View File

@@ -52,12 +52,12 @@ export const FileBoxList: FC<FileBoxListProps> = props => {
},
);
// 手动控制 data 加载时机
// Manually control data loading timing
useEffect(() => {
if (botId) {
reloadAsync();
// 重新加载时,回到最顶部
// When reloading, return to the top
ref.current?.scrollTo?.({
top: 0,
behavior: 'smooth',
@@ -85,11 +85,11 @@ export const FileBoxList: FC<FileBoxListProps> = props => {
return (
<div className={s['filebox-list']}>
<div className={s.header}>
{/* 切换图片/文档 */}
{/* Switch images/documents */}
<FileBoxFilter />
<Space spacing={12}>
{/* 搜索框 */}
{/* search box */}
<UISearch
placeholder={I18n.t(
'card_builder_dataEditor_get_errormsg_please_enter',
@@ -97,7 +97,7 @@ export const FileBoxList: FC<FileBoxListProps> = props => {
onChange={debounceSearch}
/>
{/* 上传按钮 */}
{/* Upload button */}
<UIButton type="primary" theme="solid" onClick={open}>
{I18n.t('datasets_createFileModel_step2')}
</UIButton>
@@ -110,7 +110,7 @@ export const FileBoxList: FC<FileBoxListProps> = props => {
childStyle={{
height: '100%',
width: '100%',
// 防止切换 fileListType 时 items 数量不一致,导致 loading 闪烁
// Prevent inconsistent number of items when switching fileListType, causing loading to flicker
display: loading ? 'none' : 'block',
}}
>

View File

@@ -93,7 +93,7 @@ export const useMemoryDebugModal = ({
</span>
}
>
{/* 给 children 传递 onCancel 参数,用于从内部关闭弹窗 */}
{/* Pass the onCancel parameter to children to close the pop-up window from within */}
{React.isValidElement(item.component)
? React.cloneElement(item.component, {
onCancel: close,

View File

@@ -252,7 +252,7 @@ export const VariableDebug = () => {
{i.keyword}
</Paragraph>
</div>
{/* 是否为系统字段 */}
{/* Is it a system field? */}
{i.is_system ? (
<Paragraph
data-dtestid={`${BotE2e.BotVariableDebugModalValueInput}.${i.keyword}`}

View File

@@ -21,7 +21,7 @@ import { sendTeaEvent, EVENT_NAMES } from '@coze-arch/bot-tea';
export const useSendTeaEventForMemoryDebug = (p: { isStore: boolean }) => {
const { isStore = false } = p;
// TODO@XML 看起来在商店也用到了,先不改
// TODO@XML seems to be used in the store too, don't change it
const params = useParams<DynamicParams>();
const { bot_id = '', product_id = '' } = params;