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