diff --git a/x-pack/plugins/reporting/server/config/index.test.ts b/x-pack/plugins/reporting/server/config/index.test.ts index 464387ebf90c7..62936fb2f14f3 100644 --- a/x-pack/plugins/reporting/server/config/index.test.ts +++ b/x-pack/plugins/reporting/server/config/index.test.ts @@ -37,7 +37,7 @@ describe('deprecations', () => { const { messages } = applyReportingDeprecations({ index, roles: { enabled: false } }); expect(messages).toMatchInlineSnapshot(` Array [ - "\\"xpack.reporting.index\\" is deprecated. Multitenancy by changing \\"kibana.index\\" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details", + "Multitenancy by changing \\"kibana.index\\" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details", ] `); }); @@ -47,7 +47,7 @@ describe('deprecations', () => { const { messages } = applyReportingDeprecations({ roles: { enabled: true } }); expect(messages).toMatchInlineSnapshot(` Array [ - "\\"xpack.reporting.roles\\" is deprecated. Granting reporting privilege through a \\"reporting_user\\" role will not be supported starting in 8.0. Please set \\"xpack.reporting.roles.enabled\\" to \\"false\\" and grant reporting privileges to users using Kibana application privileges **Management > Security > Roles**.", + "Granting reporting privilege through a \\"reporting_user\\" role will not be supported starting in 8.0. Please set \\"xpack.reporting.roles.enabled\\" to \\"false\\" and grant reporting privileges to users using Kibana application privileges **Management > Security > Roles**.", ] `); }); diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index 119f49df014e2..c7afdb22f8bdb 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { PluginConfigDescriptor } from 'kibana/server'; import { get } from 'lodash'; import { ConfigSchema, ReportingConfigType } from './schema'; @@ -27,11 +28,21 @@ export const config: PluginConfigDescriptor = { const reporting = get(settings, fromPath); if (reporting?.index) { addDeprecation({ - message: `"${fromPath}.index" is deprecated. Multitenancy by changing "kibana.index" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details`, + title: i18n.translate('xpack.reporting.deprecations.reportingIndex.title', { + defaultMessage: 'Setting "{fromPath}.index" is deprecated', + values: { fromPath }, + }), + message: i18n.translate('xpack.reporting.deprecations.reportingIndex.description', { + defaultMessage: `Multitenancy by changing "kibana.index" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details`, + }), correctiveActions: { manualSteps: [ - `If you rely on this setting to achieve multitenancy you should use Spaces, cross-cluster replication, or cross-cluster search instead.`, - `To migrate to Spaces, we encourage using saved object management to export your saved objects from a tenant into the default tenant in a space.`, + i18n.translate('xpack.reporting.deprecations.reportingIndex.manualStepOne', { + defaultMessage: `If you rely on this setting to achieve multitenancy you should use Spaces, cross-cluster replication, or cross-cluster search instead.`, + }), + i18n.translate('xpack.reporting.deprecations.reportingIndex.manualStepTwo', { + defaultMessage: `To migrate to Spaces, we encourage using saved object management to export your saved objects from a tenant into the default tenant in a space.`, + }), ], }, }); @@ -39,15 +50,26 @@ export const config: PluginConfigDescriptor = { if (reporting?.roles?.enabled !== false) { addDeprecation({ - message: - `"${fromPath}.roles" is deprecated. Granting reporting privilege through a "reporting_user" role will not be supported ` + - `starting in 8.0. Please set "xpack.reporting.roles.enabled" to "false" and grant reporting privileges to users ` + - `using Kibana application privileges **Management > Security > Roles**.`, + title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', { + defaultMessage: 'Setting "{fromPath}.roles" is deprecated', + values: { fromPath }, + }), + message: i18n.translate('xpack.reporting.deprecations.reportingRoles.description', { + defaultMessage: + `Granting reporting privilege through a "reporting_user" role will not be supported` + + ` starting in 8.0. Please set "xpack.reporting.roles.enabled" to "false" and grant reporting privileges to users` + + ` using Kibana application privileges **Management > Security > Roles**.`, + }), correctiveActions: { manualSteps: [ - `Set 'xpack.reporting.roles.enabled' to 'false' in your kibana configs.`, - `Grant reporting privileges to users using Kibana application privileges` + - `under **Management > Security > Roles**.`, + i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOne', { + defaultMessage: `Set 'xpack.reporting.roles.enabled' to 'false' in your kibana configs.`, + }), + i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepTwo', { + defaultMessage: + `Grant reporting privileges to users using Kibana application privileges` + + ` under **Management > Security > Roles**.`, + }), ], }, });