Skip to content

Commit

Permalink
add i18n translation for 'No results found'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbaligand committed Aug 8, 2020
1 parent c6c300e commit dfda4ba
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('visualizations.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 dfda4ba

Please sign in to comment.