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

@@ -63,7 +63,7 @@ export const transformUnitList = ({
}
return unit;
});
// TODO as 待解
// TODO as to be solved
return filteredList as UnitItem[];
};
@@ -111,8 +111,8 @@ export function useOptFromQuery(): OptType {
return opt;
}
/** 为什么返回undefined? 不一定需要空字符串,如果取不到就返回undefined */
/**现在还有 docID 这个入口吗??? */
/** Why return undefined? You don't necessarily need an empty string. If you can't get it, return undefined. */
/**Is there still an entrance for docID??? */
export function useDocIdFromQuery(): string | undefined {
const query = useKnowledgeParams();
return get(query, 'docID', undefined);

View File

@@ -18,9 +18,9 @@ import { type Dataset, StorageLocation } from '@coze-arch/idl/knowledge';
export function getStorageStrategyEnabled(dataset?: Dataset) {
return (
// 云搜索只在国内环境上线
// Cloud search is only available in the domestic environment
IS_CN_REGION &&
// 只有知识库首次上传,才可以配置云搜索
// Cloud search can only be configured if the knowledge base is uploaded for the first time.
dataset?.doc_count === 0 &&
dataset?.storage_location === StorageLocation.Default
);

View File

@@ -30,9 +30,9 @@ export const getSortedFilterPages = (filterPagesConfig: FilterPageConfig[]) =>
export const getFilterPagesString = (pages: number[]) => pages.join(' / ');
/**
* 渲染为形如下方例子的内容:
* 论文 1过滤第 2 / 4 / 6 页;设置了页面局部过滤
* 论文 2过滤第 1 页...
* Render as the following example:
* Paper 1: Filter page 2/4/6; set page local filtering
* Paper 2: Filtering Page 1...
*/
export const renderDocumentFilterValue = ({
filterValue,

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
/** 此文件放的是 table 通用 utils */
/** This file contains table utils */
import { get } from 'lodash-es';
import { I18n } from '@coze-arch/i18n';
@@ -44,7 +44,7 @@ export interface IValidateRes {
valid: boolean;
errorMsg: string;
}
// 校验tableStructure列名及表明是否包含特殊字符
// Verify tableStructure column names and indicate whether they contain special characters
export const validateField = (
fieldName: string,
emptyMsg = '',
@@ -52,7 +52,7 @@ export const validateField = (
let valid = true;
let errorMsg = '';
// 是否包含特殊字符-->单引号,双引号,转义符,反引号
// Whether it contains special characters -- > single quotes, double quotes, escape characters, backquotes
const notationReg = /["'`\\]+/g;
if (!fieldName) {
@@ -66,7 +66,7 @@ export const validateField = (
valid = false;
errorMsg = I18n.t('knowledge_tableStructure_field_errLegally');
}
// 不能包含_knowledge_slice_id关键字
// Cannot contain _knowledge_slice_id keywords
if (['_knowledge_slice_id'].includes(fieldName)) {
valid = false;
errorMsg = I18n.t('knowledge_tableStructure_errSystemField');
@@ -81,10 +81,10 @@ export const getSrcFromImg = (str: string): string[] => {
return [];
}
const imgRegx = /<img[^>]+src\s*=\s*['"]([^'"]+)['"][^>]*>/g;
// 使用正则表达式进行匹配
// Matching using regular expressions
const matches = str.match(imgRegx);
// 提取匹配结果中的src属性值
// Extract the value of the src attribute from the matching result
const srcList: string[] = [];
if (matches) {
for (let i = 0; i < matches.length; i++) {