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