Skip to content

Commit

Permalink
[visualizations] Add i18n translation for 'No results found' (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
fbaligand authored and lukeelmers committed Aug 10, 2020
1 parent d14c436 commit efa43e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit efa43e2

Please sign in to comment.