From 192edf169c70f44543c4e6843cac567bdbd91c59 Mon Sep 17 00:00:00 2001 From: Ewout van Mansom Date: Wed, 14 Sep 2022 18:27:50 +0200 Subject: Translate more strings in player stats --- client/src/assets/player/shared/stats/stats-card.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client/src/assets/player/shared') diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts index ed2910fa2..f23ae48be 100644 --- a/client/src/assets/player/shared/stats/stats-card.ts +++ b/client/src/assets/player/shared/stats/stats-card.ts @@ -260,12 +260,13 @@ class StatsCard extends Component { const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0) const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0) const pr = (window.devicePixelRatio || 1).toFixed(2) - const frames = `${vw}x${vh}*${pr} / ${videoQuality.droppedVideoFrames} dropped of ${videoQuality.totalVideoFrames}` - + const vp = `${vw}x${vh}*${pr}` + const { droppedVideoFrames, totalVideoFrames } = videoQuality + const frames = player.localize('{1} / {2} dropped of {3}', [ vp, droppedVideoFrames + '', totalVideoFrames + '' ]) const duration = player.duration() let volume = `${Math.round(player.volume() * 100)}` - if (player.muted()) volume += ' (muted)' + if (player.muted()) volume += player.localize(' (muted)') const networkActivity = playerNetworkInfo.downloadSpeed ? `${playerNetworkInfo.downloadSpeed} ⇓ / ${playerNetworkInfo.uploadSpeed} ⇑` @@ -274,8 +275,9 @@ class StatsCard extends Component { const totalTransferred = playerNetworkInfo.totalDownloaded ? `${playerNetworkInfo.totalDownloaded} ⇓ / ${playerNetworkInfo.totalUploaded} ⇑` : undefined + const { downloadedFromServer, downloadedFromPeers } = playerNetworkInfo const downloadBreakdown = playerNetworkInfo.downloadedFromServer - ? `${playerNetworkInfo.downloadedFromServer} from servers · ${playerNetworkInfo.downloadedFromPeers} from peers` + ? player.localize('{1} from servers · {2} from peers', [ downloadedFromServer, downloadedFromPeers ]) : undefined const bufferProgress = progress !== undefined -- cgit v1.2.3