You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
427 B
13 lines
427 B
7 years ago
|
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
|