1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-03-05 13:21:25 -05:00

Translate Frontend Parse modal

(cherry picked from commit c14fd2b4a3cc2d0b270c5abe02240b22632e34b5)

Closes #9051
This commit is contained in:
Stevie Robinson
2023-08-18 14:21:14 +02:00
committed by Bogdan
parent 15a4c3b742
commit 4c2fcef742
4 changed files with 26 additions and 18 deletions

View File

@@ -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 (
<PageContent title="Parse">
<PageContent title={translate('Parse')}>
<PageContentBody>
<div className={styles.inputContainer}>
<div className={styles.inputIconContainer}>
@@ -76,7 +77,7 @@ function Parse() {
{!isFetching && !!error ? (
<div className={styles.message}>
<div className={styles.helpText}>
Error parsing, please try again.
{translate('ParseModalErrorParsing')}
</div>
<div>{getErrorMessage(error)}</div>
</div>
@@ -84,7 +85,7 @@ function Parse() {
{!isFetching && title && !error && !item.parsedMovieInfo ? (
<div className={styles.message}>
Unable to parse the provided title, please try again.
{translate('ParseModalUnableToParse')}
</div>
) : null}
@@ -95,12 +96,9 @@ function Parse() {
{title ? null : (
<div className={styles.message}>
<div className={styles.helpText}>
Enter a release title in the input above
</div>
<div>
Radarr will attempt to parse the title and show you details about
it
{translate('ParseModalHelpText')}
</div>
<div>{translate('ParseModalHelpTextDetails')}</div>
</div>
)}
</PageContentBody>

View File

@@ -86,7 +86,7 @@ function ParseModalContent(props: ParseModalContentProps) {
{!isFetching && !!error ? (
<div className={styles.message}>
<div className={styles.helpText}>
Error parsing, please try again.
{translate('ParseModalErrorParsing')}
</div>
<div>{getErrorMessage(error)}</div>
</div>
@@ -94,7 +94,7 @@ function ParseModalContent(props: ParseModalContentProps) {
{!isFetching && title && !error && !item.parsedMovieInfo ? (
<div className={styles.message}>
Unable to parse the provided title, please try again.
{translate('ParseModalUnableToParse')}
</div>
) : null}
@@ -105,12 +105,9 @@ function ParseModalContent(props: ParseModalContentProps) {
{title ? null : (
<div className={styles.message}>
<div className={styles.helpText}>
Enter a release title in the input above
</div>
<div>
Radarr will attempt to parse the title and show you details about
it
{translate('ParseModalHelpText')}
</div>
<div>{translate('ParseModalHelpTextDetails')}</div>
</div>
)}
</ModalBody>

View File

@@ -98,7 +98,7 @@ function ParseResult(props: ParseResultProps) {
<ParseResultItem
title={translate('Repack')}
data={quality.revision.isRepack ? 'True' : '-'}
data={quality.revision.isRepack ? translate('True') : '-'}
/>
</div>
@@ -112,7 +112,7 @@ function ParseResult(props: ParseResultProps) {
<ParseResultItem
title={translate('Real')}
data={quality.revision.real ? 'True' : '-'}
data={quality.revision.real ? translate('True') : '-'}
/>
</div>
</div>
@@ -150,7 +150,13 @@ function ParseResult(props: ParseResultProps) {
<ParseResultItem
title={translate('CustomFormats')}
data={<MovieFormats formats={customFormats} />}
data={
customFormats?.length ? (
<MovieFormats formats={customFormats} />
) : (
'-'
)
}
/>
<ParseResultItem