From efca70438899c2f22e2be060011b58325e4f4705 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Tue, 15 Aug 2023 09:18:35 +0200 Subject: [PATCH] Translate Frontend InteractiveSearch --- .../InteractiveSearch/InteractiveSearch.js | 5 +-- .../InteractiveSearchRow.tsx | 15 +++---- .../SelectDownloadClientModalContent.tsx | 8 +++- .../SelectDownloadClientRow.tsx | 3 +- .../OverrideMatchModalContent.tsx | 20 +++++----- .../ReleaseSceneIndicator.tsx | 39 ++++++++++++------- src/NzbDrone.Core/Localization/Core/en.json | 23 +++++++++++ 7 files changed, 76 insertions(+), 37 deletions(-) diff --git a/frontend/src/InteractiveSearch/InteractiveSearch.js b/frontend/src/InteractiveSearch/InteractiveSearch.js index 467cc9258..b852f82c7 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearch.js +++ b/frontend/src/InteractiveSearch/InteractiveSearch.js @@ -139,10 +139,9 @@ function InteractiveSearch(props) { { errorMessage ? - Search failed because its {errorMessage.charAt(0).toLowerCase() + errorMessage.slice(1)}. - Try refreshing the series info and verify the necessary information is present before searching again + {translate('InteractiveSearchResultsFailedErrorMessage', { message: errorMessage.charAt(0).toLowerCase() + errorMessage.slice(1) })} : - 'Unable to load results for this episode search. Try again later' + translate('EpisodeSearchResultsLoadError') } : null diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx index ff4fd7490..cf65ac3a2 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx @@ -20,6 +20,7 @@ import formatDateTime from 'Utilities/Date/formatDateTime'; import formatAge from 'Utilities/Number/formatAge'; import formatBytes from 'Utilities/Number/formatBytes'; import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore'; +import translate from 'Utilities/String/translate'; import OverrideMatchModal from './OverrideMatch/OverrideMatchModal'; import Peers from './Peers'; import ReleaseEpisode from './ReleaseEpisode'; @@ -62,12 +63,12 @@ function getDownloadTooltip( if (isGrabbing) { return ''; } else if (isGrabbed) { - return 'Added to download queue'; + return translate('AddToDownloadQueue'); } else if (grabError) { return grabError; } - return 'Add to download queue'; + return translate('AddedToDownloadQueue'); } interface InteractiveSearchRowProps { @@ -261,7 +262,7 @@ function InteractiveSearchRow(props: InteractiveSearchRowProps) { {rejections.length ? ( } - title="Release Rejected" + title={translate('ReleaseRejected')} body={