diff --git a/public/locales/en/modules/torrents-status.json b/public/locales/en/modules/torrents-status.json index f06dd625b..ac5fced4a 100644 --- a/public/locales/en/modules/torrents-status.json +++ b/public/locales/en/modules/torrents-status.json @@ -29,6 +29,9 @@ "estimatedTimeOfArrival": "ETA", "progress": "Progress" }, + "item": { + "text": "Managed by {{appName}}, {{ratio}} ratio" + }, "body": { "nothingFound": "No torrents found" } @@ -61,6 +64,7 @@ "progress": "Progress - {{progress}}%", "totalSelectedSize": "Total - {{totalSize}}", "state": "State - {{state}}", + "ratio": "Ratio -", "completed": "Completed" } } diff --git a/src/widgets/torrent/TorrentQueueItem.tsx b/src/widgets/torrent/TorrentQueueItem.tsx index 0909f706c..460e7aa80 100644 --- a/src/widgets/torrent/TorrentQueueItem.tsx +++ b/src/widgets/torrent/TorrentQueueItem.tsx @@ -38,6 +38,7 @@ export const BitTorrrentQueueItem = ({ torrent, app }: TorrentQueueItemProps) => const [popoverOpened, { open: openPopover, close: closePopover }] = useDisclosure(false); const MIN_WIDTH_MOBILE = useMantineTheme().breakpoints.xs; const { width } = useElementSize(); + const { t } = useTranslation('modules/torrents-status'); const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; @@ -45,13 +46,7 @@ export const BitTorrrentQueueItem = ({ torrent, app }: TorrentQueueItemProps) => return ( - + @@ -68,7 +63,10 @@ export const BitTorrrentQueueItem = ({ torrent, app }: TorrentQueueItemProps) => {app && ( - Managed by {app.name}, {torrent.ratio.toFixed(2)} ratio + {t('card.table.item.text', { + appName: app.name, + ratio: torrent.ratio.toFixed(2), + })} )} @@ -125,7 +123,7 @@ const TorrentQueuePopover = ({ torrent, app }: TorrentQueueItemProps) => { return ( - Ratio - + {t('card.popover.metrics.ratio')} {torrent.ratio.toFixed(2)} @@ -188,7 +186,6 @@ const TorrentQueuePopover = ({ torrent, app }: TorrentQueueItemProps) => { }> {humanFileSize(torrent.totalDownloaded)} - {humanFileSize(torrent.totalUploaded)} @@ -200,18 +197,14 @@ const TorrentQueuePopover = ({ torrent, app }: TorrentQueueItemProps) => { })} - {(torrent.label || torrent.isCompleted) && ( - - - {torrent.label && {torrent.label}} - {torrent.isCompleted && ( - - {t('card.popover.metrics.completed')} - - )} - - - )} + + {torrent.label && {torrent.label}} + {torrent.isCompleted && ( + + {t('card.popover.metrics.completed')} + + )} + );