Commit 938707e9 authored by 前端-许佳敏's avatar 前端-许佳敏

chore: 补充缺失文件

parent a07b106a
const path = require('path')
const fs = require('fs')
const translateContainer = require('../locales')
const app = process.env.app
if (!app) {
throw `国际化文件找不到 app -> ${app}`
}
const workPath = path.resolve(__dirname, `../apps/${app}`, 'locales.json')
const commonTranslateContainer = translateContainer.common
const appTranslateContainer = translateContainer[app]
const translateContent = {
"zh-CN": {
...commonTranslateContainer['zh-CN'],
...appTranslateContainer['zh-CN']
},
"en-US": {
...commonTranslateContainer["en-US"],
...appTranslateContainer["en-US"]
},
"ko-KR": {
...commonTranslateContainer["ko-KR"],
...appTranslateContainer["ko-KR"]
},
}
fs.writeFile(workPath, JSON.stringify(translateContent), function(err) {
if (err) {
throw err
}
console.log(`${app}国际化文件写入成功`)
})
\ No newline at end of file
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