From a0a0b29284d6047ab9f8e60b51d45bef94a04c50 Mon Sep 17 00:00:00 2001 From: pavel06081991 Date: Thu, 1 Nov 2018 11:31:57 +0300 Subject: [PATCH] Translations for Dev Tools (#23951) (#24909) translate dev-tools-console --- .i18nrc.json | 7 +- src/core_plugins/console/public/index.html | 19 +++-- .../console/public/src/autocomplete.js | 3 +- .../controllers/sense_top_nav_controller.js | 14 +++- .../console/public/src/directives/help.html | 83 +++++++++++++++---- .../public/src/directives/history.html | 20 +++-- .../src/directives/sense_history_viewer.js | 6 +- .../public/src/directives/sense_welcome.js | 7 +- .../public/src/directives/settings.html | 62 ++++++++------ .../public/src/directives/welcome.html | 69 +++++++++++---- .../grokdebugger/public/register_feature.js | 16 +++- .../custom_patterns_input.js | 15 +++- .../components/event_input/event_input.js | 8 +- .../components/event_output/event_output.js | 8 +- .../components/grok_debugger/grok_debugger.js | 6 +- .../components/pattern_input/pattern_input.js | 8 +- .../directives/grokdebugger/grokdebugger.js | 3 +- .../public/sections/grokdebugger/register.js | 6 +- .../server/lib/check_license/check_license.js | 17 +++- .../grokdebugger_response.js | 10 ++- x-pack/plugins/searchprofiler/public/app.js | 14 +++- .../directives/highlight_details/index.html | 33 ++++++-- .../public/directives/profile_tree/index.html | 38 +++++++-- .../plugins/searchprofiler/public/register.js | 6 +- .../searchprofiler/public/register_feature.js | 10 ++- .../public/templates/index.html | 53 +++++++----- .../server/lib/check_license.js | 16 +++- 27 files changed, 422 insertions(+), 135 deletions(-) diff --git a/.i18nrc.json b/.i18nrc.json index fc748eaab5e6d..e96ac66bf67ac 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -1,6 +1,7 @@ { "paths": { "common.ui": "src/ui", + "console": "src/core_plugins/console", "inputControl":"src/core_plugins/input_control_vis", "kbn": "src/core_plugins/kibana", "kbnVislibVisTypes": "src/core_plugins/kbn_vislib_vis_types", @@ -12,10 +13,12 @@ "statusPage": "src/core_plugins/status_page", "tileMap": "src/core_plugins/tile_map", "tagCloud": "src/core_plugins/tagcloud", + "xpack.grokDebugger": "x-pack/plugins/grokdebugger", "xpack.idxMgmt": "x-pack/plugins/index_management", - "xpack.watcher": "x-pack/plugins/watcher", "xpack.rollupJobs": "x-pack/plugins/rollup", - "xpack.security": "x-pack/plugins/security" + "xpack.searchProfiler": "x-pack/plugins/searchprofiler", + "xpack.security": "x-pack/plugins/security", + "xpack.watcher": "x-pack/plugins/watcher" }, "exclude": [ "src/ui/ui_render/bootstrap/app_bootstrap.js", diff --git a/src/core_plugins/console/public/index.html b/src/core_plugins/console/public/index.html index a39750a38cd2c..30ebcf70b33be 100644 --- a/src/core_plugins/console/public/index.html +++ b/src/core_plugins/console/public/index.html @@ -3,7 +3,7 @@
- + @@ -28,13 +28,22 @@ aria-labelledby="consoleRequestOptions" >
  • - +
  • - +
  • - +
  • diff --git a/src/core_plugins/console/public/src/autocomplete.js b/src/core_plugins/console/public/src/autocomplete.js index 3daf2a326b44b..8275813ea2b98 100644 --- a/src/core_plugins/console/public/src/autocomplete.js +++ b/src/core_plugins/console/public/src/autocomplete.js @@ -29,6 +29,7 @@ import { URL_PATH_END_MARKER } from './autocomplete/components'; import _ from 'lodash'; import ace from 'brace'; import 'brace/ext/language_tools'; +import { i18n } from '@kbn/i18n'; const AceRange = ace.acequire('ace/range').Range; @@ -738,7 +739,7 @@ export default function (editor) { context.autoCompleteSet = ['GET', 'PUT', 'POST', 'DELETE', 'HEAD'].map((m, i) => ({ name: m, score: -i, - meta: 'method' + meta: i18n.translate('console.autocomplete.addMethodMetaText', { defaultMessage: 'method' }), })); } diff --git a/src/core_plugins/console/public/src/controllers/sense_top_nav_controller.js b/src/core_plugins/console/public/src/controllers/sense_top_nav_controller.js index 967a0d9817171..390d223501b28 100644 --- a/src/core_plugins/console/public/src/controllers/sense_top_nav_controller.js +++ b/src/core_plugins/console/public/src/controllers/sense_top_nav_controller.js @@ -20,7 +20,7 @@ import { KbnTopNavControllerProvider } from 'ui/kbn_top_nav/kbn_top_nav_controller'; import storage from '../storage'; -export function SenseTopNavController(Private) { +export function SenseTopNavController(Private, i18n) { const KbnTopNavController = Private(KbnTopNavControllerProvider); const controller = new KbnTopNavController([ @@ -32,19 +32,25 @@ export function SenseTopNavController(Private) { }, { key: 'history', - description: 'History', + description: i18n('console.topNav.historyTabDescription', { + defaultMessage: 'History', + }), template: ``, testId: 'consoleHistoryButton', }, { key: 'settings', - description: 'Settings', + description: i18n('console.topNav.settingsTabDescription', { + defaultMessage: 'Settings', + }), template: ``, testId: 'consoleSettingsButton', }, { key: 'help', - description: 'Help', + description: i18n('console.topNav.helpTabDescription', { + defaultMessage: 'Help', + }), template: ``, testId: 'consoleHelpButton', }, diff --git a/src/core_plugins/console/public/src/directives/help.html b/src/core_plugins/console/public/src/directives/help.html index 5c39a4e88f8f3..11cb5c254b9ac 100644 --- a/src/core_plugins/console/public/src/directives/help.html +++ b/src/core_plugins/console/public/src/directives/help.html @@ -1,39 +1,94 @@ -

    Help

    +

    -

    Request format

    +

    - You can type one or more requests in the white editor. Console understands requests in a compact format: +
    -

    Keyboard commands

    +

    Ctrl/Cmd + I
    -
    Auto indent current request
    +
    Ctrl/Cmd + /
    -
    Open documentation for current request
    +
    Ctrl + Space
    -
    Open Auto complete (even if not typing)
    +
    Ctrl/Cmd + Enter
    -
    Submit request
    +
    Ctrl/Cmd + Up/Down
    -
    Jump to the previous/next request start or end.
    +
    Ctrl/Cmd + Alt + L
    -
    Collapse/expand current scope.
    +
    Ctrl/Cmd + Option + 0
    -
    Collapse all scopes but the current one. Expand by adding a shift.
    +
    Down arrow
    -
    Switch focus to auto-complete menu. Use arrows to further select a term
    +
    Enter/Tab
    -
    Select the currently selected or the top most term in auto-complete menu
    +
    Esc
    -
    Close auto-complete menu
    +
    diff --git a/src/core_plugins/console/public/src/directives/history.html b/src/core_plugins/console/public/src/directives/history.html index 1fbc991ca23ea..25d72ae009931 100644 --- a/src/core_plugins/console/public/src/directives/history.html +++ b/src/core_plugins/console/public/src/directives/history.html @@ -1,4 +1,8 @@ -

    History

    +

      History aria-activedescendant="historyReq{{ history.selectedIndex }}" scrollto-activedescendant ng-keydown="history.onKeyDown($event)" - aria-label="History of sent requests" + aria-label="{{:: 'console.historyPage.requestListAriaLabel' | i18n: { defaultMessage: 'History of sent requests' } }}" >
    • History ng-mouseenter="history.viewingReq = req" ng-mouseleave="history.viewingReq = history.selectedReq" ng-dblclick="history.restore(req)" - aria-label="{{:: 'Request: ' + history.describeReq(req) }}" + aria-label="{{:: 'console.historyPage.itemOfRequestListAriaLabel' | i18n: { defaultMessage: 'Request: {historyItem}', values: { historyItem: history.describeReq(req) },} }}" aria-selected="{{ history.selectedReq === req }}" > {{ history.describeReq(req) }} @@ -32,12 +36,18 @@

      History

    diff --git a/src/core_plugins/console/public/src/directives/sense_history_viewer.js b/src/core_plugins/console/public/src/directives/sense_history_viewer.js index 11f524fa2bf5e..9502a10f0a362 100644 --- a/src/core_plugins/console/public/src/directives/sense_history_viewer.js +++ b/src/core_plugins/console/public/src/directives/sense_history_viewer.js @@ -23,7 +23,7 @@ import { useResizeChecker } from '../sense_editor_resize'; require('ui/modules') .get('app/sense') - .directive('senseHistoryViewer', function () { + .directive('senseHistoryViewer', function (i18n) { return { restrict: 'E', scope: { @@ -42,7 +42,9 @@ require('ui/modules') viewer.setValue(s); viewer.clearSelection(); } else { - viewer.getSession().setValue('No history available'); + viewer.getSession().setValue( + i18n('console.historyPage.noHistoryTextMessage', { defaultMessage: 'No history available' }) + ); } }); diff --git a/src/core_plugins/console/public/src/directives/sense_welcome.js b/src/core_plugins/console/public/src/directives/sense_welcome.js index 746cbd00e402d..28834f907a90d 100644 --- a/src/core_plugins/console/public/src/directives/sense_welcome.js +++ b/src/core_plugins/console/public/src/directives/sense_welcome.js @@ -23,7 +23,7 @@ const storage = require('../storage'); require('ui/modules') .get('app/sense') - .directive('senseWelcome', function () { + .directive('senseWelcome', function (i18n) { return { restrict: 'E', template: require('./welcome.html'), @@ -31,6 +31,9 @@ require('ui/modules') $scope.$on('$destroy', function () { storage.set('version_welcome_shown', '@@SENSE_REVISION'); }); - } + $scope.asWellAsFragmentText = i18n('console.welcomePage.supportedRequestFormatDescription.asWellAsFragmentText', { + defaultMessage: 'as well as' + }); + }, }; }); diff --git a/src/core_plugins/console/public/src/directives/settings.html b/src/core_plugins/console/public/src/directives/settings.html index cbb896c38cb73..5e82242eaa1fb 100644 --- a/src/core_plugins/console/public/src/directives/settings.html +++ b/src/core_plugins/console/public/src/directives/settings.html @@ -1,4 +1,8 @@ -

    Settings

    +

    Settings - Font Size - + i18n-id="console.settingsPage.fontSizeLabel" + i18n-default-message="Font Size" + >
    Settings ng-model="settings.vals.wrapMode" aria-describedby="consoleFontSize" > - - Wrap long lines - + @@ -46,9 +52,9 @@

    Settings

    - Autocomplete - + i18n-id="console.settingsPage.autocompleteLabel" + i18n-default-message="Autocomplete" + >
    @@ -95,17 +107,17 @@

    Settings

    + i18n-id="console.settingsPage.cancelButtonLabel" + i18n-default-message="Cancel" + > + i18n-id="console.settingsPage.saveButtonLabel" + i18n-default-message="Save" + >
    diff --git a/src/core_plugins/console/public/src/directives/welcome.html b/src/core_plugins/console/public/src/directives/welcome.html index bad5efa578ca0..7fba7d21a9160 100644 --- a/src/core_plugins/console/public/src/directives/welcome.html +++ b/src/core_plugins/console/public/src/directives/welcome.html @@ -1,28 +1,66 @@
    -

    Welcome to Console

    +

    -

    Quick intro to the UI

    +

    + +

    -

    The Console UI is split into two panes: an editor pane (left) and a response pane (right). +

    -

    Console understands requests in a compact format, similar to cURL: +

    -

    While typing a request, Console will make suggestions which you can then accept by hitting Enter/Tab. - These suggestions are made based on the request structure as well as your indices and types. +

    -

    A few quick tips, while I have your attention

    +

    + + +

    diff --git a/x-pack/plugins/grokdebugger/public/register_feature.js b/x-pack/plugins/grokdebugger/public/register_feature.js index 0dcca799136e7..82cd43bcbbcf7 100644 --- a/x-pack/plugins/grokdebugger/public/register_feature.js +++ b/x-pack/plugins/grokdebugger/public/register_feature.js @@ -8,11 +8,21 @@ import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/registry/feature_catalogue'; -FeatureCatalogueRegistryProvider.register(() => { +FeatureCatalogueRegistryProvider.register(i18n => { return { id: 'grokdebugger', - title: 'Grok Debugger', - description: 'Simulate and debug grok patterns for data transformation on ingestion.', + title: i18n('xpack.grokDebugger.registryProviderTitle', { + defaultMessage: '{grokLogParsingTool} Debugger', + values: { + grokLogParsingTool: 'Grok' + } + }), + description: i18n('xpack.grokDebugger.registryProviderDescription', { + defaultMessage: 'Simulate and debug {grokLogParsingTool} patterns for data transformation on ingestion.', + values: { + grokLogParsingTool: 'grok' + } + }), icon: 'grokApp', path: '/app/kibana#/dev_tools/grokdebugger', showOnHomePage: false, diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/custom_patterns_input/custom_patterns_input.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/custom_patterns_input/custom_patterns_input.js index e18af08b8ae66..87df1976b7dc8 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/custom_patterns_input/custom_patterns_input.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/custom_patterns_input/custom_patterns_input.js @@ -15,6 +15,7 @@ import { EuiSpacer } from '@elastic/eui'; import { EDITOR } from '../../../../../common/constants'; +import { FormattedMessage } from '@kbn/i18n/react'; export function CustomPatternsInput({ value, onChange }) { const sampleCustomPatterns = `POSTFIX_QUEUEID [0-9A-F]{10,11} @@ -23,14 +24,24 @@ MSG message-id=<%{GREEDYDATA}>`; return ( + )} data-test-subj="btnToggleCustomPatternsInput" > + )} > { sampleCustomPatterns } diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_input/event_input.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_input/event_input.js index 2db505f3a3248..00ee2dbd9074c 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_input/event_input.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_input/event_input.js @@ -11,11 +11,17 @@ import { EuiCodeEditor } from '@elastic/eui'; import { EDITOR } from '../../../../../common/constants'; +import { FormattedMessage } from '@kbn/i18n/react'; export function EventInput({ value, onChange }) { return ( + )} fullWidth data-test-subj="aceEventInput" > diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_output/event_output.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_output/event_output.js index 973f3728b5f89..f669ac7a61fdd 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_output/event_output.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/event_output/event_output.js @@ -10,11 +10,17 @@ import { EuiPanel, EuiCodeEditor } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; export function EventOutput({ value }) { return ( + )} fullWidth data-test-subj="aceEventOutput" > diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/grok_debugger/grok_debugger.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/grok_debugger/grok_debugger.js index dddb75336edaa..c42a66cdf561c 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/grok_debugger/grok_debugger.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/grok_debugger/grok_debugger.js @@ -20,6 +20,7 @@ import { CustomPatternsInput } from '../custom_patterns_input'; import { EventOutput } from '../event_output'; import { GrokdebuggerRequest } from '../../../../models/grokdebugger_request'; import { toastNotifications } from 'ui/notify'; +import { FormattedMessage } from '@kbn/i18n/react'; export class GrokDebugger extends React.Component { constructor(props) { @@ -123,7 +124,10 @@ export class GrokDebugger extends React.Component { isDisabled={this.isSimulateDisabled()} data-test-subj="btnSimulate" > - Simulate + diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/pattern_input/pattern_input.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/pattern_input/pattern_input.js index 03411edddd25b..bb06da7183b9a 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/pattern_input/pattern_input.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/components/pattern_input/pattern_input.js @@ -12,11 +12,17 @@ import { } from '@elastic/eui'; import { EDITOR } from '../../../../../common/constants'; import { GrokMode } from '../../../../lib/ace'; +import { FormattedMessage } from '@kbn/i18n/react'; export function PatternInput({ value, onChange }) { return ( + )} fullWidth data-test-subj="acePatternInput" > diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/directives/grokdebugger/grokdebugger.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/directives/grokdebugger/grokdebugger.js index c59f1c0ed56e6..33e5c561d63a3 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/directives/grokdebugger/grokdebugger.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/directives/grokdebugger/grokdebugger.js @@ -9,6 +9,7 @@ import 'plugins/grokdebugger/services/grokdebugger'; import { GrokDebugger } from '../../components/grok_debugger'; import { render } from 'react-dom'; import React from 'react'; +import { I18nProvider } from '@kbn/i18n/react'; const app = uiModules.get('xpack/grokdebugger'); @@ -18,7 +19,7 @@ app.directive('grokdebugger', function ($injector) { return { restrict: 'E', link: (scope, el) => { - render(, el[0]); + render(, el[0]); } }; }); diff --git a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/register.js b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/register.js index 896c6f3278efa..9d8b26bf66b41 100644 --- a/x-pack/plugins/grokdebugger/public/sections/grokdebugger/register.js +++ b/x-pack/plugins/grokdebugger/public/sections/grokdebugger/register.js @@ -7,12 +7,14 @@ import { DevToolsRegistryProvider } from 'ui/registry/dev_tools'; import { XPackInfoProvider } from 'plugins/xpack_main/services/xpack_info'; -DevToolsRegistryProvider.register((Private) => { +DevToolsRegistryProvider.register((Private, i18n) => { const xpackInfo = Private(XPackInfoProvider); return { order: 6, name: 'grokdebugger', - display: 'Grok Debugger', + display: i18n('xpack.grokDebugger.displayName', { + defaultMessage: 'Grok Debugger', + }), url: '#/dev_tools/grokdebugger', disabled: !xpackInfo.get('features.grokdebugger.enableLink', false), tooltipContent: xpackInfo.get('features.grokdebugger.message') diff --git a/x-pack/plugins/grokdebugger/server/lib/check_license/check_license.js b/x-pack/plugins/grokdebugger/server/lib/check_license/check_license.js index be2429e3cc577..b5c970b83e421 100644 --- a/x-pack/plugins/grokdebugger/server/lib/check_license/check_license.js +++ b/x-pack/plugins/grokdebugger/server/lib/check_license/check_license.js @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { i18n } from '@kbn/i18n'; + export function checkLicense(xpackLicenseInfo) { // If, for some reason, we cannot get the license information // from Elasticsearch, assume worst case and disable the Watcher UI @@ -11,7 +13,12 @@ export function checkLicense(xpackLicenseInfo) { return { enableLink: false, enableAPIRoute: false, - message: 'You cannot use the Grok Debugger because license information is not available at this time.' + message: i18n.translate('xpack.grokDebugger.unavailableLicenseInformationMessage', { + defaultMessage: 'You cannot use the {grokLogParsingTool} Debugger because license information is not available at this time.', + values: { + grokLogParsingTool: 'Grok' + } + }), }; } @@ -23,7 +30,13 @@ export function checkLicense(xpackLicenseInfo) { return { enableLink: false, enableAPIRoute: false, - message: `You cannot use the Grok Debugger because your ${licenseType} license has expired.` + message: i18n.translate('xpack.grokDebugger.licenseHasExpiredMessage', { + defaultMessage: 'You cannot use the {grokLogParsingTool} Debugger because your {licenseType} license has expired.', + values: { + licenseType, + grokLogParsingTool: 'Grok' + }, + }), }; } diff --git a/x-pack/plugins/grokdebugger/server/models/grokdebugger_response/grokdebugger_response.js b/x-pack/plugins/grokdebugger/server/models/grokdebugger_response/grokdebugger_response.js index 575a2700dc589..2b4d60fd55a45 100644 --- a/x-pack/plugins/grokdebugger/server/models/grokdebugger_response/grokdebugger_response.js +++ b/x-pack/plugins/grokdebugger/server/models/grokdebugger_response/grokdebugger_response.js @@ -5,6 +5,7 @@ */ import { get, isEmpty, omit } from 'lodash'; +import { i18n } from '@kbn/i18n'; /** * This model captures the grok debugger response from upstream to be passed to @@ -21,7 +22,14 @@ export class GrokdebuggerResponse { const docs = get(upstreamGrokdebuggerResponse, 'docs'); const error = docs[0].error; if (!isEmpty(error)) { - const opts = { 'error': 'Provided Grok patterns do not match data in the input' }; + const opts = { 'error': i18n.translate( + 'xpack.grokDebugger.patternsErrorMessage', { + defaultMessage: 'Provided {grokLogParsingTool} patterns do not match data in the input', + values: { + grokLogParsingTool: 'Grok' + } + } + ), }; return new GrokdebuggerResponse(opts); } const structuredEvent = omit(get(docs, '0.doc._source'), 'rawEvent'); diff --git a/x-pack/plugins/searchprofiler/public/app.js b/x-pack/plugins/searchprofiler/public/app.js index 9dde1f173fc3d..ae720e587a735 100644 --- a/x-pack/plugins/searchprofiler/public/app.js +++ b/x-pack/plugins/searchprofiler/public/app.js @@ -29,7 +29,19 @@ import template from './templates/index.html'; import { defaultQuery } from './templates/default_query'; uiRoutes.when('/dev_tools/searchprofiler', { - template: template + template: template, + controller: ($scope, i18n) => { + $scope.registerLicenseLinkLabel = i18n('xpack.searchProfiler.registerLicenseLinkLabel', + { defaultMessage: 'register a license' }); + $scope.trialLicense = i18n('xpack.searchProfiler.trialLicenseTitle', + { defaultMessage: 'Trial' }); + $scope.basicLicense = i18n('xpack.searchProfiler.basicLicenseTitle', + { defaultMessage: 'Basic' }); + $scope.goldLicense = i18n('xpack.searchProfiler.goldLicenseTitle', + { defaultMessage: 'Gold' }); + $scope.platinumLicense = i18n('xpack.searchProfiler.platinumLicenseTitle', + { defaultMessage: 'Platinum' }); + }, }); uiModules diff --git a/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html b/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html index 901c5bebe353f..324c96ad7e80f 100644 --- a/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html +++ b/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html @@ -2,15 +2,38 @@ {{detailRow.indexName}}

    [{{detailRow.shardID}}][{{detailRow.shardNumber}}]


    - Type +

    {{detailRow.query_type}}

    - Description +

    {{detailRow.lucene}}

    - Total Time + + +

    {{detailRow.time | msToPretty:3 }}

    - Self Time + + +

    {{detailRow.selfTime | msToPretty:3 }}

    - Timing Breakdown + diff --git a/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html b/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html index e8d0db30f51d4..b592e26b175a3 100644 --- a/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html +++ b/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html @@ -2,12 +2,18 @@
    -

    Cumulative Time: {{index.time[target] | msToPretty: 3}}

    + tooltip="{{:: 'xpack.searchProfiler.profileTree.cumulativeTimeTooltip' | i18n: { defaultMessage: 'The cumulative time of all shards in the index. Note: this is not wall-clock time, as shards can execute in parallel.' } }}"> +

    {{:: 'xpack.searchProfiler.profileTree.cumulativeTimeTitle' | i18n: { defaultMessage: "Cumulative Time:" } }} {{ index.time[target] | msToPretty: 3 }}


    -
    -

    Index: {{index.name}}

    +
    +

    + + {{index.name}} +

    @@ -32,10 +38,26 @@

    Index: {{index.name}}

    ng-hide="!shardVisibility" ng-class="{'prfDevTool__panelBody' : shardVisibility}">
    -
    Type
    -
    Self Time
    -
    Total Time
    -
    % Time
    +
    +
    +
    +
    ({ +DevToolsRegistryProvider.register(i18n => ({ order: 5, name: 'searchprofiler', - display: 'Search Profiler', + display: i18n('xpack.searchProfiler.pageDisplayName', { + defaultMessage: 'Search Profiler', + }), url: '#/dev_tools/searchprofiler' })); diff --git a/x-pack/plugins/searchprofiler/public/register_feature.js b/x-pack/plugins/searchprofiler/public/register_feature.js index 17070fe68be26..c11fd94e948ca 100644 --- a/x-pack/plugins/searchprofiler/public/register_feature.js +++ b/x-pack/plugins/searchprofiler/public/register_feature.js @@ -8,11 +8,15 @@ import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/registry/feature_catalogue'; -FeatureCatalogueRegistryProvider.register(() => { +FeatureCatalogueRegistryProvider.register(i18n => { return { id: 'searchprofiler', - title: 'Search Profiler', - description: 'Quickly check the performance of any Elasticsearch query.', + title: i18n('xpack.searchProfiler.registryProviderTitle', { + defaultMessage: 'Search Profiler', + }), + description: i18n('xpack.searchProfiler.registryProviderDescription', { + defaultMessage: 'Quickly check the performance of any Elasticsearch query.', + }), icon: 'searchProfilerApp', path: '/app/kibana#/dev_tools/searchprofiler', showOnHomePage: false, diff --git a/x-pack/plugins/searchprofiler/public/templates/index.html b/x-pack/plugins/searchprofiler/public/templates/index.html index f9890db3cf7f0..a2d5e837b0786 100644 --- a/x-pack/plugins/searchprofiler/public/templates/index.html +++ b/x-pack/plugins/searchprofiler/public/templates/index.html @@ -3,14 +3,14 @@
    - - @@ -18,21 +18,27 @@ -
    -

    - - License error -

    +
    +

    -

    - The Profiler Visualization requires an active license (Trial, - Basic, Gold or Platinum), but none were found in your cluster. -

    +

    -

    - Please register a license - to continue using the Search Profiler. -

    +

    @@ -44,9 +50,9 @@

    + i18n-id="xpack.searchProfiler.formIndexLabel" + i18n-default-message="Index" + >

    @@ -66,9 +72,9 @@

    + i18n-id="xpack.searchProfiler.formTypeLabel" + i18n-default-message="Type" + >

    @@ -94,8 +100,9 @@

    style="float:right;" ng-click="profile()" ng-disabled="!licenseEnabled || !query" + i18n-id="xpack.searchProfiler.formProfileButtonLabel" + i18n-default-message="Profile" > - Profile

    {{breakdown.key}}