git ssb

2+

mixmix / ticktack



Tree: eca391f1f9e6c3e5c7b546852665f1af82c5db61

Files: eca391f1f9e6c3e5c7b546852665f1af82c5db61 / translations / sync.js

453 bytesRaw
1const nest = require('depnest')
2const merge = require('lodash/merge')
3
4exports.gives = nest('translations.sync.strings')
5
6exports.needs = nest('settings.sync.get', 'first')
7
8const languages = {
9 en: require('./en.js'),
10 zh: require('./zh.js')
11}
12
13exports.create = (api) => {
14 return nest('translations.sync.strings', () => {
15 const language = api.settings.sync.get('language', 'zh')
16
17 return merge({}, languages.en, languages[language])
18 })
19}
20
21

Built with git-ssb-web