new C'hnages

This commit is contained in:
saeid
2019-08-21 14:49:33 +04:30
parent 2db3d32960
commit 6c8966e777
128 changed files with 261 additions and 162 deletions
+27
View File
@@ -0,0 +1,27 @@
// http://kazupon.github.io/vue-i18n/en/messages.html
const requireLang = require.context(
'@/lang',
true,
/\.json$/
)
const messages = {}
for (const file of requireLang.keys()) {
if (file === './index.js') continue
const path = file.replace(/(\.\/|\.json$)/g, '').split('/')
path.reduce((o, s, i) => {
if (o[s]) return o[s]
o[s] = i + 1 === path.length
? requireLang(file)
: {}
return o[s]
}, messages)
}
export default messages