blob: 3b76a851d2e3d04c1b499616bd0d5f9a1b0f6d71 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
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
|