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

Translations for Dev Tools #23951

Merged
merged 47 commits into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
47 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
04f7d8d
translate dev-tools-console
Nox911 Oct 10, 2018
a512753
translate dev-tools searchprofiler
Nox911 Oct 10, 2018
b88d795
translate dev-tools search-profiler
Nox911 Oct 10, 2018
be7f67e
translate dev-tools grok-debugger
Nox911 Oct 10, 2018
d18aa4c
fix displayName in grokdebugger
Nox911 Oct 10, 2018
8acbfce
minor fix in grok debugger
Nox911 Oct 10, 2018
5d174b0
add mark for translate questions
Nox911 Oct 10, 2018
3f9f9c1
fix id for console grokDebugger and searchProfiler
Nox911 Oct 11, 2018
7009298
fix issues
Nox911 Oct 16, 2018
b0d1660
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 16, 2018
bb13404
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 16, 2018
62b6ad1
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 17, 2018
47f704e
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 17, 2018
60675e0
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 17, 2018
22d3d75
remove whitespace
Nox911 Oct 17, 2018
a3d5129
Merge branch 'feature/translate-dev-tools' of https://github.com/Nox9…
Nox911 Oct 17, 2018
acbad4b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 18, 2018
ab51d95
fix issues
Nox911 Oct 18, 2018
c73bb22
fix issues
Nox911 Oct 18, 2018
7382ab2
fix issues
Nox911 Oct 19, 2018
288cc51
add deleted whitespaces
Nox911 Oct 19, 2018
a86cd49
add deleted whitespace
Nox911 Oct 19, 2018
4310aa3
add deleted whitespaces
Nox911 Oct 19, 2018
1607e91
fix issues
Nox911 Oct 19, 2018
4cb9afb
fix issues
Nox911 Oct 19, 2018
f278c8a
Fix issues
Nox911 Oct 19, 2018
a9a8543
Merge branch 'master' into feature/translate-dev-tools
maryia-lapata Oct 21, 2018
a850650
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 22, 2018
2502cb6
Merge branch 'master' into feature/translate-dev-tools
maryia-lapata Oct 23, 2018
41c68c6
Merge branch 'master' into feature/translate-dev-tools
maryia-lapata Oct 24, 2018
ec10ee7
Merge branch 'master' into feature/translate-dev-tools
maryia-lapata Oct 25, 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
3cdc72a
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 30, 2018
c90503b
Translate license types
Nox911 Oct 30, 2018
b4b979e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 30, 2018
67395f0
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 31, 2018
fdb8381
Fix issues
Nox911 Oct 31, 2018
d349a4f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 31, 2018
e2b13bb
Merge branch 'master' into feature/translate-dev-tools
Nox911 Oct 31, 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
5 changes: 4 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"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",
"markdownVis": "src/core_plugins/markdown_vis",
"metricVis": "src/core_plugins/metric_vis",
"statusPage": "src/core_plugins/status_page",
"tagCloud": "src/core_plugins/tagcloud",
"xpack.idxMgmt": "x-pack/plugins/index_management"
"xpack.grokDebugger": "x-pack/plugins/grokdebugger",
"xpack.idxMgmt": "x-pack/plugins/index_management",
"xpack.searchProfiler": "x-pack/plugins/searchprofiler"
},
"exclude": [
"src/ui/ui_render/bootstrap/app_bootstrap.js",
Expand Down
19 changes: 14 additions & 5 deletions src/core_plugins/console/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="conApp__editor">
<ul class="conApp__autoComplete" id="autocomplete"></ul>
<div class="conApp__editorActions" id="ConAppEditorActions">
<kbn-tooltip text="click to send request">
<kbn-tooltip text="{{:: 'console.sendRequestButtonTooltip' | i18n: { defaultMessage: 'click to send request' } }}">
<button
class="conApp__editorActionButton conApp__editorActionButton--success"
ng-click="sendSelected()"
Expand All @@ -17,7 +17,7 @@
class="conApp__editorActionButton"
dropdown-toggle
ng-click="getDocumentation()"
aria-label="Request options"
aria-label="{{:: 'console.requestOptionsButtonAriaLabel' | i18n: { defaultMessage: 'Request options' } }}"
>
<span class="kuiIcon fa-wrench"></span>
</button>
Expand All @@ -28,13 +28,22 @@
aria-labelledby="consoleRequestOptions"
>
<li role="menuitem">
<button id="ConCopyAsCurl">Copy as cURL</button>
<button
id="ConCopyAsCurl"
i18n-id="console.requestOptions.copyAsUrlButtonLabel"
i18n-default-message="Copy as cURL"></button>
</li>
<li role="menuitem" ng-if="documentation">
<button ng-click="openDocumentation(documentation)">Open documentation</button>
<button
ng-click="openDocumentation(documentation)"
i18n-id="console.requestOptions.openDocumentationButtonLabel"
i18n-default-message="Open documentation"></button>
</li>
<li role="menuitem">
<button ng-click="autoIndent($event)">Auto indent</button>
<button
ng-click="autoIndent($event)"
i18n-id="console.requestOptions.autoIndentButtonLabel"
i18n-default-message="Auto indent"></button>
</li>
</ul>
</span>
Expand Down
3 changes: 2 additions & 1 deletion src/core_plugins/console/public/src/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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' }),
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -32,19 +32,25 @@ export function SenseTopNavController(Private) {
},
{
key: 'history',
description: 'History',
description: i18n('console.topNav.historyTabDescription', {
defaultMessage: 'History',
}),
template: `<sense-history></sense-history>`,
testId: 'consoleHistoryButton',
},
{
key: 'settings',
description: 'Settings',
description: i18n('console.topNav.settingsTabDescription', {
defaultMessage: 'Settings',
}),
template: `<sense-settings></sense-settings>`,
testId: 'consoleSettingsButton',
},
{
key: 'help',
description: 'Help',
description: i18n('console.topNav.helpTabDescription', {
defaultMessage: 'Help',
}),
template: `<sense-help></sense-help>`,
testId: 'consoleHelpButton',
},
Expand Down
85 changes: 70 additions & 15 deletions src/core_plugins/console/public/src/directives/help.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,94 @@
<h2 class="euiTitle euiTitle--small">Help</h2>
<h2
class="euiTitle euiTitle--small"
i18n-id="console.helpPage.pageTitle"
i18n-default-message="Help"
></h2>

<div class="euiSpacer euiSpacer--m"></div>

<div class="euiPanel euiPanel--paddingLarge">
<div class="euiFlexGroup euiFlexGroup--gutterExtraLarge">
<div class="euiFlexItem">
<h3 class="euiTitle euiTitle--xsmall">Request format</h3>
<div class="euiSpacer euiSpacer--l"></div>
You can type one or more requests in the white editor. Console understands requests in a compact format:
<h3
class="euiTitle euiTitle--xsmall"
i18n-id="console.helpPage.requestFormatTitle"
i18n-default-message="Request format"
></h3>
<div
class="euiSpacer euiSpacer--l"
i18n-id="console.helpPage.requestFormatDescription"
i18n-default-message="You can type one or more requests in the white editor. Console understands requests in a compact format:"
></div>
<sense-help-example class="conHelp__example"></sense-help-example>
</div>
<div class="euiFlexItem">
<h3 class="euiTitle euiTitle--xsmall">Keyboard commands</h3>
<h3
i18n-id="console.helpPage.keyboardCommandsTitle"
i18n-default-message="Keyboard commands"
class="euiTitle euiTitle--xsmall"
></h3>
<div class="euiSpacer euiSpacer--l"></div>
<dl class="euiDescriptionList euiDescriptionList--row euiDescriptionList--compressed">
<dt class="euiDescriptionList__title">Ctrl/Cmd + I</dt>
<dd class="euiDescriptionList__description">Auto indent current request</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.autoIndentDescription"
i18n-default-message="Auto indent current request"
></dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + /</dt>
<dd class="euiDescriptionList__description">Open documentation for current request</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.openDocumentationDescription"
i18n-default-message="Open documentation for current request"
></dd>
<dt class="euiDescriptionList__title">Ctrl + Space</dt>
<dd class="euiDescriptionList__description">Open Auto complete (even if not typing)</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.openAutoCompleteDescription"
i18n-default-message="Open Auto complete (even if not typing)"
></dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Enter</dt>
<dd class="euiDescriptionList__description">Submit request</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.submitRequestDescription"
i18n-default-message="Submit request"
></dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Up/Down</dt>
<dd class="euiDescriptionList__description">Jump to the previous/next request start or end.</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.jumpToPreviousNextRequestDescription"
i18n-default-message="Jump to the previous/next request start or end."
></dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Alt + L</dt>
<dd class="euiDescriptionList__description">Collapse/expand current scope.</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.collapseExpandCurrentScopeDescription"
i18n-default-message="Collapse/expand current scope."
></dd>
<dt class="euiDescriptionList__title">Ctrl/Cmd + Option + 0</dt>
<dd class="euiDescriptionList__description">Collapse all scopes but the current one. Expand by adding a shift.</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.collapseAllScopesDescription"
i18n-default-message="Collapse all scopes but the current one. Expand by adding a shift."
></dd>
<dt class="euiDescriptionList__title">Down arrow</dt>
<dd class="euiDescriptionList__description">Switch focus to auto-complete menu. Use arrows to further select a term</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.switchFocusToAutoCompleteMenuDescription"
i18n-default-message="Switch focus to auto-complete menu. Use arrows to further select a term"
></dd>
<dt class="euiDescriptionList__title">Enter/Tab</dt>
<dd class="euiDescriptionList__description">Select the currently selected or the top most term in auto-complete menu</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.selectCurrentlySelectedInAutoCompleteMenuDescription"
i18n-default-message="Select the currently selected or the top most term in auto-complete menu"
></dd>
<dt class="euiDescriptionList__title">Esc</dt>
<dd class="euiDescriptionList__description">Close auto-complete menu</dd>
<dd
class="euiDescriptionList__description"
i18n-id="console.helpPage.keyboardCommands.closeAutoCompleteMenuDescription"
i18n-default-message="Close auto-complete menu"
></dd>
</dl>
</div>
</div>
Expand Down
20 changes: 15 additions & 5 deletions src/core_plugins/console/public/src/directives/history.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<h2 class="kuiLocalDropdownTitle">History</h2>
<h2
class="kuiLocalDropdownTitle"
i18n-id="console.historyPage.pageTitle"
i18n-default-message="History"
></h2>

<div class="conHistory__body">
<ul
Expand All @@ -8,7 +12,7 @@ <h2 class="kuiLocalDropdownTitle">History</h2>
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' } }}"
>
<li
class="list-group-item conHistory__req"
Expand All @@ -20,7 +24,7 @@ <h2 class="kuiLocalDropdownTitle">History</h2>
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) }}
Expand All @@ -32,12 +36,18 @@ <h2 class="kuiLocalDropdownTitle">History</h2>
</div>

<div class="conHistory__footer">
<button class="kuiButton kuiButton--danger" ng-click="history.clear()">Clear</button>
<button
class="kuiButton kuiButton--danger"
ng-click="history.clear()"
i18n-id="console.historyPage.clearHistoryButtonLabel"
i18n-default-message="Clear"
></button>
<button
class="kuiButton kuiButton--primary"
ng-disabled="!history.selectedReq"
ng-click="history.restore()"
i18n-id="console.historyPage.applyHistoryButtonLabel"
i18n-default-message="Apply"
>
Apply
</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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' })
);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ const storage = require('../storage');

require('ui/modules')
.get('app/sense')
.directive('senseWelcome', function () {
.directive('senseWelcome', function (i18n) {
return {
restrict: 'E',
template: require('./welcome.html'),
link: function ($scope) {
$scope.$on('$destroy', function () {
storage.set('version_welcome_shown', '@@SENSE_REVISION');
});
}
$scope.asWellAsFragmentText = i18n('console.welcomePage.supportedRequestFormatDescription.asWellAsFragmentText', {
defaultMessage: 'as well as'
});
},
};
});
Loading