From 77e5d7ad2d85fd1debc6b8af9ee55bafb50a274e Mon Sep 17 00:00:00 2001 From: Or Ouziel Date: Mon, 3 Jan 2022 12:23:39 +0200 Subject: [PATCH] use translations in page template (#77) --- .../cloud_security_posture/common/translations.ts | 12 ++++++++++++ .../public/components/page_template.tsx | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/cloud_security_posture/common/translations.ts diff --git a/x-pack/plugins/cloud_security_posture/common/translations.ts b/x-pack/plugins/cloud_security_posture/common/translations.ts new file mode 100644 index 0000000000000..2aeb21ca33c5f --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/common/translations.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const CLOUD_SECURITY_POSTURE = i18n.translate('xpack.csp.cloudSecurityPosture', { + defaultMessage: 'Cloud Security Posture', +}); diff --git a/x-pack/plugins/cloud_security_posture/public/components/page_template.tsx b/x-pack/plugins/cloud_security_posture/public/components/page_template.tsx index 911fe8c41e929..f303059f39411 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/page_template.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/page_template.tsx @@ -12,6 +12,7 @@ import { KibanaPageTemplateProps, } from '../../../../../src/plugins/kibana_react/public'; import { navigationLinks } from '../application/navigation'; +import { CLOUD_SECURITY_POSTURE } from '../../common/translations'; const activeItemStyle = { fontWeight: 700 }; @@ -29,7 +30,7 @@ const navItems: NonNullable['items'] = n const defaultProps: KibanaPageTemplateProps = { solutionNav: { - name: 'Cloud Security Posture', + name: CLOUD_SECURITY_POSTURE, items: navItems, }, restrictWidth: false,