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

[i18n] Translate untranslated labels #26416

Merged
Merged
Show file tree
Hide file tree
Changes from 45 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 @@ -28,6 +28,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 @@ -191,17 +191,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 @@ -237,8 +239,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 @@ -252,8 +255,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 @@ -276,8 +280,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 @@ -114,35 +114,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 @@ -185,26 +189,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
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
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
8 changes: 6 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 @@ -89,9 +90,12 @@ export function KbnTopNavControllerProvider($compile) {
// apply the defaults to individual options
_applyOptDefault(opt = {}) {
const defaultedOpt = {
label: capitalize(opt.key),
label: opt.label ? opt.label : capitalize(opt.key),
hasFunction: !!opt.run,
description: opt.run ? opt.key : `Toggle ${opt.key} view`,
description: opt.run ? opt.key : i18n.translate('common.ui.topNav.toggleViewAriaLabel', {
defaultMessage: 'Toggle {optKey} view',
values: { optKey: opt.key }
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
}),
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 @@ -759,6 +759,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
$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 @@ -770,6 +773,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
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 @@ -782,6 +788,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
}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 @@ -793,6 +802,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
}
$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 @@ -807,6 +819,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
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 @@ -845,6 +860,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
$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 @@ -856,6 +874,9 @@ app.controller('graphuiPlugin', function ($scope, $route, $interval, $http, kbnU
$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
8 changes: 7 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,14 @@
* 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.`;
export const SPACES_FEATURE_DESCRIPTION = i18n.translate(
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
'xpack.spaces.featureRegistryDescription',
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
{
defaultMessage: 'Organize your dashboards and other saved objects into meaningful categories.',
}
);

export const MANAGE_SPACES_URL = chrome.addBasePath(`/app/kibana#/management/spaces/list`);
5 changes: 4 additions & 1 deletion x-pack/plugins/spaces/public/register_feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';
import {
FeatureCatalogueCategory,
FeatureCatalogueRegistryProvider,
Expand All @@ -14,7 +15,9 @@ import { SPACES_FEATURE_DESCRIPTION } from './lib/constants';
FeatureCatalogueRegistryProvider.register(() => {
return {
id: 'spaces',
title: 'Spaces',
title: i18n.translate('xpack.spaces.spacesTitle', {
defaultMessage: 'Spaces',
}),
description: SPACES_FEATURE_DESCRIPTION,
icon: 'spacesApp',
path: '/app/kibana#/management/spaces/list',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,14 @@ class ManageSpacePageUI extends Component<Props, State> {
<Fragment>
<EuiFlexGroup responsive={false}>
<EuiFlexItem grow={false}>
<EuiFormRow label="Avatar">
<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.manageSpacePage.avatarLabel"
defaultMessage="Avatar"
/>
}
>
<SpaceAvatar space={this.state.space} size="l" />
</EuiFormRow>
</EuiFlexItem>
Expand Down
Loading