[I18n] Translate monitoring - uiExports (#27195)

* [I18n] Translate monitoring - uiExports

* Fix message id collision
This commit is contained in:
Leanid Shutau 2018-12-17 22:50:15 +03:00 committed by Maryia Lapata
parent b0c6b52b45
commit 3f9c1eebcb
2 changed files with 10 additions and 6 deletions

View file

@ -8,7 +8,7 @@ import { resolve } from 'path';
import { init } from './init';
import { config } from './config';
import { deprecations } from './deprecations';
import { uiExports } from './ui_exports';
import { getUiExports } from './ui_exports';
/**
* Invokes plugin modules to instantiate the Monitoring plugin for Kibana
@ -23,5 +23,5 @@ export const monitoring = (kibana) => new kibana.Plugin({
init(server, _options) { init(this, server); },
config,
deprecations,
uiExports
uiExports: getUiExports(),
});

View file

@ -4,17 +4,21 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
/**
* Configuration of dependency objects for the UI, which are needed for the
* Monitoring UI app and views and data for outside the monitoring
* app (injectDefaultVars and hacks)
* @return {Object} data per Kibana plugin uiExport schema
*/
export const uiExports = {
export const getUiExports = () => ({
app: {
title: 'Monitoring',
title: i18n.translate('xpack.monitoring.monitoringTitle', { defaultMessage: 'Monitoring' }),
order: 9002,
description: 'Monitoring for Elastic Stack',
description: i18n.translate('xpack.monitoring.uiExportsDescription', {
defaultMessage: 'Monitoring for Elastic Stack',
}),
icon: 'plugins/monitoring/icons/monitoring.svg',
euiIconType: 'monitoringApp',
linkToLastSubUrl: false,
@ -29,4 +33,4 @@ export const uiExports = {
hacks: [ 'plugins/monitoring/hacks/toggle_app_link_in_nav' ],
home: [ 'plugins/monitoring/register_feature' ],
styleSheetPaths: `${__dirname}/public/index.scss`,
};
});