Commit d337293c authored by Marcus's avatar Marcus

Merge remote-tracking branch 'origin/dev' into dev

parents 55cb13f7 cd02163f
......@@ -10,7 +10,7 @@ tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# 提取的需要翻译的文件列表
messages.txt
i18n-messages.txt
# Editor directories and files
.idea
.vscode
......
......@@ -2,6 +2,7 @@ const fs = require('fs');
const root = "./src"
let allFiles = []
function getFiles(dir){
let files = fs.readdirSync(dir)
files.forEach(file => {
......@@ -16,12 +17,12 @@ getFiles(root)
let messages = new Set()
allFiles.forEach(file => {
let data = fs.readFileSync(file, {encoding: 'utf-8'})
let matched = data.matchAll(/\$t\([\'\"]{1}([^\"\']+)[\'\"]{1}\)/g)
let matched = data.matchAll(/\$t\([\'\"]{1}([^\"\']+)[\'\"]{1}/g)
let i = 0
for(let item of matched){
i ++
messages.add(item[1])
}
})
fs.writeFileSync("./messages.txt", Array.from(messages).join("\n"))
fs.writeFileSync("./i18n-messages.txt", Array.from(messages).join("\n"))
console.log("done!")
\ No newline at end of file
......@@ -1021,6 +1021,7 @@ export default {
console.log('产品未选择', item)
calcable = false
}
item.brandType = item.brand
})
if(this.calculating || !calcable) return false
this.calculating = true
......
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