Improve messaging for Interactive Search

This commit is contained in:
Bogdan 2023-08-01 09:19:04 +03:00 committed by Mark McDowall
parent e8855c312d
commit 7893fdde10
2 changed files with 12 additions and 8 deletions

View File

@ -1,12 +1,13 @@
import PropTypes from 'prop-types';
import React, { Fragment } from 'react';
import Alert from 'Components/Alert';
import Icon from 'Components/Icon';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import PageMenuButton from 'Components/Menu/PageMenuButton';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { align, icons, sortDirections } from 'Helpers/Props';
import { align, icons, kinds, sortDirections } from 'Helpers/Props';
import getErrorMessage from 'Utilities/Object/getErrorMessage';
import translate from 'Utilities/String/translate';
import InteractiveSearchFilterModalConnector from './InteractiveSearchFilterModalConnector';
@ -149,17 +150,17 @@ function InteractiveSearch(props) {
{
!isFetching && isPopulated && !totalReleasesCount ?
<div>
No results found
</div> :
<Alert kind={kinds.INFO}>
{translate('NoResultsFound')}
</Alert> :
null
}
{
!!totalReleasesCount && isPopulated && !items.length ?
<div>
All results are hidden by the applied filter
</div> :
<Alert kind={kinds.WARNING}>
{translate('AllResultsAreHiddenByTheAppliedFilter')}
</Alert> :
null
}
@ -194,7 +195,7 @@ function InteractiveSearch(props) {
{
totalReleasesCount !== items.length && !!items.length ?
<div className={styles.filteredMessage}>
Some results are hidden by the applied filter
{translate('SomeResultsAreHiddenByTheAppliedFilter')}
</div> :
null
}

View File

@ -13,6 +13,7 @@
"Age": "Age",
"AirDate": "Air Date",
"All": "All",
"AllResultsAreHiddenByTheAppliedFilter": "All results are hidden by the applied filter",
"AllTitles": "All Titles",
"ApiKeyValidationHealthCheckMessage": "Please update your API key to be at least {0} characters long. You can do this via settings or the config file",
"AppDataDirectory": "AppData directory",
@ -239,6 +240,7 @@
"NoIssuesWithYourConfiguration": "No issues with your configuration",
"NoLeaveIt": "No, Leave It",
"NoLogFiles": "No log files",
"NoResultsFound": "No results found",
"NoSeasons": "No seasons",
"NoUpdatesAreAvailable": "No updates are available",
"NotSeasonPack": "Not Season Pack",
@ -356,6 +358,7 @@
"SizeOnDisk": "Size on disk",
"SkipRedownload": "Skip Redownload",
"SkipRedownloadHelpText": "Prevents Sonarr from trying to download an alternative release for this item",
"SomeResultsAreHiddenByTheAppliedFilter": "Some results are hidden by the applied filter",
"Source": "Source",
"SourceTitle": "Source Title",
"Special": "Special",