diff --git a/.i18nrc.json b/.i18nrc.json index 8b0c19ad1794c..a531fb1767029 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -23,6 +23,7 @@ "xpack.graph": "x-pack/plugins/graph", "xpack.grokDebugger": "x-pack/plugins/grokdebugger", "xpack.idxMgmt": "x-pack/plugins/index_management", + "xpack.indexLifecycleMgmt": "x-pack/plugins/index_lifecycle_management", "xpack.infra": "x-pack/plugins/infra", "xpack.licenseMgmt": "x-pack/plugins/license_management", "xpack.ml": "x-pack/plugins/ml", diff --git a/x-pack/plugins/cross_cluster_replication/server/lib/check_license/check_license.js b/x-pack/plugins/cross_cluster_replication/server/lib/check_license/check_license.js index 7cb6e4e1db08f..35e5e3783e628 100644 --- a/x-pack/plugins/cross_cluster_replication/server/lib/check_license/check_license.js +++ b/x-pack/plugins/cross_cluster_replication/server/lib/check_license/check_license.js @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { i18n } from '@kbn/i18n'; + export function checkLicense(xpackLicenseInfo) { const pluginName = 'Cross Cluster Replication'; @@ -14,7 +16,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: `You cannot use ${pluginName} because license information is not available at this time.`, + message: i18n.translate( + 'xpack.crossClusterReplication.checkLicense.errorUnavailableMessage', + { + defaultMessage: 'You cannot use {pluginName} because license information is not available at this time.', + values: { pluginName }, + }, + ), }; } @@ -29,7 +37,13 @@ export function checkLicense(xpackLicenseInfo) { return { isAvailable: false, showLinks: false, - message: `Your ${licenseType} license does not support ${pluginName}. Please upgrade your license.`, + message: i18n.translate( + 'xpack.crossClusterReplication.checkLicense.errorUnsupportedMessage', + { + defaultMessage: 'Your {licenseType} license does not support {pluginName}. Please upgrade your license.', + values: { licenseType, pluginName }, + }, + ), }; } @@ -39,7 +53,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: `You cannot use ${pluginName} because your ${licenseType} license has expired.`, + message: i18n.translate( + 'xpack.crossClusterReplication.checkLicense.errorExpiredMessage', + { + defaultMessage: 'You cannot use {pluginName} because your {licenseType} license has expired', + values: { licenseType, pluginName }, + }, + ), }; } diff --git a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap index afecebf3391e1..9ad5eb0b66715 100644 --- a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap +++ b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.js.snap @@ -248,7 +248,7 @@ exports[`ilm summary extension should return extension when index has lifecycle > Index lifecycle management @@ -269,7 +269,7 @@ exports[`ilm summary extension should return extension when index has lifecycle title={ } @@ -317,7 +317,7 @@ exports[`ilm summary extension should return extension when index has lifecycle > Index lifecycle error @@ -521,7 +521,7 @@ exports[`ilm summary extension should return extension when index has lifecycle > @@ -559,7 +559,7 @@ exports[`ilm summary extension should return extension when index has lifecycle > Show phase definition @@ -720,7 +720,7 @@ exports[`ilm summary extension should return extension when index has lifecycle > Index lifecycle management diff --git a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/add_lifecycle_confirm_modal.js b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/add_lifecycle_confirm_modal.js index 6d62023e6c2ff..baedb0f195d3f 100644 --- a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/add_lifecycle_confirm_modal.js +++ b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/add_lifecycle_confirm_modal.js @@ -211,7 +211,7 @@ export class AddLifecyclePolicyConfirmModal extends Component { const title = ( - + {title} - - + + { return { - policy: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.lifecyclePolicyHeader', { + policy: i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleMgmtSummary.headers.lifecyclePolicyHeader', { defaultMessage: 'Lifecycle policy', }), - phase: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.currentPhaseHeader', { + phase: i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleMgmtSummary.headers.currentPhaseHeader', { defaultMessage: 'Current phase', }), - action: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.currentActionHeader', { + action: i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleMgmtSummary.headers.currentActionHeader', { defaultMessage: 'Current action', }), - action_time_millis: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.currentActionTimeHeader', { + action_time_millis: i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleMgmtSummary.headers.currentActionTimeHeader', { defaultMessage: 'Current action time', }), - failed_step: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.failedStepHeader', { + failed_step: i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleMgmtSummary.headers.failedStepHeader', { defaultMessage: 'Failed step', }), }; @@ -70,7 +70,7 @@ export class IndexLifecycleSummary extends Component { ); @@ -95,7 +95,7 @@ export class IndexLifecycleSummary extends Component { ); @@ -111,7 +111,7 @@ export class IndexLifecycleSummary extends Component {
@@ -168,7 +168,7 @@ export class IndexLifecycleSummary extends Component {

@@ -180,7 +180,7 @@ export class IndexLifecycleSummary extends Component { title={ } iconType="cross" @@ -199,7 +199,7 @@ export class IndexLifecycleSummary extends Component { title={ } > @@ -223,4 +223,4 @@ export class IndexLifecycleSummary extends Component { ); } -} \ No newline at end of file +} diff --git a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/remove_lifecycle_confirm_modal.js b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/remove_lifecycle_confirm_modal.js index 42795a03a7704..67d9c37e556f2 100644 --- a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/remove_lifecycle_confirm_modal.js +++ b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/remove_lifecycle_confirm_modal.js @@ -85,7 +85,7 @@ export class RemoveLifecyclePolicyConfirmModal extends Component { title={ { requestMethod: retryLifecycleForIndex, icon: 'play', indexNames: [indexNames], - buttonLabel: i18n.translate('xpack.idxMgmt.retryIndexLifecycleActionButtonLabel', { + buttonLabel: i18n.translate('xpack.indexLifecycleMgmt.retryIndexLifecycleActionButtonLabel', { defaultMessage: 'Retry lifecycle step', }), successMessage: i18n.translate( - 'xpack.idxMgmt.retryIndexLifecycleAction.retriedLifecycleMessage', + 'xpack.indexLifecycleMgmt.retryIndexLifecycleAction.retriedLifecycleMessage', { defaultMessage: 'Called retry lifecycle step for: {indexNames}', values: { indexNames: indexNames.map(indexName => `"${indexName}"`).join(', ') }, @@ -65,7 +65,7 @@ export const removeLifecyclePolicyActionExtension = (indices, reloadIndices) => }, icon: 'stopFilled', indexNames: [indexNames], - buttonLabel: i18n.translate('xpack.idxMgmt.removeIndexLifecycleActionButtonLabel', { + buttonLabel: i18n.translate('xpack.indexLifecycleMgmt.removeIndexLifecycleActionButtonLabel', { defaultMessage: 'Remove lifecycle policy', }), }; @@ -95,7 +95,7 @@ export const addLifecyclePolicyActionExtension = (indices, reloadIndices) => { ); }, icon: 'plusInCircle', - buttonLabel: i18n.translate('xpack.idxMgmt.addLifecyclePolicyActionButtonLabel', { + buttonLabel: i18n.translate('xpack.indexLifecycleMgmt.addLifecyclePolicyActionButtonLabel', { defaultMessage: 'Add lifecycle policy', }), }; diff --git a/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js b/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js index d33649dc681d1..ade95f6915410 100644 --- a/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js +++ b/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js @@ -83,8 +83,8 @@ class HotPhaseUi extends PureComponent {

diff --git a/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/edit_policy.js b/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/edit_policy.js index 9e53183408535..ee334fd5e33ed 100644 --- a/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/edit_policy.js +++ b/x-pack/plugins/index_lifecycle_management/public/sections/edit_policy/edit_policy.js @@ -166,8 +166,8 @@ class EditPolicyUi extends Component {

{' '}

diff --git a/x-pack/plugins/index_lifecycle_management/public/sections/policy_table/components/policy_table/add_policy_to_template_confirm_modal.js b/x-pack/plugins/index_lifecycle_management/public/sections/policy_table/components/policy_table/add_policy_to_template_confirm_modal.js index 106a9887e833d..b4c2c6f29ae3e 100644 --- a/x-pack/plugins/index_lifecycle_management/public/sections/policy_table/components/policy_table/add_policy_to_template_confirm_modal.js +++ b/x-pack/plugins/index_lifecycle_management/public/sections/policy_table/components/policy_table/add_policy_to_template_confirm_modal.js @@ -37,7 +37,7 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { const policyName = policy.name; if (!templateName) { this.setState({ templateError: i18n.translate( - 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.noTemplateSelectedErrorMessage', + 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.noTemplateSelectedErrorMessage', { defaultMessage: 'You must select an index template.' }) }); return; } @@ -48,14 +48,14 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { aliasName }); const message = intl.formatMessage({ - id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.successMessage', + id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.successMessage', defaultMessage: 'Added policy {policyName} to index template {templateName}', }, { policyName, templateName }); toastNotifications.addSuccess(message); onCancel(); } catch (e) { const title = intl.formatMessage({ - id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.errorMessage', + id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.errorMessage', defaultMessage: 'Error adding policy "{policyName}" to index template {templateName}', }, { policyName, templateName }); showApiError(e, title); @@ -76,14 +76,14 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { style={{ maxWidth: 400 }} title={ } color="warning" > } @@ -153,7 +153,7 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { } @@ -170,7 +170,7 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { render() { const { intl, policy, onCancel } = this.props; const title = intl.formatMessage({ - id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.title', + id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.title', defaultMessage: 'Add policy "{name}" to index template', }, { name: policy.name }); return ( @@ -180,11 +180,11 @@ export class AddPolicyToTemplateConfirmModalUi extends Component { onCancel={onCancel} onConfirm={this.addPolicyToTemplate} cancelButtonText={intl.formatMessage({ - id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.cancelButton', + id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.cancelButton', defaultMessage: 'Cancel', })} confirmButtonText={intl.formatMessage({ - id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyConfirmModal.confirmButton', + id: 'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.confirmButton', defaultMessage: 'Add policy', })} onClose={onCancel} @@ -192,7 +192,7 @@ export class AddPolicyToTemplateConfirmModalUi extends Component {

{' '} this.togglePolicyPopover(policy)} color="primary" > @@ -411,8 +410,11 @@ export class PolicyTableUi extends Component { color="danger" onClick={() => this.setState({ showDeleteConfirmation: true })} > - Delete {numSelected} polic - {numSelected > 1 ? 'ies' : 'y'} + ) : null} @@ -428,7 +430,10 @@ export class PolicyTableUi extends Component { id: 'xpack.indexLifecycleMgmt.policyTable.systempoliciesSearchInputPlaceholder', defaultMessage: 'Search', })} - aria-label="Search policies" + aria-label={intl.formatMessage({ + id: 'xpack.indexLifecycleMgmt.policyTable.systempoliciesSearchInputAriaLabel', + defaultMessage: 'Search policies', + })} /> @@ -463,7 +468,12 @@ export class PolicyTableUi extends Component { - + diff --git a/x-pack/plugins/index_lifecycle_management/server/lib/check_license/check_license.js b/x-pack/plugins/index_lifecycle_management/server/lib/check_license/check_license.js index 4dff66dffa8d1..91f781575d25f 100644 --- a/x-pack/plugins/index_lifecycle_management/server/lib/check_license/check_license.js +++ b/x-pack/plugins/index_lifecycle_management/server/lib/check_license/check_license.js @@ -14,10 +14,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.lifecyclePolicyHeader', { - defaultMessage: `You cannot use {pluginName} because license information is not available at this time.`, - values: { pluginName } - }) + message: i18n.translate( + 'xpack.indexLifecycleMgmt.checkLicense.errorUnavailableMessage', + { + defaultMessage: 'You cannot use {pluginName} because license information is not available at this time.', + values: { pluginName }, + }, + ), }; } @@ -38,10 +41,13 @@ export function checkLicense(xpackLicenseInfo) { return { isAvailable: false, showLinks: false, - message: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.lifecyclePolicyHeader', { - defaultMessage: `Your {licenseType} license does not support ${pluginName}. Please upgrade your license.`, - values: { licenseType } - }) + message: i18n.translate( + 'xpack.indexLifecycleMgmt.checkLicense.errorUnsupportedMessage', + { + defaultMessage: 'Your {licenseType} license does not support {pluginName}. Please upgrade your license.', + values: { licenseType, pluginName }, + }, + ), }; } @@ -51,10 +57,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: i18n.translate('xpack.idxMgmt.indexLifecycleMgmtSummary.headers.lifecyclePolicyHeader', { - defaultMessage: `You cannot use {pluginName} because your {licenseType} license has expired.`, - values: { pluginName, licenseType } - }) + message: i18n.translate( + 'xpack.indexLifecycleMgmt.checkLicense.errorExpiredMessage', + { + defaultMessage: 'You cannot use {pluginName} because your {licenseType} license has expired.', + values: { pluginName, licenseType }, + }, + ), }; } diff --git a/x-pack/plugins/remote_clusters/server/lib/check_license/check_license.js b/x-pack/plugins/remote_clusters/server/lib/check_license/check_license.js index 2b872a061c53f..c589cbd0c8965 100644 --- a/x-pack/plugins/remote_clusters/server/lib/check_license/check_license.js +++ b/x-pack/plugins/remote_clusters/server/lib/check_license/check_license.js @@ -66,7 +66,6 @@ export function checkLicense(xpackLicenseInfo) { values: { licenseType, pluginName }, }, ), - message: `.`, }; } diff --git a/x-pack/plugins/rollup/public/crud_app/index.js b/x-pack/plugins/rollup/public/crud_app/index.js index da0aa43643b87..44edfbbdf885a 100644 --- a/x-pack/plugins/rollup/public/crud_app/index.js +++ b/x-pack/plugins/rollup/public/crud_app/index.js @@ -9,6 +9,7 @@ import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/r import { render, unmountComponentAtNode } from 'react-dom'; import { Provider } from 'react-redux'; import { HashRouter } from 'react-router-dom'; +import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n/react'; import { management } from 'ui/management'; import routes from 'ui/routes'; @@ -86,7 +87,9 @@ FeatureCatalogueRegistryProvider.register(() => { return { id: 'rollup_jobs', title: 'Rollups', - description: 'Summarize and store historical data in a smaller index for future analysis.', + description: i18n.translate('xpack.rollupJobs.featureCatalogueDescription', { + defaultMessage: 'Summarize and store historical data in a smaller index for future analysis.', + }), icon: 'indexRollupApp', path: `#${CRUD_APP_BASE_PATH}/job_list`, showOnHomePage: true, diff --git a/x-pack/plugins/rollup/server/lib/check_license/check_license.js b/x-pack/plugins/rollup/server/lib/check_license/check_license.js index ef2bed3449195..eb28ba9f930a1 100644 --- a/x-pack/plugins/rollup/server/lib/check_license/check_license.js +++ b/x-pack/plugins/rollup/server/lib/check_license/check_license.js @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { i18n } from '@kbn/i18n'; + export function checkLicense(xpackLicenseInfo) { const pluginName = 'Rollups'; @@ -14,7 +16,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: `You cannot use ${pluginName} because license information is not available at this time.` + message: i18n.translate( + 'xpack.rollupJobs.checkLicense.errorUnavailableMessage', + { + defaultMessage: 'You cannot use {pluginName} because license information is not available at this time.', + values: { pluginName }, + }, + ), }; } @@ -35,7 +43,13 @@ export function checkLicense(xpackLicenseInfo) { return { isAvailable: false, showLinks: false, - message: `Your ${licenseType} license does not support ${pluginName}. Please upgrade your license.` + message: i18n.translate( + 'xpack.rollupJobs.checkLicense.errorUnsupportedMessage', + { + defaultMessage: 'Your {licenseType} license does not support {pluginName}. Please upgrade your license.', + values: { licenseType, pluginName }, + }, + ), }; } @@ -45,7 +59,13 @@ export function checkLicense(xpackLicenseInfo) { isAvailable: false, showLinks: true, enableLinks: false, - message: `You cannot use ${pluginName} because your ${licenseType} license has expired.` + message: i18n.translate( + 'xpack.rollupJobs.checkLicense.errorExpiredMessage', + { + defaultMessage: 'You cannot use {pluginName} because your {licenseType} license has expired', + values: { licenseType, pluginName }, + }, + ), }; }