[visualizations] Add i18n translation for 'No results found' (#74619)
This commit is contained in:
parent
ed34d6fe30
commit
7e55da56de
|
@ -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 {
|
||||
|
@ -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',
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
|
||||
interface VisualizationNoResultsProps {
|
||||
|
@ -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" />
|
||||
|
|
Loading…
Reference in a new issue