mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 22:17:15 -04:00
Translate Frontend Parse modal
(cherry picked from commit c14fd2b4a3cc2d0b270c5abe02240b22632e34b5) Closes #9051
This commit is contained in:
parent
15a4c3b742
commit
4c2fcef742
4 changed files with 26 additions and 18 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -388,6 +388,7 @@
|
|||
"FailedLoadingSearchResults": "Failed to load search results, please try again.",
|
||||
"FailedToLoadMovieFromAPI": "Failed to load movie from API",
|
||||
"FailedToLoadQueue": "Failed to load Queue",
|
||||
"False": "False",
|
||||
"FeatureRequests": "Feature Requests",
|
||||
"File": "File",
|
||||
"FileDateHelpText": "Change file date on import/rescan",
|
||||
|
@ -769,6 +770,11 @@
|
|||
"PackageVersion": "Package Version",
|
||||
"PageSize": "Page Size",
|
||||
"PageSizeHelpText": "Number of items to show on each page",
|
||||
"Parse": "Parse",
|
||||
"ParseModalErrorParsing": "Error parsing, please try again.",
|
||||
"ParseModalHelpText": "Enter a release title in the input above",
|
||||
"ParseModalHelpTextDetails": "Radarr will attempt to parse the title and show you details about it",
|
||||
"ParseModalUnableToParse": "Unable to parse the provided title, please try again.",
|
||||
"Password": "Password",
|
||||
"Path": "Path",
|
||||
"Paused": "Paused",
|
||||
|
@ -1163,6 +1169,7 @@
|
|||
"Trailer": "Trailer",
|
||||
"Trakt": "Trakt",
|
||||
"Trigger": "Trigger",
|
||||
"True": "True",
|
||||
"Type": "Type",
|
||||
"UI": "UI",
|
||||
"UILanguage": "UI Language",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue