Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate global navigation bar component #23993

Merged
merged 4 commits into from
Oct 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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