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 additional part of Kibana #26461

Closed
Closed
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
53 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
ec1ad76
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 29, 2018
6ebd934
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 30, 2018
3e6062f
translate additional part of Kibana
tibmt Nov 30, 2018
332d867
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
4a99411
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
4cdec42
Merge branch 'master' of https://github.com/elastic/kibana
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
66b516b
Merge branch 'master' into feature/translations/kibanaAdditional
Nox911 Dec 5, 2018
73bb8b9
Add translations
Nox911 Dec 6, 2018
e4e7120
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 6, 2018
44a7dcb
Merge branch 'master' into feature/translations/kibanaAdditional
Nox911 Dec 7, 2018
a9a6043
Merge branch 'master' of https://github.com/elastic/kibana
Dec 7, 2018
d08ca38
Update snapshots
maryia-lapata Dec 10, 2018
9d247e6
Merge branch 'master' of https://github.com/elastic/kibana
Dec 10, 2018
00e96de
Fix issues
Nox911 Dec 10, 2018
bd707af
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 11, 2018
d9cf492
Merge branch 'master' into feature/translations/kibanaAdditional
Nox911 Dec 11, 2018
a56096a
Fix issues
Nox911 Dec 11, 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
49 changes: 37 additions & 12 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { i18n } from '@kbn/i18n';
import Promise from 'bluebird';
import { mkdirp as mkdirpNode } from 'mkdirp';

