Commit 4442ed83 authored by dragondean@qq.com's avatar dragondean@qq.com

优化国际化工具

parent c84e8a00
......@@ -99,9 +99,7 @@ let autoTransCnt = 0
async function translate(obj){
// 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理
for(let text in obj){
if(obj[text] || text.includes('{'))continue
// 只有空格的不翻译
if(text.trim() === '')continue
if(obj[text] || text.trim() === '')continue
try{
const textEn = await translateText(text)
console.log(`${text} => ${textEn}\n`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment