aboutsummaryrefslogtreecommitdiffstats
path: root/development/genStates.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-22 11:39:21 +0800
committerDan <danjm.com@gmail.com>2018-03-22 11:39:21 +0800
commitedf63f8b51ec0717e580ec69b495987a00062b92 (patch)
treeb7a981c42fe9f176188d52fa062cdb8e1c065569 /development/genStates.js
parentca5bce477e9acdd5f8457b99de2c32a7b4f26e33 (diff)
downloadtangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar.gz
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar.bz2
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar.lz
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar.xz
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.tar.zst
tangerine-wallet-browser-edf63f8b51ec0717e580ec69b495987a00062b92.zip
Add en localeMessages to test states.
Diffstat (limited to 'development/genStates.js')
-rw-r--r--development/genStates.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/development/genStates.js b/development/genStates.js
index bc274c757..1b21a42e5 100644
--- a/development/genStates.js
+++ b/development/genStates.js
@@ -1,6 +1,7 @@
const fs = require('fs')
const path = require('path')
const promisify = require('pify')
+const getLocaleMessages = require('./get-locale-messages')
start().catch(console.error)
@@ -12,6 +13,10 @@ async function start () {
const stateFilePath = path.join(__dirname, 'states', stateFileName)
const stateFileContent = await promisify(fs.readFile)(stateFilePath, 'utf8')
const state = JSON.parse(stateFileContent)
+
+ const enLocaleMessages = await getLocaleMessages()
+ state.localeMessages = { en: enLocaleMessages, current: {} }
+
const stateName = stateFileName.split('.')[0].replace(/-/g, ' ', 'g')
states[stateName] = state
}))