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

add i18n translation for 'No results found' #74619

Merged
merged 2 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion src/plugins/vis_type_vislib/public/vislib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/* eslint-disable max-classes-per-file */

import { i18n } from '@kbn/i18n';
import { KbnError } from '../../../kibana_utils/public';

export class VislibError extends KbnError {
Expand Down Expand Up @@ -51,6 +52,10 @@ export class PieContainsAllZeros extends VislibError {

export class NoResults extends VislibError {
constructor() {
super('No results found');
super(
i18n.translate('visTypeVislib.vislib.errors.noResultsFoundTitle', {
defaultMessage: 'No results found',
})
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';

interface VisualizationNoResultsProps {
Expand All @@ -37,7 +38,11 @@ export class VisualizationNoResults extends React.Component<VisualizationNoResul

<EuiSpacer size="s" />

<p>No results found</p>
<p>
{i18n.translate('visualizations.noResultsFoundTitle', {
defaultMessage: 'No results found',
})}
</p>
</EuiText>
</div>
<div className="item bottom" />
Expand Down