Expand Down Expand Up @@ -64,32 +65,46 @@ export default function (kibana) {
],
app: {
id: 'kibana',
title: 'Kibana',
title: i18n.translate('kbn.kibanaTitle', {
defaultMessage: 'Kibana'
}),
listed: false,
description: 'the kibana you know and love',
description: i18n.translate('kbn.kibanaDescription', {
defaultMessage: 'the kibana you know and love'
}),
main: 'plugins/kibana/kibana',
},
styleSheetPaths: `${__dirname}/public/index.scss`,
links: [
{
id: 'kibana:discover',
title: 'Discover',
title: i18n.translate('kbn.discoverTitle', {
defaultMessage: 'Discover'
}),
order: -1003,
url: `${kbnBaseUrl}#/discover`,
description: 'interactively explore your data',
description: i18n.translate('kbn.discoverDescription', {
defaultMessage: 'interactively explore your data'
}),
icon: 'plugins/kibana/assets/discover.svg',
euiIconType: 'discoverApp',
}, {
id: 'kibana:visualize',
title: 'Visualize',
title: i18n.translate('kbn.visualizeTitle', {
defaultMessage: 'Visualize'
}),
order: -1002,
url: `${kbnBaseUrl}#/visualize`,
description: 'design data visualizations',
description: i18n.translate('kbn.visualizeDescription', {
defaultMessage: 'design data visualizations'
}),
icon: 'plugins/kibana/assets/visualize.svg',
euiIconType: 'visualizeApp',
}, {
id: 'kibana:dashboard',
title: 'Dashboard',
title: i18n.translate('kbn.dashboardTitle', {
defaultMessage: 'Dashboard'
}),
order: -1001,
url: `${kbnBaseUrl}#/dashboards`,
// The subUrlBase is the common substring of all urls for this app. If not given, it defaults to the url
Expand All @@ -98,23 +113,33 @@ export default function (kibana) {
// the url above in order to preserve the original url for BWC. The subUrlBase helps the Chrome api nav
// to determine what url to use for the app link.
subUrlBase: `${kbnBaseUrl}#/dashboard`,
description: 'compose visualizations for much win',
description: i18n.translate('kbn.dashboardDescription', {
defaultMessage: 'compose visualizations for much win'
}),
icon: 'plugins/kibana/assets/dashboard.svg',
euiIconType: 'dashboardApp',
}, {
id: 'kibana:dev_tools',
title: 'Dev Tools',
title: i18n.translate('kbn.devToolsTitle', {
defaultMessage: 'Dev Tools'
}),
order: 9001,
url: '/app/kibana#/dev_tools',
description: 'development tools',
description: i18n.translate('kbn.devToolsDescription', {
defaultMessage: 'development tools'
}),
icon: 'plugins/kibana/assets/wrench.svg',
euiIconType: 'devToolsApp',
}, {
id: 'kibana:management',
title: 'Management',
title: i18n.translate('kbn.managementTitle', {
defaultMessage: 'Management'
}),
order: 9003,
url: `${kbnBaseUrl}#/management`,
description: 'define index patterns, change config, and more',
description: i18n.translate('kbn.managementDescription', {
defaultMessage: 'define index patterns, change config, and more'
}),
icon: 'plugins/kibana/assets/settings.svg',
euiIconType: 'managementApp',
linkToLastSubUrl: false
Expand Down
6 changes: 4 additions & 2 deletions src/legacy/core_plugins/kibana/public/context/api/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import _ from 'lodash';

import { SearchSourceProvider } from 'ui/courier';

export function fetchAnchorProvider(indexPatterns, Private) {
export function fetchAnchorProvider(indexPatterns, Private, i18n) {
const SearchSource = Private(SearchSourceProvider);

return async function fetchAnchor(
Expand Down Expand Up @@ -54,7 +54,9 @@ export function fetchAnchorProvider(indexPatterns, Private) {
const response = await searchSource.fetch();

if (_.get(response, ['hits', 'total'], 0) < 1) {
throw new Error('Failed to load anchor document.');
throw new Error(i18n('kbn.context.failedToLoadAnchorDocumentErrorDescription', {
defaultMessage: 'Failed to load anchor document.'
}));
}

return {
Expand Down
79 changes: 55 additions & 24 deletions src/legacy/core_plugins/kibana/public/context/app.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<div class="kuiLocalNav" ng-if="!k7design">
<div class="kuiLocalNavRow">
<div class="kuiLocalNavRow__section">
<div class="kuiLocalTitle" role="heading" aria-level="1">
Surrounding Documents in {{ contextApp.state.queryParameters.indexPatternId }}
</div>
<div
class="kuiLocalTitle"
role="heading"
aria-level="1"
i18n-id="kbn.context.surroundingDocumentsDescription"
i18n-default-message="Surrounding Documents in {indexPatternId}"
i18n-values="{
indexPatternId: contextApp.state.queryParameters.indexPatternId
}"
></div>
</div>
</div>
<div class="kuiLocalNavRow kuiLocalNavRow--secondary">
Expand All @@ -25,31 +32,35 @@
<div class="kuiInfoPanel kuiInfoPanel--error kuiVerticalRhythm">
<div class="kuiInfoPanelHeader">
<span class="kuiInfoPanelHeader__icon kuiIcon kuiIcon--error fa-warning"></span>
<span class="kuiInfoPanelHeader__title">
Failed to load the anchor document
</span>
<span
class="kuiInfoPanelHeader__title"
i18n-id="kbn.context.failedToLoadAnchorDocumentDescription"
i18n-default-message="Failed to load the anchor document"
></span>
</div>

<div class="kuiInfoPanelBody">
<div
class="kuiInfoPanelBody__message"
ng-if="contextApp.state.loadingStatus.anchor.reason === contextApp.constants.FAILURE_REASONS.INVALID_TIEBREAKER"
i18n-id="kbn.context.noSearchableTiebreakerFieldDescription"
i18n-default-message="No searchable tiebreaker field could be found in the index pattern {indexPatternId}. Please change the advanced setting {tieBreakerFields} to include a valid field for this index pattern."
i18n-values="{
indexPatternId: contextApp.state.queryParameters.indexPatternId,
tieBreakerFields: '<code>context:tieBreakerFields</code>'
}"
>
No searchable tiebreaker field could be found in the index pattern
{{ contextApp.state.queryParameters.indexPatternId}}.

Please change the advanced setting
<code>context:tieBreakerFields</code> to include a valid field for this
index pattern.

</div>
<div
class="kuiInfoPanelBody__message"
ng-if="contextApp.state.loadingStatus.anchor.reason === contextApp.constants.FAILURE_REASONS.UNKNOWN"
>
Please reload or visit
<a ng-href="{{ contextApp.state.navigation.discover.url }}">Discover</a>
to select a valid anchor document.
</div>
i18n-id="kbn.context.pleaseReloadPageDescription"
i18n-default-message="Please reload or visit {navigationLink} to select a valid anchor document."
i18n-values="{
navigationLink: '<a ng-href=\'{{ contextApp.state.navigation.discover.url }}\'>' + contextApp.discover + '</a>'
}"
></div>
</div>
</div>
</div>
Expand All @@ -70,15 +81,24 @@
icon="'fa-chevron-up'"
ng-click="contextApp.actions.fetchMorePredecessorRows()"
>
Load {{ contextApp.state.queryParameters.defaultStepSize }} more
<span
i18n-id="kbn.context.loadMoreDescription"
i18n-default-message="Load {defaultStepSize} more"
i18n-values="{
defaultStepSize: contextApp.state.queryParameters.defaultStepSize
}"
></span>
</context-loading-button>
<context-size-picker
count="contextApp.state.queryParameters.predecessorCount"
data-test-subj="predecessorCountPicker"
is-disabled="contextApp.state.loadingStatus.anchor.status !== contextApp.constants.LOADING_STATUS.LOADED"
on-change-count="contextApp.actions.fetchGivenPredecessorRows"
></context-size-picker>
<span>newer documents</span>
<span
i18n-id="kbn.context.newerDocumentsDescription"
i18n-default-message="newer documents"
></span>
<span
class="kuiStatusText kuiStatusText--warning"
ng-if="(contextApp.state.loadingStatus.predecessors.status === contextApp.constants.LOADING_STATUS.LOADED)
Expand All @@ -101,9 +121,11 @@
].includes(contextApp.state.loadingStatus.anchor.status)"
class="kuiPanel kuiPanel--centered kuiVerticalRhythm"
>
<div class="kuiTableInfo">
Loading&hellip;
</div>
<div
class="kuiTableInfo"
i18n-id="kbn.context.loadingDescription"
i18n-default-message="Loading…"
></div>
</div>

<!-- Table -->
Expand Down Expand Up @@ -136,15 +158,24 @@
icon="'fa-chevron-down'"
ng-click="contextApp.actions.fetchMoreSuccessorRows()"
>
Load {{ contextApp.state.queryParameters.defaultStepSize }} more
<span
i18n-id="kbn.context.loadMoreDescription"
i18n-default-message="Load {defaultStepSize} more"
i18n-values="{
defaultStepSize: contextApp.state.queryParameters.defaultStepSize
}"
></span>
</context-loading-button>
<context-size-picker
count="contextApp.state.queryParameters.successorCount"
data-test-subj="successorCountPicker"
is-disabled="contextApp.state.loadingStatus.anchor.status !== contextApp.constants.LOADING_STATUS.LOADED"
on-change-count="contextApp.actions.fetchGivenSuccessorRows"
></context-size-picker>
<div>older documents</div>
<div
i18n-id="kbn.context.olderDocumentsDescription"
i18n-default-message="older documents"
></div>
<span
class="kuiStatusText kuiStatusText--warning"
ng-if="(contextApp.state.loadingStatus.successors.status === contextApp.constants.LOADING_STATUS.LOADED)
Expand Down
6 changes: 5 additions & 1 deletion src/legacy/core_plugins/kibana/public/context/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.directive('contextApp', function ContextApp() {
};
});

function ContextAppController($scope, config, Private) {
function ContextAppController($scope, config, Private, i18n) {
const queryParameterActions = Private(QueryParameterActionsProvider);
const queryActions = Private(QueryActionsProvider);

Expand Down Expand Up @@ -137,6 +137,10 @@ function ContextAppController($scope, config, Private) {
_.assign(this, newParameters);
},
);

this.discover = i18n('kbn.context.discoverDescription', {
defaultMessage: 'Discover'
});
}

function createInitialState(defaultStepSize, tieBreakerField, discoverUrl) {
Expand Down
18 changes: 12 additions & 6 deletions src/legacy/core_plugins/kibana/public/context/query/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function QueryActionsProvider(courier, Private, Promise) {
}
);

const fetchAnchorRow = (state) => () => {
const fetchAnchorRow = (state, i18n) => () => {
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
const { queryParameters: { indexPatternId, anchorType, anchorId, sort, tieBreakerField } } = state;

if (!tieBreakerField) {
Expand All @@ -81,15 +81,17 @@ export function QueryActionsProvider(courier, Private, Promise) {
(error) => {
setFailedStatus(state)('anchor', { error });
toastNotifications.addDanger({
title: 'Unable to load the anchor document',
title: i18n('kbn.context.unableToLoadAnchorDocumentDescription', {
defaultMessage: 'Unable to load the anchor document'
}),
text: <MarkdownSimple>{error.message}</MarkdownSimple>,
});
throw error;
}
);
};

const fetchPredecessorRows = (state) => () => {
const fetchPredecessorRows = (state, i18n) => () => {
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
const {
queryParameters: { indexPatternId, filters, predecessorCount, sort, tieBreakerField },
rows: { anchor },
Expand Down Expand Up @@ -125,15 +127,17 @@ export function QueryActionsProvider(courier, Private, Promise) {
(error) => {
setFailedStatus(state)('predecessors', { error });
toastNotifications.addDanger({
title: 'Unable to load documents',
title: i18n('kbn.context.unableToLoadDocumentDescription', {
defaultMessage: 'Unable to load documents'
}),
text: <MarkdownSimple>{error.message}</MarkdownSimple>,
});
throw error;
},
);
};

const fetchSuccessorRows = (state) => () => {
const fetchSuccessorRows = (state, i18n) => () => {
Nox911 marked this conversation as resolved.
Show resolved Hide resolved
const {
queryParameters: { indexPatternId, filters, sort, successorCount, tieBreakerField },
rows: { anchor },
Expand Down Expand Up @@ -169,7 +173,9 @@ export function QueryActionsProvider(courier, Private, Promise) {
(error) => {
setFailedStatus(state)('successors', { error });
toastNotifications.addDanger({
title: 'Unable to load documents',
title: i18n('kbn.context.unableToLoadDocumentDescription', {
defaultMessage: 'Unable to load documents'
}),
text: <MarkdownSimple>{error.message}</MarkdownSimple>,
});
throw error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
>
<p>
<FormattedMessage
defaultMessage="You have {totalDashboards} dashboards, but your {listingLimitText} setting prevents the table below from displaying more than {listingLimitValue}. You can change this setting under {advancedSettingsLink}."
defaultMessage="You have {totalDashboards} dashboards, but your {listingLimitText} setting prevents the table below from displaying more than {listingLimitValue}. You can change this setting under {advancedSettingsLink}."
id="kbn.dashboard.listing.listingLimitExceededDescription"
values={
Object {
Expand All @@ -548,7 +548,11 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
/>
</EuiLink>,
"listingLimitText": <strong>
listingLimit
<FormattedMessage
defaultMessage="listingLimit"
id="kbn.dashboard.listing.listingLimitExceededListingLimitTitle"
values={Object {}}
/>
</strong>,
"listingLimitValue": 1,
"totalDashboards": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ class DashboardListingUi extends React.Component {
listingLimitValue: this.props.listingLimit,
listingLimitText: (
<strong>
listingLimit
<FormattedMessage
id="kbn.dashboard.listing.listingLimitExceededListingLimitTitle"
defaultMessage="listingLimit"
/>
</strong>
),
advancedSettingsLink: (
Expand Down
10 changes: 7 additions & 3 deletions src/legacy/core_plugins/kibana/public/dev_tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ uiRoutes.defaults(/^\/dev_tools(\/|$)/, {
]
});

FeatureCatalogueRegistryProvider.register(() => {
FeatureCatalogueRegistryProvider.register((i18n) => {
return {
id: 'console',
title: 'Console',
description: 'Skip cURL and use this JSON interface to work with your data directly.',
title: i18n('kbn.devTools.consoleTitle', {
defaultMessage: 'Console'
}),
description: i18n('kbn.devTools.consoleDescription', {
defaultMessage: 'Skip cURL and use this JSON interface to work with your data directly.'
}),
icon: 'consoleApp',
path: '/app/kibana#/dev_tools/console',
showOnHomePage: true,
Expand Down
Loading