Skip to content

Commit

Permalink
[I18n] Translate monitoring - uiExports (elastic#27195) (elastic#27336)
Browse files Browse the repository at this point in the history
* [I18n] Translate monitoring - uiExports

* Fix message id collision
  • Loading branch information
maryia-lapata committed Dec 18, 2018
1 parent e6f30a2 commit 2144b24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/monitoring/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,5 +23,5 @@ export const monitoring = (kibana) => new kibana.Plugin({
init(server, _options) { init(this, server); },
config,
deprecations,
uiExports
uiExports: getUiExports(),
});
12 changes: 8 additions & 4 deletions x-pack/plugins/monitoring/ui_exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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`,
};
});

0 comments on commit 2144b24

Please sign in to comment.