blob: cc5ecf83ad85cb3a049e33c48d77d3e010b5e1ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* eslint-disable import/no-import-module-exports */
/* eslint-disable global-require */
import { APP_LOCALES } from './languages';
const translations = [];
for (const key of Object.keys(APP_LOCALES)) {
try {
// eslint-disable-next-line import/no-dynamic-require
const translation = require(`./locales/${key}.json`);
translations[key] = translation;
} catch {
console.warn(`Can't find translations for ${key}`);
}
}
module.exports = translations;
|