|
@@ -280,7 +280,7 @@ func DayNewTranslateContent() (err error) {
|
|
|
var ups []interface{}
|
|
|
for _, v := range list {
|
|
|
//如果单条翻译的字符数超过1000,则直接翻译,否则批量翻译
|
|
|
- if len(v.Content) > 1000 {
|
|
|
+ //if len(v.Content) > 1000 {
|
|
|
en, e := AliTranslate(v.Content)
|
|
|
if e != nil {
|
|
|
err = e
|
|
@@ -289,7 +289,7 @@ func DayNewTranslateContent() (err error) {
|
|
|
needChangeIds += strconv.Itoa(int(v.Id)) + ","
|
|
|
multi += ` WHEN `+strconv.Itoa(int(v.Id))+` THEN ?`
|
|
|
ups = append(ups, en)
|
|
|
- }else{
|
|
|
+ /*}else{
|
|
|
if count >= 50 { //待翻译的条数不能超过50; 单条翻译字符数不能超过1000字符
|
|
|
contentEnMap, err = batchTranslateHandler(contentMap)
|
|
|
if err != nil {
|
|
@@ -306,7 +306,7 @@ func DayNewTranslateContent() (err error) {
|
|
|
}
|
|
|
contentMap[strconv.Itoa(int(v.Id))] = dealPunctuationToEn(strings.Trim(v.Content, " "))+`{end}`
|
|
|
count += 1
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
//剩余不满50条的content
|
|
|
if count > 0 {
|