mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Translate frontend/AddSeries
This commit is contained in:
committed by
Mark McDowall
parent
f6c05d4456
commit
02b0710814
@@ -6,6 +6,7 @@ import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import PageContent from 'Components/Page/PageContent';
|
||||
import PageContentBody from 'Components/Page/PageContentBody';
|
||||
import { kinds } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import selectAll from 'Utilities/Table/selectAll';
|
||||
import toggleSelected from 'Utilities/Table/toggleSelected';
|
||||
import ImportSeriesFooterConnector from './ImportSeriesFooterConnector';
|
||||
@@ -97,7 +98,7 @@ class ImportSeries extends Component {
|
||||
} = this.state;
|
||||
|
||||
return (
|
||||
<PageContent title="Import Series">
|
||||
<PageContent title={translate('ImportSeries')}>
|
||||
<PageContentBody ref={this.scrollerRef} >
|
||||
{
|
||||
rootFoldersFetching ? <LoadingIndicator /> : null
|
||||
@@ -106,7 +107,7 @@ class ImportSeries extends Component {
|
||||
{
|
||||
!rootFoldersFetching && !!rootFoldersError ?
|
||||
<Alert kind={kinds.DANGER}>
|
||||
Unable to load root folders
|
||||
{translate('RootFoldersLoadError')}
|
||||
</Alert> :
|
||||
null
|
||||
}
|
||||
@@ -117,7 +118,7 @@ class ImportSeries extends Component {
|
||||
rootFoldersPopulated &&
|
||||
!unmappedFolders.length ?
|
||||
<Alert kind={kinds.INFO}>
|
||||
All series in {path} have been imported
|
||||
{translate('AllSeriesInRootFolderHaveBeenImported', { path })}
|
||||
</Alert> :
|
||||
null
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import PageContentFooter from 'Components/Page/PageContentFooter';
|
||||
import Popover from 'Components/Tooltip/Popover';
|
||||
import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './ImportSeriesFooter.css';
|
||||
|
||||
const MIXED = 'mixed';
|
||||
@@ -124,7 +125,7 @@ class ImportSeriesFooter extends Component {
|
||||
<PageContentFooter>
|
||||
<div className={styles.inputContainer}>
|
||||
<div className={styles.label}>
|
||||
Monitor
|
||||
{translate('Monitor')}
|
||||
</div>
|
||||
|
||||
<FormInputGroup
|
||||
@@ -139,7 +140,7 @@ class ImportSeriesFooter extends Component {
|
||||
|
||||
<div className={styles.inputContainer}>
|
||||
<div className={styles.label}>
|
||||
Quality Profile
|
||||
{translate('QualityProfile')}
|
||||
</div>
|
||||
|
||||
<FormInputGroup
|
||||
@@ -154,7 +155,7 @@ class ImportSeriesFooter extends Component {
|
||||
|
||||
<div className={styles.inputContainer}>
|
||||
<div className={styles.label}>
|
||||
Series Type
|
||||
{translate('SeriesType')}
|
||||
</div>
|
||||
|
||||
<FormInputGroup
|
||||
@@ -169,7 +170,7 @@ class ImportSeriesFooter extends Component {
|
||||
|
||||
<div className={styles.inputContainer}>
|
||||
<div className={styles.label}>
|
||||
Season Folder
|
||||
{translate('SeasonFolder')}
|
||||
</div>
|
||||
|
||||
<CheckInput
|
||||
@@ -193,7 +194,7 @@ class ImportSeriesFooter extends Component {
|
||||
isDisabled={!selectedCount || isLookingUpSeries}
|
||||
onPress={onImportPress}
|
||||
>
|
||||
Import {selectedCount} Series
|
||||
{translate('ImportCountSeries', { selectedCount })}
|
||||
</SpinnerButton>
|
||||
|
||||
{
|
||||
@@ -203,7 +204,7 @@ class ImportSeriesFooter extends Component {
|
||||
kind={kinds.WARNING}
|
||||
onPress={onCancelLookupPress}
|
||||
>
|
||||
Cancel Processing
|
||||
{translate('CancelProcessing')}
|
||||
</Button> :
|
||||
null
|
||||
}
|
||||
@@ -215,7 +216,7 @@ class ImportSeriesFooter extends Component {
|
||||
kind={kinds.SUCCESS}
|
||||
onPress={onLookupPress}
|
||||
>
|
||||
Start Processing
|
||||
{translate('StartProcessing')}
|
||||
</Button> :
|
||||
null
|
||||
}
|
||||
@@ -231,7 +232,7 @@ class ImportSeriesFooter extends Component {
|
||||
|
||||
{
|
||||
isLookingUpSeries ?
|
||||
'Processing Folders' :
|
||||
translate('ProcessingFolders') :
|
||||
null
|
||||
}
|
||||
|
||||
@@ -245,7 +246,7 @@ class ImportSeriesFooter extends Component {
|
||||
kind={kinds.WARNING}
|
||||
/>
|
||||
}
|
||||
title="Import Errors"
|
||||
title={translate('ImportErrors')}
|
||||
body={
|
||||
<ul>
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell';
|
||||
import VirtualTableSelectAllHeaderCell from 'Components/Table/VirtualTableSelectAllHeaderCell';
|
||||
import Popover from 'Components/Tooltip/Popover';
|
||||
import { icons, tooltipPositions } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './ImportSeriesHeader.css';
|
||||
|
||||
function ImportSeriesHeader(props) {
|
||||
@@ -29,14 +30,14 @@ function ImportSeriesHeader(props) {
|
||||
className={styles.folder}
|
||||
name="folder"
|
||||
>
|
||||
Folder
|
||||
{translate('Folder')}
|
||||
</VirtualTableHeaderCell>
|
||||
|
||||
<VirtualTableHeaderCell
|
||||
className={styles.monitor}
|
||||
name="monitor"
|
||||
>
|
||||
Monitor
|
||||
{translate('Monitor')}
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
@@ -45,7 +46,7 @@ function ImportSeriesHeader(props) {
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title="Monitoring Options"
|
||||
title={translate('MonitoringOptions')}
|
||||
body={<SeriesMonitoringOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
@@ -55,14 +56,14 @@ function ImportSeriesHeader(props) {
|
||||
className={styles.qualityProfile}
|
||||
name="qualityProfileId"
|
||||
>
|
||||
Quality Profile
|
||||
{translate('QualityProfile')}
|
||||
</VirtualTableHeaderCell>
|
||||
|
||||
<VirtualTableHeaderCell
|
||||
className={styles.seriesType}
|
||||
name="seriesType"
|
||||
>
|
||||
Series Type
|
||||
{translate('SeriesType')}
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
@@ -71,7 +72,7 @@ function ImportSeriesHeader(props) {
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title="Series Type"
|
||||
title={translate('SeriesType')}
|
||||
body={<SeriesTypePopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
@@ -81,14 +82,14 @@ function ImportSeriesHeader(props) {
|
||||
className={styles.seasonFolder}
|
||||
name="seasonFolder"
|
||||
>
|
||||
Season Folder
|
||||
{translate('SeasonFolder')}
|
||||
</VirtualTableHeaderCell>
|
||||
|
||||
<VirtualTableHeaderCell
|
||||
className={styles.series}
|
||||
name="series"
|
||||
>
|
||||
Series
|
||||
{translate('Series')}
|
||||
</VirtualTableHeaderCell>
|
||||
</VirtualTableHeader>
|
||||
);
|
||||
|
||||
@@ -34,7 +34,7 @@ function ImportSeriesSearchResult(props) {
|
||||
|
||||
<Link
|
||||
className={styles.tvdbLink}
|
||||
to={`http://www.thetvdb.com/?tab=series&id=${tvdbId}`}
|
||||
to={`https://www.thetvdb.com/?tab=series&id=${tvdbId}`}
|
||||
>
|
||||
<Icon
|
||||
className={styles.tvdbLinkIcon}
|
||||
|
||||
@@ -8,7 +8,8 @@ import Link from 'Components/Link/Link';
|
||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import Portal from 'Components/Portal';
|
||||
import { icons, kinds } from 'Helpers/Props';
|
||||
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
||||
import getUniqueElementId from 'Utilities/getUniqueElementId';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import ImportSeriesSearchResultConnector from './ImportSeriesSearchResultConnector';
|
||||
import ImportSeriesTitle from './ImportSeriesTitle';
|
||||
import styles from './ImportSeriesSelectSeries.css';
|
||||
@@ -23,8 +24,8 @@ class ImportSeriesSelectSeries extends Component {
|
||||
|
||||
this._seriesLookupTimeout = null;
|
||||
this._scheduleUpdate = null;
|
||||
this._buttonId = getUniqueElememtId();
|
||||
this._contentId = getUniqueElememtId();
|
||||
this._buttonId = getUniqueElementId();
|
||||
this._contentId = getUniqueElementId();
|
||||
|
||||
this.state = {
|
||||
term: props.id,
|
||||
@@ -174,7 +175,7 @@ class ImportSeriesSelectSeries extends Component {
|
||||
kind={kinds.WARNING}
|
||||
/>
|
||||
|
||||
No match found!
|
||||
{translate('NoMatchFound')}
|
||||
</div> :
|
||||
null
|
||||
}
|
||||
@@ -189,7 +190,7 @@ class ImportSeriesSelectSeries extends Component {
|
||||
kind={kinds.WARNING}
|
||||
/>
|
||||
|
||||
Search failed, please try again later.
|
||||
{translate('SearchFailedError')}
|
||||
</div> :
|
||||
null
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import Label from 'Components/Label';
|
||||
import { kinds } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './ImportSeriesTitle.css';
|
||||
|
||||
function ImportSeriesTitle(props) {
|
||||
@@ -38,7 +39,7 @@ function ImportSeriesTitle(props) {
|
||||
<Label
|
||||
kind={kinds.WARNING}
|
||||
>
|
||||
Existing
|
||||
{translate('Existing')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ import FileBrowserModal from 'Components/FileBrowser/FileBrowserModal';
|
||||
import Icon from 'Components/Icon';
|
||||
import Button from 'Components/Link/Button';
|
||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
||||
import PageContent from 'Components/Page/PageContent';
|
||||
import PageContentBody from 'Components/Page/PageContentBody';
|
||||
import { icons, kinds, sizes } from 'Helpers/Props';
|
||||
import RootFolders from 'RootFolder/RootFolders';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './ImportSeriesSelectFolder.css';
|
||||
|
||||
class ImportSeriesSelectFolder extends Component {
|
||||
@@ -55,9 +57,11 @@ class ImportSeriesSelectFolder extends Component {
|
||||
} = this.props;
|
||||
|
||||
const hasRootFolders = items.length > 0;
|
||||
const goodFolderExample = (isWindows) ? 'C:\\tv shows' : '/tv shows';
|
||||
const badFolderExample = (isWindows) ? 'C:\\tv shows\\the simpsons' : '/tv shows/the simpsons';
|
||||
|
||||
return (
|
||||
<PageContent title="Import Series">
|
||||
<PageContent title={translate('ImportSeries')}>
|
||||
<PageContentBody>
|
||||
{
|
||||
isFetching && !isPopulated ?
|
||||
@@ -67,7 +71,7 @@ class ImportSeriesSelectFolder extends Component {
|
||||
|
||||
{
|
||||
!isFetching && error ?
|
||||
<Alert kind={kinds.DANGER}>Unable to load root folders</Alert> :
|
||||
<Alert kind={kinds.DANGER}>{translate('RootFoldersLoadError')}</Alert> :
|
||||
null
|
||||
}
|
||||
|
||||
@@ -75,20 +79,20 @@ class ImportSeriesSelectFolder extends Component {
|
||||
!error && isPopulated &&
|
||||
<div>
|
||||
<div className={styles.header}>
|
||||
Import series you already have
|
||||
{translate('LibraryImportHeader')}
|
||||
</div>
|
||||
|
||||
<div className={styles.tips}>
|
||||
Some tips to ensure the import goes smoothly:
|
||||
{translate('LibraryImportTips')}
|
||||
<ul>
|
||||
<li className={styles.tip}>
|
||||
Make sure that your files include the quality in their filenames. eg. <span className={styles.code}>episode.s02e15.bluray.mkv</span>
|
||||
<InlineMarkdown data={translate('LibraryImportTipsQualityInFilename')} />
|
||||
</li>
|
||||
<li className={styles.tip}>
|
||||
Point Sonarr to the folder containing all of your tv shows, not a specific one. eg. <span className={styles.code}>"{isWindows ? 'C:\\tv shows' : '/tv shows'}"</span> and not <span className={styles.code}>"{isWindows ? 'C:\\tv shows\\the simpsons' : '/tv shows/the simpsons'}"</span> Additionally, each series must be in its own folder within the root/library folder.
|
||||
<InlineMarkdown data={translate('LibraryImportTipsUseRootFolder', { goodFolderExample, badFolderExample })} />
|
||||
</li>
|
||||
<li className={styles.tip}>
|
||||
Do not use for importing downloads from your download client, this is only for existing organized libraries, not unsorted files.
|
||||
{translate('LibraryImportTipsDontUseDownloadsFolder')}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -96,7 +100,7 @@ class ImportSeriesSelectFolder extends Component {
|
||||
{
|
||||
hasRootFolders ?
|
||||
<div className={styles.recentFolders}>
|
||||
<FieldSet legend="Root Folders">
|
||||
<FieldSet legend={translate('RootFolders')}>
|
||||
<RootFolders
|
||||
isFetching={isFetching}
|
||||
isPopulated={isPopulated}
|
||||
@@ -114,7 +118,7 @@ class ImportSeriesSelectFolder extends Component {
|
||||
className={styles.addErrorAlert}
|
||||
kind={kinds.DANGER}
|
||||
>
|
||||
Unable to add root folder
|
||||
{translate('RootFolderLoadError')}
|
||||
|
||||
<ul>
|
||||
{
|
||||
@@ -149,8 +153,8 @@ class ImportSeriesSelectFolder extends Component {
|
||||
/>
|
||||
{
|
||||
hasRootFolders ?
|
||||
'Choose another folder' :
|
||||
'Start Import'
|
||||
translate('ChooseAnotherFolder') :
|
||||
translate('StartImport')
|
||||
}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user