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

@@ -19,7 +19,7 @@ import { describe, expect, it } from 'vitest';
import { getFileInfo } from '../src/util';
import { FileTypeEnum } from '../src/const';
// 创建模拟的 File 对象
// Create a simulated File object
function createMockFile(name: string, type: string): File {
return {
name,
@@ -140,7 +140,7 @@ describe('getFileInfo', () => {
});
it('当文件类型和扩展名不匹配时,应该优先使用文件类型判断', () => {
// 文件名是 .txt 但 MIME 类型是图片
// The file name is .txt, but the MIME type is image
const file = createMockFile('image.txt', 'image/jpeg');
const fileInfo = getFileInfo(file);

View File

@@ -17,7 +17,7 @@
import { FileTypeEnum, type TFileTypeConfig } from './const';
/**
* 文件类型
* file type
* {@link
* {@link https://www.iana.org/assignments/media-types/media-types.xhtml#image}
*/
@@ -37,7 +37,7 @@ export const FILE_TYPE_CONFIG: readonly TFileTypeConfig[] = [
'.ogg',
'.wma',
'.alac',
// .midi .mid 都是MIDIMusical Instrument Digital Interface)文件的扩展名 - GPT
// Both .midi and .mid are extensions for MIDI (Musical Instrument Digital Interface) files - GPT
'.mid',
'.midi',
'.ac3',

View File

@@ -16,7 +16,7 @@
import { FILE_TYPE_CONFIG } from './file-type';
// 获取文件信息
// Get file information
export const getFileInfo = (file: File) => {
const fileInfo = FILE_TYPE_CONFIG.find(({ judge, accept }) =>
judge ? judge(file) : accept.some(ext => file.name.endsWith(ext)),