aboutsummaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-28 09:02:25 +0800
committerkumavis <aaron@kumavis.me>2018-03-28 09:02:25 +0800
commit5c521775f6426556664f114ecbc07e13b8272cb9 (patch)
tree6673974fd27bc27ac3cd585e11536bf65fdd51ec /development
parent9482af61576972c29b35eb9a542724005d8fd47a (diff)
downloadtangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar.gz
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar.bz2
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar.lz
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar.xz
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.tar.zst
tangerine-wallet-browser-5c521775f6426556664f114ecbc07e13b8272cb9.zip
development - genStates - simplify locale importing
Diffstat (limited to 'development')
-rw-r--r--development/genStates.js4
-rw-r--r--development/get-locale-messages.js12
2 files changed, 2 insertions, 14 deletions
diff --git a/development/genStates.js b/development/genStates.js
index 1b21a42e5..0ac1059be 100644
--- a/development/genStates.js
+++ b/development/genStates.js
@@ -1,7 +1,8 @@
const fs = require('fs')
const path = require('path')
const promisify = require('pify')
-const getLocaleMessages = require('./get-locale-messages')
+const enLocaleMessages = require('../app/_locales/en/messages.json')
+
start().catch(console.error)
@@ -14,7 +15,6 @@ async function start () {
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')
diff --git a/development/get-locale-messages.js b/development/get-locale-messages.js
deleted file mode 100644
index 3b76a851d..000000000
--- a/development/get-locale-messages.js
+++ /dev/null
@@ -1,12 +0,0 @@
-const fs = require('fs')
-const path = require('path')
-const promisify = require('pify')
-
-async function getLocaleMessages () {
- const localeMessagesPath = path.join(process.cwd(), 'app', '_locales', 'en', 'messages.json')
- const enLocaleMessagesJSON = await promisify(fs.readFile)(localeMessagesPath)
- const enLocaleMessages = JSON.parse(enLocaleMessagesJSON)
- return enLocaleMessages
-}
-
-module.exports = getLocaleMessages