Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moves locale folder out of modules (#139)
  • Loading branch information
hermzz authored and RyanNoelk committed Feb 20, 2017
1 parent 6bd11de commit 9ad8107
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/modules/index.js
Expand Up @@ -9,7 +9,7 @@ import es from 'react-intl/locale-data/es';
import de from 'react-intl/locale-data/de';
addLocaleData([...en, ...es, ...de]);

const messages = require('./locale/'+process.env.LOCALE+'.json');
const messages = require('../locale/'+process.env.LOCALE+'.json');

import App from './base/components/App'
import Footer from './base/components/Footer'
Expand Down
4 changes: 2 additions & 2 deletions frontend/scripts/merge-locale.js
Expand Up @@ -10,7 +10,7 @@ import {sync as mkdirpSync} from 'mkdirp';
*/

const MESSAGES_PATTERN = './build/messages/**/*.json';
const LOCALE_DIR = './modules/locale/';
const LOCALE_DIR = './locale/';

let defaultMessages = globSync(MESSAGES_PATTERN)
.map((filename) => fs.readFileSync(filename, 'utf8'))
Expand All @@ -30,7 +30,7 @@ let defaultMessages = globSync(MESSAGES_PATTERN)
mkdirpSync(LOCALE_DIR);
let locales = ['en', 'es', 'de']
.forEach((locale, i) => {
let messages = JSON.parse(fs.readFileSync('./modules/locale/'+locale+'.json', 'utf8'));
let messages = JSON.parse(fs.readFileSync(LOCALE_DIR + locale + '.json', 'utf8'));

fs.writeFileSync(
LOCALE_DIR + locale + '.json',
Expand Down

0 comments on commit 9ad8107

Please sign in to comment.