diff --git a/public/locales/de/modules/downloads-module.json b/public/locales/de/modules/downloads-module.json index 3578c0b93..5beba90a4 100644 --- a/public/locales/de/modules/downloads-module.json +++ b/public/locales/de/modules/downloads-module.json @@ -13,6 +13,14 @@ "nothingFound": "Keine Torrents gefunden" } }, + "lineChart": { + "title": "Derzeitige Download Geschwindigkeit", + "download": "Download: {{download}}", + "upload": "Upload: {{upload}}", + "timeSpan": "{{seconds}} Sekunden zuvor", + "totalDownload": "Download: {{download}}/s", + "totalUpload": "Upload: {{upload}}/s" + }, "errors": { "noDownloadClients": { "title": "Keine unterstützten Download Clients gefunden", diff --git a/public/locales/en/modules/downloads-module.json b/public/locales/en/modules/downloads-module.json index 80528f56f..1158423e2 100644 --- a/public/locales/en/modules/downloads-module.json +++ b/public/locales/en/modules/downloads-module.json @@ -13,6 +13,14 @@ "nothingFound": "No torrents found" } }, + "lineChart": { + "title": "Current download speed", + "download": "Download: {{download}}", + "upload": "Upload: {{upload}}", + "timeSpan": "{{seconds}} seconds ago", + "totalDownload": "Download: {{download}}/s", + "totalUpload": "Upload: {{upload}}/s" + }, "errors": { "noDownloadClients": { "title": "No supported download clients found!", diff --git a/src/modules/downloads/TotalDownloadsModule.tsx b/src/modules/downloads/TotalDownloadsModule.tsx index dd277e574..88c6aabea 100644 --- a/src/modules/downloads/TotalDownloadsModule.tsx +++ b/src/modules/downloads/TotalDownloadsModule.tsx @@ -4,6 +4,7 @@ import { useEffect, useState } from 'react'; import axios from 'axios'; import { NormalizedTorrent } from '@ctrl/shared-torrent'; import { linearGradientDef } from '@nivo/core'; +import { useTranslation } from 'next-i18next'; import { Datum, ResponsiveLine } from '@nivo/line'; import { useListState } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; @@ -12,7 +13,6 @@ import { useConfig } from '../../tools/state'; import { humanFileSize } from '../../tools/humanFileSize'; import { IModule } from '../ModuleTypes'; import { useSetSafeInterval } from '../../tools/hooks/useSetSafeInterval'; -import { useTranslation } from 'next-i18next'; export const TotalDownloadsModule: IModule = { title: 'Download Speed', @@ -109,15 +109,19 @@ export default function TotalDownloadsComponent() { return ( - Current download speed + {t('card.lineChart.title')} - Download: {humanFileSize(totalDownloadSpeed)}/s + + {t('card.lineChart.totalDownload', { download: humanFileSize(totalDownloadSpeed) })} + - Upload: {humanFileSize(totalUploadSpeed)}/s + + {t('card.lineChart.totalUpload', { upload: humanFileSize(totalUploadSpeed) })} + - {roundedSeconds} seconds ago + {t('card.lineChart.timeSpan', { seconds: roundedSeconds })} - Download: {humanFileSize(Download)} + + {t('card.lineChart.download', { download: humanFileSize(Download) })} + - Upload: {humanFileSize(Upload)} + + {t('card.lineChart.upload', { upload: humanFileSize(Upload) })} +