Translate Frontend Parse modal
This commit is contained in:
parent
2166e4dce4
commit
c14fd2b4a3
|
@ -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.parsedEpisodeInfo ? (
|
||||
<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>
|
||||
Sonarr 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.parsedEpisodeInfo ? (
|
||||
<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>
|
||||
Sonarr will attempt to parse the title and show you details about
|
||||
it
|
||||
{translate('ParseModalHelpText')}
|
||||
</div>
|
||||
<div>{translate('ParseModalHelpTextDetails')}</div>
|
||||
</div>
|
||||
)}
|
||||
</ModalBody>
|
||||
|
|
|
@ -117,22 +117,22 @@ function ParseResult(props: ParseResultProps) {
|
|||
<div className={styles.column}>
|
||||
<ParseResultItem
|
||||
title={translate('Special')}
|
||||
data={special ? 'True' : 'False'}
|
||||
data={special ? translate('True') : translate('False')}
|
||||
/>
|
||||
|
||||
<ParseResultItem
|
||||
title={translate('FullSeason')}
|
||||
data={fullSeason ? 'True' : 'False'}
|
||||
data={fullSeason ? translate('True') : translate('False')}
|
||||
/>
|
||||
|
||||
<ParseResultItem
|
||||
title={translate('MultiSeason')}
|
||||
data={isMultiSeason ? 'True' : 'False'}
|
||||
data={isMultiSeason ? translate('True') : translate('False')}
|
||||
/>
|
||||
|
||||
<ParseResultItem
|
||||
title={translate('PartialSeason')}
|
||||
data={isPartialSeason ? 'True' : 'False'}
|
||||
data={isPartialSeason ? translate('True') : translate('False')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -149,14 +149,14 @@ function ParseResult(props: ParseResultProps) {
|
|||
title={translate('Proper')}
|
||||
data={
|
||||
quality.revision.version > 1 && !quality.revision.isRepack
|
||||
? 'True'
|
||||
? translate('True')
|
||||
: '-'
|
||||
}
|
||||
/>
|
||||
|
||||
<ParseResultItem
|
||||
title={translate('Repack')}
|
||||
data={quality.revision.isRepack ? 'True' : '-'}
|
||||
data={quality.revision.isRepack ? translate('True') : '-'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -170,7 +170,7 @@ function ParseResult(props: ParseResultProps) {
|
|||
|
||||
<ParseResultItem
|
||||
title={translate('Real')}
|
||||
data={quality.revision.real ? 'True' : '-'}
|
||||
data={quality.revision.real ? translate('True') : '-'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -228,7 +228,13 @@ function ParseResult(props: ParseResultProps) {
|
|||
|
||||
<ParseResultItem
|
||||
title={translate('CustomFormats')}
|
||||
data={<EpisodeFormats formats={customFormats} />}
|
||||
data={
|
||||
customFormats && customFormats.length > 0 ? (
|
||||
<EpisodeFormats formats={customFormats} />
|
||||
) : (
|
||||
'-'
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
||||
<ParseResultItem
|
||||
|
|
|
@ -447,6 +447,7 @@
|
|||
"FailedToLoadTranslationsFromApi": "Failed to load translations from API",
|
||||
"FailedToLoadUiSettingsFromApi": "Failed to load UI settings from API",
|
||||
"FailedToUpdateSettings": "Failed to update settings",
|
||||
"False": "False",
|
||||
"FeatureRequests": "Feature Requests",
|
||||
"File": "File",
|
||||
"FileBrowser": "File Browser",
|
||||
|
@ -829,6 +830,11 @@
|
|||
"OverrideGrabNoSeries": "Series must be selected",
|
||||
"PackageVersion": "Package Version",
|
||||
"PackageVersionInfo": "{packageVersion} by {packageAuthor}",
|
||||
"Parse": "Parse",
|
||||
"ParseModalErrorParsing": "Error parsing, please try again.",
|
||||
"ParseModalHelpText": "Enter a release title in the input above",
|
||||
"ParseModalHelpTextDetails": "Sonarr will attempt to parse the title and show you details about it",
|
||||
"ParseModalUnableToParse": "Unable to parse the provided title, please try again.",
|
||||
"PartialSeason": "Partial Season",
|
||||
"Password": "Password",
|
||||
"Path": "Path",
|
||||
|
@ -1212,6 +1218,7 @@
|
|||
"TotalRecords": "Total records: {totalRecords}",
|
||||
"TotalSpace": "Total Space",
|
||||
"Trace": "Trace",
|
||||
"True": "True",
|
||||
"TvdbId": "TVDB ID",
|
||||
"TvdbIdExcludeHelpText": "The TVDB ID of the series to exclude",
|
||||
"Twitter": "Twitter",
|
||||
|
|
Loading…
Reference in New Issue