Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[I18n] Translate monitoring - uiExports #27195

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`,
};
});