chore: replace all cn comments to en version by volc api (#313)

This commit is contained in:
tecvan
2025-07-31 15:18:11 +08:00
committed by GitHub
parent 91d6cdb430
commit 5abc63fba6
254 changed files with 5899 additions and 5844 deletions

View File

@@ -62,7 +62,7 @@ func assertValAs(typ document.TableColumnType, val string) (*document.ColumnData
ValTime: ptr.Of(emptyTime),
}, nil
}
// 支持时间戳和时间字符串
// Supports timestamp and time string
i, err := strconv.ParseInt(val, 10, 64)
if err == nil {
t := time.Unix(i, 0)
@@ -152,7 +152,7 @@ func assertValAsForce(typ document.TableColumnType, val string, nullable bool) *
}
func assertVal(val string) document.ColumnData {
// TODO: 先不处理 image
// TODO: Do not process images first
if val == "" {
return document.ColumnData{
Type: document.TableColumnTypeUnknown,

View File

@@ -75,7 +75,7 @@ func parseByRowIterator(iter rowIterator, config *contract.Config, opts ...parse
var rowData []*document.ColumnData
for j := range row {
colSchema, found := rev[j]
if !found { // 列裁剪
if !found { // column clipping
continue
}

View File

@@ -51,7 +51,7 @@ func parseJSON(config *contract.Config) parseFn {
}
} else {
for k := range rawSlices[0] {
// init 取首个 json item 中 key 的随机顺序
// Init takes the random order of keys in the first json item
header = append(header, k)
}
}

View File

@@ -163,7 +163,7 @@ func parseByPython(config *contract.Config, storage storage.Storage, ocr ocr.OCR
}
docs = append(docs, doc)
} else {
// TODO: 这里有点问题img label 可能被较短的 chunk size 截断
// TODO: There is a problem here, the img label may be truncated by the shorter chunk size
result.Content[i+1].Content = label + result.Content[i+1].Content
}
case contentTypeTable:

View File

@@ -35,7 +35,7 @@ const imgSrcFormat = `<img src="" data-tos-key="%s">`
func createSecret(uid int64, fileType string) string {
num := 10
input := fmt.Sprintf("upload_%d_Ma*9)fhi_%d_gou_%s_rand_%d", uid, time.Now().Unix(), fileType, rand.Intn(100000))
// 做md5取前20,// mapIntToBase62 把数字映射到 Base62
// Do md5, take the first 20,//mapIntToBase62 map the number to Base62
hash := sha256.Sum256([]byte(fmt.Sprintf("%s", input)))
hashString := base64.StdEncoding.EncodeToString(hash[:])
if len(hashString) > num {