mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
translate widgets
This commit is contained in:
@@ -8,61 +8,81 @@ import {
|
|||||||
Build as BuildIcon,
|
Build as BuildIcon,
|
||||||
} from '@material-ui/icons'
|
} from '@material-ui/icons'
|
||||||
import { getPeerString, humanizeSize } from 'utils/Utils'
|
import { getPeerString, humanizeSize } from 'utils/Utils'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
import StatisticsField from './StatisticsField'
|
import StatisticsField from './StatisticsField'
|
||||||
|
|
||||||
export const DownlodSpeedWidget = ({ data }) => (
|
export const DownlodSpeedWidget = ({ data }) => {
|
||||||
<StatisticsField
|
const { t } = useTranslation()
|
||||||
title='Download speed'
|
return (
|
||||||
value={humanizeSize(data) || '0 B'}
|
<StatisticsField
|
||||||
iconBg='#118f00'
|
title={t('DownloadSpeed')}
|
||||||
valueBg='#13a300'
|
value={humanizeSize(data) || '0 B'}
|
||||||
icon={ArrowDownwardIcon}
|
iconBg='#118f00'
|
||||||
/>
|
valueBg='#13a300'
|
||||||
)
|
icon={ArrowDownwardIcon}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const UploadSpeedWidget = ({ data }) => (
|
export const UploadSpeedWidget = ({ data }) => {
|
||||||
<StatisticsField
|
const { t } = useTranslation()
|
||||||
title='Upload speed'
|
return (
|
||||||
value={humanizeSize(data) || '0 B'}
|
<StatisticsField
|
||||||
iconBg='#0146ad'
|
title={t('UploadSpeed')}
|
||||||
valueBg='#0058db'
|
value={humanizeSize(data) || '0 B'}
|
||||||
icon={ArrowUpwardIcon}
|
iconBg='#0146ad'
|
||||||
/>
|
valueBg='#0058db'
|
||||||
)
|
icon={ArrowUpwardIcon}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const PeersWidget = ({ data }) => (
|
export const PeersWidget = ({ data }) => {
|
||||||
<StatisticsField
|
const { t } = useTranslation()
|
||||||
title='Peers'
|
return (
|
||||||
value={getPeerString(data) || '[0] 0 / 0'}
|
<StatisticsField
|
||||||
iconBg='#cdc118'
|
title={t('Peers')}
|
||||||
valueBg='#d8cb18'
|
value={getPeerString(data) || '[0] 0 / 0'}
|
||||||
icon={SwapVerticalCircleIcon}
|
iconBg='#cdc118'
|
||||||
/>
|
valueBg='#d8cb18'
|
||||||
)
|
icon={SwapVerticalCircleIcon}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const PiecesCountWidget = ({ data }) => (
|
export const PiecesCountWidget = ({ data }) => {
|
||||||
<StatisticsField title='Pieces count' value={data} iconBg='#b6c95e' valueBg='#c0d076' icon={WidgetsIcon} />
|
const { t } = useTranslation()
|
||||||
)
|
return <StatisticsField title={t('PiecesCount')} value={data} iconBg='#b6c95e' valueBg='#c0d076' icon={WidgetsIcon} />
|
||||||
export const PiecesLengthWidget = ({ data }) => (
|
}
|
||||||
<StatisticsField
|
|
||||||
title='Pieces length'
|
|
||||||
value={humanizeSize(data)}
|
|
||||||
iconBg='#0982c8'
|
|
||||||
valueBg='#098cd7'
|
|
||||||
icon={PhotoSizeSelectSmallIcon}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
export const StatusWidget = ({ data }) => (
|
|
||||||
<StatisticsField title='Torrent status' value={data} iconBg='#aea25b' valueBg='#b4aa6e' icon={BuildIcon} />
|
|
||||||
)
|
|
||||||
|
|
||||||
export const SizeWidget = ({ data }) => (
|
export const PiecesLengthWidget = ({ data }) => {
|
||||||
<StatisticsField
|
const { t } = useTranslation()
|
||||||
title='Torrent size'
|
return (
|
||||||
value={humanizeSize(data)}
|
<StatisticsField
|
||||||
iconBg='#9b01ad'
|
title={t('PiecesLength')}
|
||||||
valueBg='#ac03bf'
|
value={humanizeSize(data)}
|
||||||
icon={ViewAgendaIcon}
|
iconBg='#0982c8'
|
||||||
/>
|
valueBg='#098cd7'
|
||||||
)
|
icon={PhotoSizeSelectSmallIcon}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const StatusWidget = ({ data }) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
return <StatisticsField title={t('TorrentStatus')} value={data} iconBg='#aea25b' valueBg='#b4aa6e' icon={BuildIcon} />
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SizeWidget = ({ data }) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
return (
|
||||||
|
<StatisticsField
|
||||||
|
title={t('TorrentSize')}
|
||||||
|
value={humanizeSize(data)}
|
||||||
|
iconBg='#9b01ad'
|
||||||
|
valueBg='#ac03bf'
|
||||||
|
icon={ViewAgendaIcon}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
"DontAddRetrackers": "Don't add retrackers",
|
"DontAddRetrackers": "Don't add retrackers",
|
||||||
"DownloadPlaylist": "Download Playlist",
|
"DownloadPlaylist": "Download Playlist",
|
||||||
"DownloadRateLimit": "Download Rate Limit (Kilobytes)",
|
"DownloadRateLimit": "Download Rate Limit (Kilobytes)",
|
||||||
|
"DownloadSpeed": "Download speed",
|
||||||
"Drop": "Drop",
|
"Drop": "Drop",
|
||||||
"DropTorrent": "Reset Torrent",
|
"DropTorrent": "Reset Torrent",
|
||||||
"EnableIPv6": "IPv6",
|
"EnableIPv6": "IPv6",
|
||||||
@@ -44,6 +45,8 @@
|
|||||||
"Peers": "Peers",
|
"Peers": "Peers",
|
||||||
"PeersListenPort": "Peers Listen Port",
|
"PeersListenPort": "Peers Listen Port",
|
||||||
"PEX": "PEX (Peer Exchange)",
|
"PEX": "PEX (Peer Exchange)",
|
||||||
|
"PiecesCount": "Pieces count",
|
||||||
|
"PiecesLength": "Pieces length",
|
||||||
"PlaylistAll": "Playlist All",
|
"PlaylistAll": "Playlist All",
|
||||||
"Poster": "Poster",
|
"Poster": "Poster",
|
||||||
"Preload": "Preload",
|
"Preload": "Preload",
|
||||||
@@ -70,11 +73,14 @@
|
|||||||
"TorrentContent": "Torrent Content",
|
"TorrentContent": "Torrent Content",
|
||||||
"TorrentDetails": "Torrent Details",
|
"TorrentDetails": "Torrent Details",
|
||||||
"TorrentDisconnectTimeout": "Torrent Disconnect Timeout",
|
"TorrentDisconnectTimeout": "Torrent Disconnect Timeout",
|
||||||
|
"TorrentSize": "Torrent size",
|
||||||
"TorrentsSavePath": "Torrents Save Path",
|
"TorrentsSavePath": "Torrents Save Path",
|
||||||
"TorrentState": "Torrent State",
|
"TorrentState": "Torrent State",
|
||||||
|
"TorrentStatus": "Torrent Status",
|
||||||
"Upload": "Upload (not recommended to disable)",
|
"Upload": "Upload (not recommended to disable)",
|
||||||
"UploadFile": "Upload File",
|
"UploadFile": "Upload File",
|
||||||
"UploadRateLimit": "Upload Rate Limit (Kilobytes)",
|
"UploadRateLimit": "Upload Rate Limit (Kilobytes)",
|
||||||
|
"UploadSpeed": "Upload speed",
|
||||||
"UPNP": "UPnP (Universal Plug and Play)",
|
"UPNP": "UPnP (Universal Plug and Play)",
|
||||||
"UseDisk": "Use Disk",
|
"UseDisk": "Use Disk",
|
||||||
"UTP": "μTP (Micro Transport Protocol)",
|
"UTP": "μTP (Micro Transport Protocol)",
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
"DontAddRetrackers": "Ничего не делать",
|
"DontAddRetrackers": "Ничего не делать",
|
||||||
"DownloadPlaylist": "Скачать плейлист",
|
"DownloadPlaylist": "Скачать плейлист",
|
||||||
"DownloadRateLimit": "Ограничение скорости загрузки (Килобайты)",
|
"DownloadRateLimit": "Ограничение скорости загрузки (Килобайты)",
|
||||||
|
"DownloadSpeed": "Скорость загрузки",
|
||||||
"Drop": "Сброс",
|
"Drop": "Сброс",
|
||||||
"DropTorrent": "Сбросить торрент",
|
"DropTorrent": "Сбросить торрент",
|
||||||
"EnableIPv6": "IPv6",
|
"EnableIPv6": "IPv6",
|
||||||
@@ -44,6 +45,8 @@
|
|||||||
"Peers": "Подкл./Пиры",
|
"Peers": "Подкл./Пиры",
|
||||||
"PeersListenPort": "Порт для входящих подключений",
|
"PeersListenPort": "Порт для входящих подключений",
|
||||||
"PEX": "PEX (Peer Exchange)",
|
"PEX": "PEX (Peer Exchange)",
|
||||||
|
"PiecesCount": "Кол-во блоков",
|
||||||
|
"PiecesLength": "Размер блока",
|
||||||
"PlaylistAll": "Плейлист всех",
|
"PlaylistAll": "Плейлист всех",
|
||||||
"Poster": "Постер",
|
"Poster": "Постер",
|
||||||
"Preload": "Предзагр.",
|
"Preload": "Предзагр.",
|
||||||
@@ -70,11 +73,14 @@
|
|||||||
"TorrentContent": "Содержимое торрента",
|
"TorrentContent": "Содержимое торрента",
|
||||||
"TorrentDetails": "Информация о торренте",
|
"TorrentDetails": "Информация о торренте",
|
||||||
"TorrentDisconnectTimeout": "Тайм-аут отключения торрента (секунды)",
|
"TorrentDisconnectTimeout": "Тайм-аут отключения торрента (секунды)",
|
||||||
|
"TorrentSize": "Размер торрента",
|
||||||
"TorrentsSavePath": "Путь хранения кеша",
|
"TorrentsSavePath": "Путь хранения кеша",
|
||||||
"TorrentState": "Данные торрента",
|
"TorrentState": "Данные торрента",
|
||||||
|
"TorrentStatus": "Состояние",
|
||||||
"Upload": "Отдача (не рекомендуется отключать)",
|
"Upload": "Отдача (не рекомендуется отключать)",
|
||||||
"UploadFile": "Загрузить файл",
|
"UploadFile": "Загрузить файл",
|
||||||
"UploadRateLimit": "Ограничение скорости отдачи (Килобайты)",
|
"UploadRateLimit": "Ограничение скорости отдачи (Килобайты)",
|
||||||
|
"UploadSpeed": "Скорость отдачи",
|
||||||
"UPNP": "UPnP (Universal Plug and Play)",
|
"UPNP": "UPnP (Universal Plug and Play)",
|
||||||
"UseDisk": "Использовать кеш на диске",
|
"UseDisk": "Использовать кеш на диске",
|
||||||
"UTP": "μTP (Micro Transport Protocol)",
|
"UTP": "μTP (Micro Transport Protocol)",
|
||||||
|
|||||||
Reference in New Issue
Block a user