From 8c7f9043259b2a0fa209ce1be1d5799ad9bd78dd Mon Sep 17 00:00:00 2001 From: "MINSK\\Pavel_Yukhnevich1" Date: Mon, 15 Oct 2018 11:41:02 +0300 Subject: [PATCH 1/2] Translate global navigation bar component --- .../public/chrome/directives/global_nav/global_nav.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/public/chrome/directives/global_nav/global_nav.js b/src/ui/public/chrome/directives/global_nav/global_nav.js index 7abf81971b7b0..10d2a8695509d 100644 --- a/src/ui/public/chrome/directives/global_nav/global_nav.js +++ b/src/ui/public/chrome/directives/global_nav/global_nav.js @@ -27,7 +27,7 @@ import { uiModules } from '../../../modules'; const module = uiModules.get('kibana'); -module.directive('globalNav', (globalNavState, chrome) => { +module.directive('globalNav', (globalNavState, chrome, i18n) => { return { restrict: 'E', replace: true, @@ -46,8 +46,12 @@ module.directive('globalNav', (globalNavState, chrome) => { scope.isGlobalNavOpen = isOpen; scope.globalNavToggleButton = { classes: isOpen ? 'global-nav-link--close' : undefined, - title: isOpen ? 'Collapse' : 'Expand', - tooltipContent: isOpen ? 'Collapse side bar' : 'Expand side bar', + title: isOpen ? + i18n('common.ui.chrome.globalNav.collapseTitle', { defaultMessage: 'Collapse' }) + : i18n('common.ui.chrome.globalNav.expandTitle', { defaultMessage: 'Expand' }), + tooltipContent: isOpen ? + i18n('common.ui.chrome.globalNav.collapseSideBarTooltip', { defaultMessage: 'Collapse side bar' }) + : i18n('common.ui.chrome.globalNav.expandSideBarTooltip', { defaultMessage: 'Expand side bar' }), }; // Notify visualizations, e.g. the dashboard, that they should re-render. From 8bd6dc144095fd0c3df1289fd1b68122b3cd7425 Mon Sep 17 00:00:00 2001 From: tibmt Date: Thu, 18 Oct 2018 13:13:17 +0300 Subject: [PATCH 2/2] Update global_nav.js --- src/ui/public/chrome/directives/global_nav/global_nav.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/public/chrome/directives/global_nav/global_nav.js b/src/ui/public/chrome/directives/global_nav/global_nav.js index 10d2a8695509d..409d20a5951cf 100644 --- a/src/ui/public/chrome/directives/global_nav/global_nav.js +++ b/src/ui/public/chrome/directives/global_nav/global_nav.js @@ -47,11 +47,11 @@ module.directive('globalNav', (globalNavState, chrome, i18n) => { scope.globalNavToggleButton = { classes: isOpen ? 'global-nav-link--close' : undefined, title: isOpen ? - i18n('common.ui.chrome.globalNav.collapseTitle', { defaultMessage: 'Collapse' }) - : i18n('common.ui.chrome.globalNav.expandTitle', { defaultMessage: 'Expand' }), + i18n('common.ui.chrome.globalNav.navToggleButtonCollapseTitle', { defaultMessage: 'Collapse' }) + : i18n('common.ui.chrome.globalNav.navToggleButtonExpandTitle', { defaultMessage: 'Expand' }), tooltipContent: isOpen ? - i18n('common.ui.chrome.globalNav.collapseSideBarTooltip', { defaultMessage: 'Collapse side bar' }) - : i18n('common.ui.chrome.globalNav.expandSideBarTooltip', { defaultMessage: 'Expand side bar' }), + i18n('common.ui.chrome.globalNav.navToggleButtonCollapseTooltip', { defaultMessage: 'Collapse side bar' }) + : i18n('common.ui.chrome.globalNav.navToggleButtonExpandTooltip', { defaultMessage: 'Expand side bar' }), }; // Notify visualizations, e.g. the dashboard, that they should re-render.