aboutsummaryrefslogtreecommitdiffstats
path: root/src/i18n/translations.ts
blob: 9a7dc74535ad0163d78989beacbc41a36f36a963 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* 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;