1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/development/get-locale-messages.js

13 lines
427 B
JavaScript
Raw Normal View History

2018-03-22 04:39:21 +01:00
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