mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 05:46:17 +00:00
feat: add new translation keys for network statistics in multiple languages
This commit is contained in:
@@ -414,7 +414,11 @@
|
||||
"resume_seeding": "Resume seeding",
|
||||
"options": "Manage",
|
||||
"extract": "Extract files",
|
||||
"extracting": "Extracting files…"
|
||||
"extracting": "Extracting files…",
|
||||
"network": "Network",
|
||||
"peak": "Peak",
|
||||
"seeds": "Seeds",
|
||||
"peers": "Peers"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Downloads path",
|
||||
|
||||
@@ -414,7 +414,11 @@
|
||||
"resume_seeding": "Continuar sembrando",
|
||||
"options": "Administrar",
|
||||
"extract": "Extraer archivos",
|
||||
"extracting": "Extrayendo archivos…"
|
||||
"extracting": "Extrayendo archivos…",
|
||||
"network": "Red",
|
||||
"peak": "Pico",
|
||||
"seeds": "Seeds",
|
||||
"peers": "Peers"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Ruta de descarga",
|
||||
|
||||
@@ -402,7 +402,11 @@
|
||||
"resume_seeding": "Semear",
|
||||
"options": "Gerenciar",
|
||||
"extract": "Extrair arquivos",
|
||||
"extracting": "Extraindo arquivos…"
|
||||
"extracting": "Extraindo arquivos…",
|
||||
"network": "Rede",
|
||||
"peak": "Pico",
|
||||
"seeds": "Seeds",
|
||||
"peers": "Peers"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Diretório dos downloads",
|
||||
|
||||
@@ -229,7 +229,13 @@
|
||||
"seeding": "A semear",
|
||||
"stop_seeding": "Parar de semear",
|
||||
"resume_seeding": "Semear",
|
||||
"options": "Opções"
|
||||
"options": "Opções",
|
||||
"extract": "Extrair ficheiros",
|
||||
"extracting": "A extrair ficheiros…",
|
||||
"network": "Rede",
|
||||
"peak": "Pico",
|
||||
"seeds": "Seeds",
|
||||
"peers": "Peers"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Local das transferências",
|
||||
|
||||
@@ -414,7 +414,11 @@
|
||||
"resume_seeding": "Продолжить раздачу",
|
||||
"options": "Управлять",
|
||||
"extract": "Распаковать файлы",
|
||||
"extracting": "Распаковка файлов…"
|
||||
"extracting": "Распаковка файлов…",
|
||||
"network": "Сеть",
|
||||
"peak": "Пик",
|
||||
"seeds": "Seeds",
|
||||
"peers": "Peers"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Путь загрузок",
|
||||
|
||||
@@ -358,7 +358,7 @@ function HeroDownloadView({
|
||||
</span>
|
||||
<div className="download-group__stat-content">
|
||||
<span className="download-group__stat-label">
|
||||
{t("network")}:
|
||||
{t("network")}
|
||||
</span>
|
||||
<span className="download-group__stat-value">
|
||||
{isGameDownloading ? formatSpeed(downloadSpeed) : "0 B/s"}
|
||||
@@ -371,37 +371,38 @@ function HeroDownloadView({
|
||||
<GraphIcon size={16} />
|
||||
</span>
|
||||
<div className="download-group__stat-content">
|
||||
<span className="download-group__stat-label">{t("peak")}:</span>
|
||||
<span className="download-group__stat-label">{t("peak")}</span>
|
||||
<span className="download-group__stat-value">
|
||||
{peakSpeed > 0 ? formatSpeed(peakSpeed) : "0 B/s"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{game.download?.downloader === Downloader.Torrent &&
|
||||
isGameDownloading &&
|
||||
lastPacket &&
|
||||
(lastPacket.numSeeds > 0 || lastPacket.numPeers > 0) && (
|
||||
<div className="download-group__stat-item">
|
||||
<div className="download-group__stat-content">
|
||||
<span className="download-group__stat-label">
|
||||
Seeds:{" "}
|
||||
<span className="download-group__stat-value">
|
||||
{lastPacket.numSeeds}
|
||||
</span>
|
||||
, Peers:{" "}
|
||||
<span className="download-group__stat-value">
|
||||
{lastPacket.numPeers}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{game.download?.downloader && (
|
||||
<div className="download-group__stat-item">
|
||||
<div className="download-group__stat-content">
|
||||
<div
|
||||
className="download-group__stat-content"
|
||||
style={{
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Badge>{DOWNLOADER_NAME[game.download.downloader]}</Badge>
|
||||
{game.download?.downloader === Downloader.Torrent &&
|
||||
isGameDownloading &&
|
||||
lastPacket &&
|
||||
(lastPacket.numSeeds > 0 || lastPacket.numPeers > 0) && (
|
||||
<span className="download-group__stat-label">
|
||||
{t("seeds")}{" "}
|
||||
<span className="download-group__stat-value">
|
||||
{lastPacket.numSeeds}
|
||||
</span>
|
||||
, {t("peers")}{" "}
|
||||
<span className="download-group__stat-value">
|
||||
{lastPacket.numPeers}
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -436,6 +437,7 @@ export function DownloadGroup({
|
||||
seedingStatus,
|
||||
}: Readonly<DownloadGroupProps>) {
|
||||
const { t } = useTranslation("downloads");
|
||||
const navigate = useNavigate();
|
||||
|
||||
const userPreferences = useAppSelector(
|
||||
(state) => state.userPreferences.value
|
||||
@@ -867,12 +869,36 @@ export function DownloadGroup({
|
||||
{downloadInfo.map(({ game, size, progress, isSeeding: seeding }) => {
|
||||
return (
|
||||
<li key={game.id} className="download-group__simple-card">
|
||||
<div className="download-group__simple-thumbnail">
|
||||
<button
|
||||
type="button"
|
||||
className="download-group__simple-thumbnail"
|
||||
onClick={() => navigate(buildGameDetailsPath(game))}
|
||||
style={{
|
||||
background: "none",
|
||||
border: "none",
|
||||
padding: 0,
|
||||
cursor: "pointer",
|
||||
}}
|
||||
>
|
||||
<img src={game.libraryImageUrl || ""} alt={game.title} />
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div className="download-group__simple-info">
|
||||
<h3 className="download-group__simple-title">{game.title}</h3>
|
||||
<button
|
||||
type="button"
|
||||
className="download-group__simple-title"
|
||||
onClick={() => navigate(buildGameDetailsPath(game))}
|
||||
style={{
|
||||
background: "none",
|
||||
border: "none",
|
||||
padding: 0,
|
||||
cursor: "pointer",
|
||||
textAlign: "left",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
{game.title}
|
||||
</button>
|
||||
<div className="download-group__simple-meta">
|
||||
<div className="download-group__simple-meta-row">
|
||||
<Badge>{DOWNLOADER_NAME[game.download!.downloader]}</Badge>
|
||||
|
||||
@@ -87,12 +87,16 @@ export function LibraryTab({
|
||||
|
||||
<ul className="profile-content__games-grid">
|
||||
{pinnedGames?.map((game) => (
|
||||
<li key={game.objectId} style={{ listStyle: "none" }}>
|
||||
<li
|
||||
key={game.objectId}
|
||||
style={{ listStyle: "none" }}
|
||||
className="user-library-game__wrapper"
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
>
|
||||
<UserLibraryGameCard
|
||||
game={game}
|
||||
statIndex={statsIndex}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
sortBy={sortBy}
|
||||
/>
|
||||
</li>
|
||||
@@ -134,6 +138,9 @@ export function LibraryTab({
|
||||
<motion.li
|
||||
key={`${sortBy}-${game.objectId}`}
|
||||
style={{ listStyle: "none" }}
|
||||
className="user-library-game__wrapper"
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
initial={
|
||||
isNewGame
|
||||
? { opacity: 0.5, y: 15, scale: 0.96 }
|
||||
@@ -160,8 +167,6 @@ export function LibraryTab({
|
||||
<UserLibraryGameCard
|
||||
game={game}
|
||||
statIndex={statsIndex}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
sortBy={sortBy}
|
||||
/>
|
||||
</motion.li>
|
||||
|
||||
@@ -25,16 +25,12 @@ import "./user-library-game-card.scss";
|
||||
interface UserLibraryGameCardProps {
|
||||
game: UserGame;
|
||||
statIndex: number;
|
||||
onMouseEnter: () => void;
|
||||
onMouseLeave: () => void;
|
||||
sortBy?: string;
|
||||
}
|
||||
|
||||
export function UserLibraryGameCard({
|
||||
game,
|
||||
statIndex,
|
||||
onMouseEnter,
|
||||
onMouseLeave,
|
||||
sortBy,
|
||||
}: UserLibraryGameCardProps) {
|
||||
const { userProfile, isMe, getUserLibraryGames } =
|
||||
@@ -130,17 +126,12 @@ export function UserLibraryGameCard({
|
||||
|
||||
return (
|
||||
<>
|
||||
<li
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className="user-library-game__wrapper"
|
||||
<button
|
||||
type="button"
|
||||
className="user-library-game__cover"
|
||||
onClick={() => navigate(buildUserGameDetailsPath(game))}
|
||||
title={isTooltipHovered ? undefined : game.title}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className="user-library-game__cover"
|
||||
onClick={() => navigate(buildUserGameDetailsPath(game))}
|
||||
>
|
||||
<div className="user-library-game__overlay">
|
||||
{isMe && (
|
||||
<div className="user-library-game__actions-container">
|
||||
@@ -251,8 +242,7 @@ export function UserLibraryGameCard({
|
||||
onError={() => setImageError(true)}
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
</li>
|
||||
</button>
|
||||
<Tooltip
|
||||
id={game.objectId}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user