From c14fd2b4a3cc2d0b270c5abe02240b22632e34b5 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Fri, 18 Aug 2023 14:21:14 +0200 Subject: [PATCH] Translate Frontend Parse modal --- frontend/src/Parse/Parse.tsx | 14 ++++++------- frontend/src/Parse/ParseModalContent.tsx | 11 ++++------- frontend/src/Parse/ParseResult.tsx | 22 +++++++++++++-------- src/NzbDrone.Core/Localization/Core/en.json | 7 +++++++ 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/frontend/src/Parse/Parse.tsx b/frontend/src/Parse/Parse.tsx index e14babdbf..7c9120edd 100644 --- a/frontend/src/Parse/Parse.tsx +++ b/frontend/src/Parse/Parse.tsx @@ -9,6 +9,7 @@ import PageContentBody from 'Components/Page/PageContentBody'; import { icons } from 'Helpers/Props'; import { clear, fetch } from 'Store/Actions/parseActions'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; +import translate from 'Utilities/String/translate'; import ParseResult from './ParseResult'; import parseStateSelector from './parseStateSelector'; import styles from './Parse.css'; @@ -50,7 +51,7 @@ function Parse() { ); return ( - +
@@ -76,7 +77,7 @@ function Parse() { {!isFetching && !!error ? (
- Error parsing, please try again. + {translate('ParseModalErrorParsing')}
{getErrorMessage(error)}
@@ -84,7 +85,7 @@ function Parse() { {!isFetching && title && !error && !item.parsedEpisodeInfo ? (
- Unable to parse the provided title, please try again. + {translate('ParseModalUnableToParse')}
) : null} @@ -95,12 +96,9 @@ function Parse() { {title ? null : (
- Enter a release title in the input above -
-
- Sonarr will attempt to parse the title and show you details about - it + {translate('ParseModalHelpText')}
+
{translate('ParseModalHelpTextDetails')}
)} diff --git a/frontend/src/Parse/ParseModalContent.tsx b/frontend/src/Parse/ParseModalContent.tsx index cdff08376..80a91fe49 100644 --- a/frontend/src/Parse/ParseModalContent.tsx +++ b/frontend/src/Parse/ParseModalContent.tsx @@ -86,7 +86,7 @@ function ParseModalContent(props: ParseModalContentProps) { {!isFetching && !!error ? (
- Error parsing, please try again. + {translate('ParseModalErrorParsing')}
{getErrorMessage(error)}
@@ -94,7 +94,7 @@ function ParseModalContent(props: ParseModalContentProps) { {!isFetching && title && !error && !item.parsedEpisodeInfo ? (
- Unable to parse the provided title, please try again. + {translate('ParseModalUnableToParse')}
) : null} @@ -105,12 +105,9 @@ function ParseModalContent(props: ParseModalContentProps) { {title ? null : (
- Enter a release title in the input above -
-
- Sonarr will attempt to parse the title and show you details about - it + {translate('ParseModalHelpText')}
+
{translate('ParseModalHelpTextDetails')}
)} diff --git a/frontend/src/Parse/ParseResult.tsx b/frontend/src/Parse/ParseResult.tsx index e5dafc240..d8d6b5220 100644 --- a/frontend/src/Parse/ParseResult.tsx +++ b/frontend/src/Parse/ParseResult.tsx @@ -117,22 +117,22 @@ function ParseResult(props: ParseResultProps) {
@@ -149,14 +149,14 @@ function ParseResult(props: ParseResultProps) { title={translate('Proper')} data={ quality.revision.version > 1 && !quality.revision.isRepack - ? 'True' + ? translate('True') : '-' } />
@@ -170,7 +170,7 @@ function ParseResult(props: ParseResultProps) { @@ -228,7 +228,13 @@ function ParseResult(props: ParseResultProps) { } + data={ + customFormats && customFormats.length > 0 ? ( + + ) : ( + '-' + ) + } />