Skip to content
Snippets Groups Projects
Commit b519fe31 authored by Jack Reed's avatar Jack Reed
Browse files

Move locales to src/locales

Since we require these anyways in src, lets keep these under the src
directory so that we can build an es package.
parent 72416039
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ const fs = require('fs');
const chalk = require('chalk'); // eslint-disable-line import/no-extraneous-dependencies
const { log } = console;
const globOpts = { cwd: 'locales' };
const globOpts = { cwd: 'src/locales' };
const defaultLocaleFile = 'en/translation.json';
const files = glob.sync('**/translation.json', globOpts);
const normalizedFiles = {};
......@@ -37,7 +37,7 @@ function missingKeys(arr1, arr2) {
}
files.forEach((fileName) => {
const fileContent = fs.readFileSync(`locales/${fileName}`);
const fileContent = fs.readFileSync(`src/locales/${fileName}`);
normalizedFiles[fileName] = Object.keys(JSON.parse(fileContent.toString()).translation);
});
......
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import de from '../locales/de/translation.json';
import en from '../locales/en/translation.json';
import de from './locales/de/translation.json';
import en from './locales/en/translation.json';
// Load translations for each language
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment