Update after plugin folder layout changes in Kibana

This require to use <kibana_root>/data for registered translations
and i18n plugin moved to core_plugins from plugins.

Refer to PR for more details:
https://github.com/elastic/kibana/pull/7562
This commit is contained in:
Martin Hickey 2016-08-09 12:09:18 +01:00
parent 8c7f51ca5d
commit b84f40a40b
15 changed files with 4 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import process from 'child_process';
import Promise from 'bluebird';
const PATH_SEPARATOR = path.sep;
const DATA_PATH = __dirname + PATH_SEPARATOR + 'fixtures';
const DATA_PATH = __dirname + PATH_SEPARATOR + 'data';
const TRANSLATION_BACKUP_PATH = DATA_PATH + '/translations_backup';
const translationStorePath = i18n.getTranslationStoragePath();

View file

@ -12,9 +12,8 @@ const mkdirpAsync = Promise.promisify(mkdirp);
const PATH_SEPARATOR = path.sep;
const TRANSLATION_FILE_EXTENSION = 'json';
const TRANSLATION_STORE_PATH = kibanaPackage.__dirname + PATH_SEPARATOR + 'fixtures' + PATH_SEPARATOR + 'translations';
const TRANSLATION_STORE_PATH = kibanaPackage.__dirname + PATH_SEPARATOR + 'data' + PATH_SEPARATOR + 'translations';
//TODO(hickeyma): Update to use https://github.com/elastic/kibana/pull/7562
const getTranslationStoragePath = function () {
return TRANSLATION_STORE_PATH;
};

View file

@ -2,7 +2,7 @@ import Promise from 'bluebird';
import { mkdirp as mkdirpNode } from 'mkdirp';
import manageUuid from './server/lib/manage_uuid';
import fs from 'fs';
import i18nPlugin from '../../plugins/i18n/server/i18n/index';
import i18nPlugin from '../i18n/server/i18n/index';
import ingest from './server/routes/api/ingest';
import kibanaPackage from '../../utils/package_json';
import Promise from 'bluebird';

View file

@ -10,7 +10,7 @@ import UiExports from './ui_exports';
import UiBundle from './ui_bundle';
import UiBundleCollection from './ui_bundle_collection';
import UiBundlerEnv from './ui_bundler_env';
import i18nPlugin from '../plugins/i18n/server/i18n/index';
import i18nPlugin from '../core_plugins/i18n/server/i18n/index';
import langParser from 'accept-language-parser';
let kibanaTranslations = [];