mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
translate details view
This commit is contained in:
@@ -7,6 +7,7 @@ import axios from 'axios'
|
||||
import { viewedHost } from 'utils/Hosts'
|
||||
import { GETTING_INFO, IN_DB } from 'torrentStates'
|
||||
import CircularProgress from '@material-ui/core/CircularProgress'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useUpdateCache, useGetSettings } from './customHooks'
|
||||
import DialogHeader from './DialogHeader'
|
||||
@@ -44,6 +45,9 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
const [seasonAmount, setSeasonAmount] = useState(null)
|
||||
const [selectedSeason, setSelectedSeason] = useState()
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { t } = useTranslation()
|
||||
|
||||
const {
|
||||
poster,
|
||||
hash,
|
||||
@@ -115,7 +119,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
<>
|
||||
<DialogHeader
|
||||
onClose={closeDialog}
|
||||
title={isDetailedCacheView ? 'Detailed Cache View' : 'Torrent Details'}
|
||||
title={isDetailedCacheView ? t('DetailedCacheView') : t('TorrentDetails')}
|
||||
{...(isDetailedCacheView && { onBack: () => setIsDetailedCacheView(false) })}
|
||||
/>
|
||||
|
||||
@@ -171,7 +175,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
|
||||
<CacheSection>
|
||||
<SectionHeader>
|
||||
<SectionTitle mb={20}>Buffer</SectionTitle>
|
||||
<SectionTitle mb={20}>{t('Buffer')}</SectionTitle>
|
||||
{!settings?.PreloadBuffer && (
|
||||
<SectionSubName>Enable "Preload Buffer" in settings to change buffer size</SectionSubName>
|
||||
)}
|
||||
@@ -190,16 +194,16 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
size='large'
|
||||
onClick={() => setIsDetailedCacheView(true)}
|
||||
>
|
||||
Detailed cache view
|
||||
{t('DetailedCacheView')}
|
||||
</Button>
|
||||
</CacheSection>
|
||||
|
||||
<TorrentFilesSection>
|
||||
<SectionTitle mb={20}>Torrent Content</SectionTitle>
|
||||
<SectionTitle mb={20}>{t('TorrentContent')}</SectionTitle>
|
||||
|
||||
{seasonAmount?.length > 1 && (
|
||||
<>
|
||||
<SectionSubName mb={7}>Select Season</SectionSubName>
|
||||
<SectionSubName mb={7}>{t('SelectSeason')}</SectionSubName>
|
||||
<ButtonGroup style={{ marginBottom: '30px' }} color='primary'>
|
||||
{seasonAmount.map(season => (
|
||||
<Button
|
||||
@@ -212,7 +216,9 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
||||
))}
|
||||
</ButtonGroup>
|
||||
|
||||
<SectionTitle mb={20}>Season {selectedSeason}</SectionTitle>
|
||||
<SectionTitle mb={20}>
|
||||
{t('Season')} {selectedSeason}
|
||||
</SectionTitle>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user