Skip to content

Commit

Permalink
Translate global navigation bar component (#23993)
Browse files Browse the repository at this point in the history
Translate global navigation bar component
  • Loading branch information
tibmt authored and pavel06081991 committed Oct 26, 2018
1 parent a392385 commit 039ced3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ui/public/chrome/directives/global_nav/global_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.navToggleButtonCollapseTitle', { defaultMessage: 'Collapse' })
: i18n('common.ui.chrome.globalNav.navToggleButtonExpandTitle', { defaultMessage: 'Expand' }),
tooltipContent: isOpen ?
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.
Expand Down

0 comments on commit 039ced3

Please sign in to comment.