git ssb

2+

mixmix / ticktack



Tree: 66dcda756a8e52b5f22cac3256eb987e6b3226b7

Files: 66dcda756a8e52b5f22cac3256eb987e6b3226b7 / translations / checker.js

543 bytesRaw
1// this is a script to help spot missing translations!
2
3const merge = require('lodash/mergeWith')
4const flat = require('flat')
5
6const en = flat(require('./en'))
7const zh = flat(require('./zh'))
8
9function customizer (objVal, srcVal, key, obj, src, stack) {
10 // See docs https://lodash.com/docs/4.17.4#mergeWith
11
12 if (objVal == undefined) { // implies zh is missing key
13 if (typeof srcVal === 'string') console.log(key, '=', srcVal)
14 }
15}
16
17merge(zh, en, customizer)
18// signature: obj, src, customizer
19// order matters because of customizer
20

Built with git-ssb-web