Extract new lines.

Fix i18n:collect command to update languages by i18n/index.json definitions.
This commit is contained in:
ErickSkrauch
2018-03-14 15:18:58 +03:00
parent fe4c386dfc
commit e909fefae5
14 changed files with 41 additions and 27 deletions

View File

@ -5,11 +5,12 @@ import {sync as globSync} from 'glob';
import {sync as mkdirpSync} from 'mkdirp';
import chalk from 'chalk';
import prompt from 'prompt';
import localesMap from './../src/i18n/index.json';
const MESSAGES_PATTERN = `${__dirname}/../dist/messages/**/*.json`;
const LANG_DIR = `${__dirname}/../src/i18n`;
const DEFAULT_LOCALE = 'en';
const SUPPORTED_LANGS = [DEFAULT_LOCALE].concat('ru', 'be', 'pt', 'uk');
const SUPPORTED_LANGS = [DEFAULT_LOCALE, ...Object.keys(localesMap)];
/**
* Aggregates the default messages that were extracted from the app's