Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c7ec189
Merge pull request #1 from elastic/master
Nox911 Sep 24, 2018
fa01b88
Merge pull request #2 from elastic/master
Nox911 Sep 27, 2018
70f6c7e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Sep 27, 2018
68587a0
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Sep 28, 2018
42aa7d3
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 2, 2018
efeaefe
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 2, 2018
8a054ed
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 8, 2018
b0d1660
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 16, 2018
62b6ad1
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 17, 2018
acbad4b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 18, 2018
a850650
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 22, 2018
0a200ce
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 25, 2018
b2a8244
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 29, 2018
b4b979e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 30, 2018
d349a4f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 31, 2018
ae285b9
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 2, 2018
3051641
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 5, 2018
6231971
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 8, 2018
f86a3d4
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 9, 2018
cf813c7
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 13, 2018
1aba03f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 14, 2018
491009b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 15, 2018
e243126
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 22, 2018
e74bd61
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 22, 2018
8bc5ffa
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 23, 2018
5787937
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 23, 2018
f17fa1e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 24, 2018
c63b0a6
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
ed62b5b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
df4fab4
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
46d284a
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 27, 2018
d1fd49e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 29, 2018
f367ee5
Translate some missing translations
Nox911 Nov 29, 2018
ec1ad76
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 29, 2018
0c042e1
Merge branch 'master' into feature/translate-missing-translations
Nox911 Nov 29, 2018
6ebd934
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 30, 2018
14c95fa
Merge branch 'master' into feature/translate-missing-translations
Nox911 Nov 30, 2018
c15fb68
Fix issues
Nox911 Nov 30, 2018
332d867
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
554fadc
Add topNavMenu translations
Nox911 Dec 3, 2018
4a99411
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
99df3bb
Merge branch 'master' into feature/translate-missing-translations
Nox911 Dec 3, 2018
4cdec42
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
88c8fb6
Merge branch 'master' into feature/translate-missing-translations
Nox911 Dec 4, 2018
5d44df7
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
c6e63aa
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
8182d1f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
aefb90f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 5, 2018
8413fb4
Fix issues
Nox911 Dec 6, 2018
63f58ba
Fix topNav
Nox911 Dec 6, 2018
6bb1d6c
Fix issues
Nox911 Dec 6, 2018
e4e7120
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 6, 2018
faea1fb
Fix issues
Nox911 Dec 7, 2018
a1d67be
Fix kbnTopNav test and parametrs description
Dec 7, 2018
a9a6043
Merge branch 'master' of https://github.com/elastic/kibana
Dec 7, 2018
710b228
Merge branch 'master' into feature/translate-missing-translations
Dec 7, 2018
9d247e6
Merge branch 'master' of https://github.com/elastic/kibana
Dec 10, 2018
bd707af
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 11, 2018
974b0f8
Merge branch 'master' into feature/translate-missing-translations
Nox911 Dec 11, 2018
71fb60d
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 12, 2018
940e7f4
Merge branch 'master' into feature/translate-missing-translations
Nox911 Dec 12, 2018
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
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"xpack.rollupJobs": "x-pack/plugins/rollup",
"xpack.searchProfiler": "x-pack/plugins/searchprofiler",
"xpack.security": "x-pack/plugins/security",
"xpack.spaces": "x-pack/plugins/spaces",
"xpack.watcher": "x-pack/plugins/watcher"
},
"exclude": [
Expand Down
5 changes: 4 additions & 1 deletion src/legacy/core_plugins/console/public/hacks/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
*/

import { DevToolsRegistryProvider } from 'ui/registry/dev_tools';
import { i18n } from '@kbn/i18n';

DevToolsRegistryProvider.register(() => ({
order: 1,
name: 'console',
display: 'Console',
display: i18n.translate('console.consoleDisplayName', {
defaultMessage: 'Console'
}),
url: '#/dev_tools/console'
}));
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ export function SenseTopNavController(Private, i18n) {
const controller = new KbnTopNavController([
{
key: 'welcome',
label: i18n('console.topNav.welcomeTabLabel', {
defaultMessage: 'Welcome'
}),
hideButton: true,
template: `<sense-welcome></sense-welcome>`,
testId: 'consoleWelcomeButton',
},
{
key: 'history',
label: i18n('console.topNav.historyTabLabel', {
defaultMessage: 'History'
}),
description: i18n('console.topNav.historyTabDescription', {
defaultMessage: 'History',
}),
Expand All @@ -40,6 +46,9 @@ export function SenseTopNavController(Private, i18n) {
},
{
key: 'settings',
label: i18n('console.topNav.settingsTabLabel', {
defaultMessage: 'Settings'
}),
description: i18n('console.topNav.settingsTabDescription', {
defaultMessage: 'Settings',
}),
Expand All @@ -48,6 +57,9 @@ export function SenseTopNavController(Private, i18n) {
},
{
key: 'help',
label: i18n('console.topNav.helpTabLabel', {
defaultMessage: 'Help'
}),
description: i18n('console.topNav.helpTabDescription', {
defaultMessage: 'Help',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,19 @@ function discoverController(
};

$scope.topNavMenu = [{
key: i18n('kbn.discover.localMenu.localMenu.newSearchTitle', {
defaultMessage: 'new',
key: 'new',
label: i18n('kbn.discover.localMenu.localMenu.newSearchTitle', {
defaultMessage: 'New',
}),
description: i18n('kbn.discover.localMenu.newSearchDescription', {
defaultMessage: 'New Search',
}),
run: function () { kbnUrl.change('/discover'); },
testId: 'discoverNewButton',
}, {
key: i18n('kbn.discover.localMenu.saveTitle', {
defaultMessage: 'save',
key: 'save',
label: i18n('kbn.discover.localMenu.saveTitle', {
defaultMessage: 'Save',
}),
description: i18n('kbn.discover.localMenu.saveSearchDescription', {
defaultMessage: 'Save Search',
Expand Down Expand Up @@ -248,8 +250,9 @@ function discoverController(
showSaveModal(saveModal);
}
}, {
key: i18n('kbn.discover.localMenu.openTitle', {
defaultMessage: 'open',
key: 'open',
label: i18n('kbn.discover.localMenu.openTitle', {
defaultMessage: 'Open',
}),
description: i18n('kbn.discover.localMenu.openSavedSearchDescription', {
defaultMessage: 'Open Saved Search',
Expand All @@ -263,8 +266,9 @@ function discoverController(
});
}
}, {
key: i18n('kbn.discover.localMenu.shareTitle', {
defaultMessage: 'share',
key: 'share',
label: i18n('kbn.discover.localMenu.shareTitle', {
defaultMessage: 'Share',
}),
description: i18n('kbn.discover.localMenu.shareSearchDescription', {
defaultMessage: 'Share Search',
Expand All @@ -287,8 +291,9 @@ function discoverController(
});
}
}, {
key: i18n('kbn.discover.localMenu.inspectTitle', {
defaultMessage: 'inspect',
key: 'inspect',
label: i18n('kbn.discover.localMenu.inspectTitle', {
defaultMessage: 'Inspect',
}),
description: i18n('kbn.discover.localMenu.openInspectorForSearchDescription', {
defaultMessage: 'Open Inspector for search',
Expand Down
35 changes: 21 additions & 14 deletions src/legacy/core_plugins/timelion/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,35 +123,39 @@ app.controller('timelion', function (
const savedSheet = $route.current.locals.savedSheet;

$scope.topNavMenu = [{
key: i18n('timelion.topNavMenu.newSheetButtonLabel', {
defaultMessage: 'new',
key: 'new',
label: i18n('timelion.topNavMenu.newSheetButtonLabel', {
defaultMessage: 'New',
}),
description: i18n('timelion.topNavMenu.newSheetButtonAriaLabel', {
defaultMessage: 'New Sheet',
}),
run: function () { kbnUrl.change('/'); },
testId: 'timelionNewButton',
}, {
key: i18n('timelion.topNavMenu.addChartButtonLabel', {
defaultMessage: 'add',
key: 'add',
label: i18n('timelion.topNavMenu.addChartButtonLabel', {
defaultMessage: 'Add',
}),
description: i18n('timelion.topNavMenu.addChartButtonAriaLabel', {
defaultMessage: 'Add a chart',
}),
run: function () { $scope.newCell(); },
testId: 'timelionAddChartButton',
}, {
key: i18n('timelion.topNavMenu.saveSheetButtonLabel', {
defaultMessage: 'save',
key: 'save',
label: i18n('timelion.topNavMenu.saveSheetButtonLabel', {
defaultMessage: 'Save',
}),
description: i18n('timelion.topNavMenu.saveSheetButtonAriaLabel', {
defaultMessage: 'Save Sheet',
}),
template: require('plugins/timelion/partials/save_sheet.html'),
testId: 'timelionSaveButton',
}, {
key: i18n('timelion.topNavMenu.deleteSheetButtonLabel', {
defaultMessage: 'delete',
key: 'delete',
label: i18n('timelion.topNavMenu.deleteSheetButtonLabel', {
defaultMessage: 'Delete',
}),
description: i18n('timelion.topNavMenu.deleteSheetButtonAriaLabel', {
defaultMessage: 'Delete current sheet',
Expand Down Expand Up @@ -194,26 +198,29 @@ app.controller('timelion', function (
},
testId: 'timelionDeleteButton',
}, {
key: i18n('timelion.topNavMenu.openSheetButtonLabel', {
defaultMessage: 'open',
key: 'open',
label: i18n('timelion.topNavMenu.openSheetButtonLabel', {
defaultMessage: 'Open',
}),
description: i18n('timelion.topNavMenu.openSheetButtonAriaLabel', {
defaultMessage: 'Open Sheet',
}),
template: require('plugins/timelion/partials/load_sheet.html'),
testId: 'timelionOpenButton',
}, {
key: i18n('timelion.topNavMenu.optionsButtonLabel', {
defaultMessage: 'options',
key: 'options',
label: i18n('timelion.topNavMenu.optionsButtonLabel', {
defaultMessage: 'Options',
}),
description: i18n('timelion.topNavMenu.optionsButtonAriaLabel', {
defaultMessage: 'Options',
}),
template: require('plugins/timelion/partials/sheet_options.html'),
testId: 'timelionOptionsButton',
}, {
key: i18n('timelion.topNavMenu.helpButtonLabel', {
defaultMessage: 'help',
key: 'help',
label: i18n('timelion.topNavMenu.helpButtonLabel', {
defaultMessage: 'Help',
}),
description: i18n('timelion.topNavMenu.helpButtonAriaLabel', {
defaultMessage: 'Help',
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/kbn_top_nav/__tests__/kbn_top_nav_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ describe('KbnTopNavController', function () {
});

describe('description:', function () {
it('defaults to "Toggle ${key} view" when using templates', function () {
it('defaults to "Toggle ${label} view" when using templates', function () {
const controller = new KbnTopNavController([
{ key: 'foo', template: '<h1></h1>' },
{ key: 'Bar', description: 'not the default' },
{ key: '1234', run: ()=>{} },
]);

expect(pluck(controller.opts, 'description')).to.eql([
'Toggle foo view',
'Toggle Foo view',
'not the default',
'1234',
]);
Expand Down
6 changes: 5 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
class="kuiLocalDropdown"
ng-show="kbnTopNav.rendered"
>
<button class="kuiLocalDropdownCloseButton" ng-click="kbnTopNav.close()" aria-label="Close">
<button
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshdover could you please review src/ui/public/kbn_top_nav?

class="kuiLocalDropdownCloseButton"
ng-click="kbnTopNav.close()"
aria-label="{{ ::'common.ui.topNav.closeAriaLabel' | i18n: { defaultMessage: 'Close' } }}"
>
<span class="kuiIcon fa-chevron-circle-up"></span>
</button>
<div id="template_wrapper">
Expand Down
5 changes: 3 additions & 2 deletions src/ui/public/kbn_top_nav/kbn_top_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
* A configuration object for a top nav component.
* @typedef {Object} KbnTopNavConfig
* @type Object
* @property {string} key - A display string which will be shown in the top nav for this option.
* @property {string} key - identifier of menu item.
* @property {string} label - A display string which will be shown in the top nav for this option.
* @property {string} [description] - optional, used for the screen-reader description of this
* menu. Defaults to "Toggle ${key} view" for templated menu items and just "${key}" for
* menu. Defaults to "Toggle ${label} view" for templated menu items and just "${label}" for
* programmatic menu items
* @property {string} testId - for testing purposes, can be used to retrieve this item.
* @property {Object} [template] - an html template that will be shown when this item is clicked.
Expand Down
9 changes: 7 additions & 2 deletions src/ui/public/kbn_top_nav/kbn_top_nav_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { capitalize, isArray, isFunction, get } from 'lodash';
import chrome from '../chrome';
import filterTemplate from '../chrome/config/filter.html';
import intervalTemplate from '../chrome/config/interval.html';
import { i18n } from '@kbn/i18n';

export function KbnTopNavControllerProvider($compile) {
return class KbnTopNavController {
Expand Down Expand Up @@ -88,10 +89,14 @@ export function KbnTopNavControllerProvider($compile) {
};
// apply the defaults to individual options
_applyOptDefault(opt = {}) {
const optLabel = opt.label ? opt.label : capitalize(opt.key);
const defaultedOpt = {
label: capitalize(opt.key),
label: optLabel,
hasFunction: !!opt.run,
description: opt.run ? opt.key : `Toggle ${opt.key} view`,
description: opt.run ? optLabel : i18n.translate('common.ui.topNav.toggleViewAriaLabel', {
defaultMessage: 'Toggle {optLabel} view',
values: { optLabel }
}),
run: (item) => this.toggle(item.key),
...opt
};
Expand Down
9 changes: 7 additions & 2 deletions src/ui/public/management/sections_register.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@
*/

import { ManagementSection } from './section';
import { i18n } from '@kbn/i18n';

export const management = new ManagementSection('management', {
display: 'Management'
display: i18n.translate('common.ui.management.displayName', {
defaultMessage: 'Management'
})
});

management.register('data', {
display: 'Connect Data',
display: i18n.translate('common.ui.management.connectDataDisplayName', {
defaultMessage: 'Connect Data'
}),
order: 0
});

Expand Down
21 changes: 21 additions & 0 deletions x-pack/plugins/graph/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
$scope.topNavMenu = [];
$scope.topNavMenu.push({
key: 'new',
label: i18n('xpack.graph.topNavMenu.newWorkspaceLabel', {
defaultMessage: 'New',
}),
description: i18n('xpack.graph.topNavMenu.newWorkspaceAriaLabel', {
defaultMessage: 'New Workspace',
}),
Expand All @@ -775,6 +778,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
if (!$scope.allSavingDisabled) {
$scope.topNavMenu.push({
key: 'save',
label: i18n('xpack.graph.topNavMenu.saveWorkspace.enabledLabel', {
defaultMessage: 'Save',
}),
description: i18n('xpack.graph.topNavMenu.saveWorkspace.enabledAriaLabel', {
defaultMessage: 'Save Workspace',
}),
Expand All @@ -787,6 +793,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
}else {
$scope.topNavMenu.push({
key: 'save',
label: i18n('xpack.graph.topNavMenu.saveWorkspace.disabledLabel', {
defaultMessage: 'Save',
}),
description: i18n('xpack.graph.topNavMenu.saveWorkspace.disabledAriaLabel', {
defaultMessage: 'Save Workspace',
}),
Expand All @@ -798,6 +807,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
}
$scope.topNavMenu.push({
key: 'open',
label: i18n('xpack.graph.topNavMenu.loadWorkspaceLabel', {
defaultMessage: 'Open',
}),
description: i18n('xpack.graph.topNavMenu.loadWorkspaceAriaLabel', {
defaultMessage: 'Load Saved Workspace',
}),
Expand All @@ -812,6 +824,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
disableButton: function () {
return $route.current.locals === undefined || $route.current.locals.savedWorkspace === undefined;
},
label: i18n('xpack.graph.topNavMenu.deleteWorkspace.enabledLabel', {
defaultMessage: 'Delete',
}),
description: i18n('xpack.graph.topNavMenu.deleteWorkspace.enabledAriaLabel', {
defaultMessage: 'Delete Saved Workspace',
}),
Expand Down Expand Up @@ -850,6 +865,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
$scope.topNavMenu.push({
key: 'delete',
disableButton: true,
label: i18n('xpack.graph.topNavMenu.deleteWorkspace.disabledLabel', {
defaultMessage: 'Delete',
}),
description: i18n('xpack.graph.topNavMenu.deleteWorkspace.disabledAriaLabel', {
defaultMessage: 'Delete Saved Workspace',
}),
Expand All @@ -861,6 +879,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $http, kbnUrl, Private
$scope.topNavMenu.push({
key: 'settings',
disableButton: function () { return $scope.selectedIndex === null; },
label: i18n('xpack.graph.topNavMenu.settingsLabel', {
defaultMessage: 'Settings',
}),
description: i18n('xpack.graph.topNavMenu.settingsAriaLabel', {
defaultMessage: 'Settings',
}),
Expand Down
14 changes: 13 additions & 1 deletion x-pack/plugins/spaces/public/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';
import chrome from 'ui/chrome';

export const SPACES_FEATURE_DESCRIPTION = `Organize your dashboards and other saved objects into meaningful categories.`;
let spacesFeatureDescription: string;

export const getSpacesFeatureDescription = () => {
if (!spacesFeatureDescription) {
spacesFeatureDescription = i18n.translate('xpack.spaces.featureDescription', {
defaultMessage:
'Organize your dashboards and other saved objects into meaningful categories.',
});
}

return spacesFeatureDescription;
};

export const MANAGE_SPACES_URL = chrome.addBasePath(`/app/kibana#/management/spaces/list`);
Loading