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

@@ -156,7 +156,7 @@ export const ActionBar: React.FC<ActionBarProps> = ({
</span>
</InsertLinkPopover>
{/* 暂时禁用,后续放开 */}
{/* Temporarily disabled, later released */}
{SHOW_ADD_NAME_BTN && (
<Tooltip content={I18n.t('add_nickname')}>
<UIButton

View File

@@ -26,7 +26,7 @@ export interface InsertLinkPopoverProps
}
/**
* 全受控
* fully controlled
*/
export const InsertLinkPopover: React.FC<
PropsWithChildren<InsertLinkPopoverProps>

View File

@@ -29,7 +29,7 @@ export const getSyncInsertText = (action: SyncAction): string => {
}
/**
* 不应该走到这里
* Shouldn't have come here
*/
primitiveExhaustiveCheck(type);
return '';

View File

@@ -78,7 +78,7 @@ export const useMarkdownEditor = ({
},
);
// 判断使用内置上传方法 or 自定义
// Determine whether to use the built-in upload method or customize
const selectUploadMethod = () => {
if (customUpload) {
return customUpload({
@@ -143,7 +143,7 @@ export const useMarkdownEditor = ({
ref.current.focus();
const { selectionEnd } = ref.current;
/**
* 选中文字时点击 action bar, 将内容插入到文字的末尾
* When the text is selected, click the action bar to insert the content at the end of the text
*/
console.log('handleInsertText', { value, insertText, selectionEnd });

View File

@@ -25,7 +25,7 @@ import { type UploadState } from '../type';
import { UploadController } from '../service/upload-controller';
/**
* 暂时没有场景,所以这里将多实例、一次行上传多文件的能力屏蔽了
* There is no scene for the time being, so the ability to upload multiple files with multiple instances and one line is blocked here.
*/
export const useUpload = ({
getUserId,

View File

@@ -37,7 +37,7 @@ export interface MarkdownEditorProps {
}
/**
* 全受控组件
* fully controlled component
*/
export const MarkdownEditor: React.FC<MarkdownEditorProps> = ({
value = '',

View File

@@ -50,13 +50,13 @@ export interface UploadState {
fileName: string;
}
// 自定义上传方法入参
// Custom upload method imported parameters
export interface CustomUploadParams {
onUploadAllSuccess: (param: { url: string; fileName: string }) => void;
}
// 自定义上传方法出参
// Custom upload method exported parameter
export interface CustomUploadRes {
uploadFileList: (fileList: File[]) => void;
//null表示已完成
//Null means completed
uploadState: UploadState | null;
}

View File

@@ -31,11 +31,11 @@ export const matchAllTemplateRanges = (
text: string,
template: string,
): { start: number; end: number }[] => {
// 正则表达式,用于匹配双花括号内的内容
// Regular expressions to match the contents of double curly braces
const templateRegex = new RegExp(getFixedVariableTemplate(template), 'g');
const matches: { start: number; end: number }[] = [];
// 循环查找所有匹配项
// Loop through all matches
while (true) {
const match = templateRegex.exec(text);