Skip to content

Commit b1cfa5d

Browse files
authored
Merge pull request #484 from tppadn/activity-monitor-translation
Fixes translations in activity monitor settings
2 parents 8232081 + d2f4481 commit b1cfa5d

4 files changed

Lines changed: 29 additions & 22 deletions

File tree

public/locales/de-DE/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@
225225
"POLLING_INFO": "Das System passt das Abfrageintervall automatisch an: schneller, wenn Benutzer Inhalte ansehen, langsamer, wenn der Server im Leerlauf ist. Dadurch wird die CPU-Auslastung Ihres Jellyfin-Servers reduziert.",
226226
"INTERVAL_WARNING": "Das Intervall für aktive Sitzungen sollte nicht größer sein als das Intervall im Leerlauf.",
227227
"REALTIME_UPDATE_INFO": "Änderungen werden ohne Neustart des Servers übernommen.",
228+
"ACTIVITY_MONITOR_SETTINGS_SUCCESS": "Aktivitätsmonitor-Einstellungen erfolgreich aktualisiert",
229+
"ACTIVITY_MONITOR_SETTINGS_ERROR": "Fehler beim Aktualisieren der Aktivitätsmonitor-Einstellungen",
228230
"SELECT_LIBRARIES_TO_IMPORT": "Zu importierende Bibliotheken auswählen",
229231
"SELECT_LIBRARIES_TO_IMPORT_TOOLTIP": "Aktivitäten für Elemente innerhalb dieser Bibliotheken werden weiterhin verfolgt - auch wenn sie nicht importiert wurden.",
230232
"DATE_ADDED": "Hinzugefügt am",

public/locales/en-GB/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@
225225
"POLLING_INFO": "The system automatically adapts monitoring frequency: fast when users are watching content, slower when the server is idle. This reduces CPU load on your Jellyfin server.",
226226
"INTERVAL_WARNING": "Active sessions interval should not be greater than idle interval",
227227
"REALTIME_UPDATE_INFO": "Changes are applied in real-time without server restart.",
228+
"ACTIVITY_MONITOR_SETTINGS_SUCCESS": "Activity Monitor settings updated successfully",
229+
"ACTIVITY_MONITOR_SETTINGS_ERROR": "Error updating Activity Monitor settings",
228230
"SELECT_LIBRARIES_TO_IMPORT": "Select Libraries to Import",
229231
"SELECT_LIBRARIES_TO_IMPORT_TOOLTIP": "Activity for Items within these libraries are still Tracked - Even when not imported.",
230232
"DATE_ADDED": "Date Added",

public/locales/fr-FR/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@
220220
"POLLING_INFO": "Le système adapte automatiquement la fréquence de surveillance : rapide quand des utilisateurs regardent du contenu, plus lent quand le serveur est inactif. Cela réduit la charge CPU sur votre serveur Jellyfin.",
221221
"INTERVAL_WARNING": "L'intervalle actif ne devrait pas être supérieur à l'intervalle de veille",
222222
"REALTIME_UPDATE_INFO": "Les modifications sont appliquées en temps réel sans redémarrage du serveur.",
223+
"ACTIVITY_MONITOR_SETTINGS_SUCCESS": "Paramètres de surveillance mis à jour avec succès",
224+
"ACTIVITY_MONITOR_SETTINGS_ERROR": "Erreur lors de la mise à jour des paramètres",
223225
"SELECT_LIBRARIES_TO_IMPORT": "Sélectionner les médiathèques à importer",
224226
"SELECT_LIBRARIES_TO_IMPORT_TOOLTIP": "L'activité du contenu de ces médiathèques est toujours suivie, même s'ils ne sont pas importés.",
225227
"DATE_ADDED": "Date d'ajout",

src/pages/components/settings/ActivityMonitorSettings.jsx

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { useState, useEffect } from "react";
22
import axios from "../../../lib/axios_instance";
33
import { Row, Col, Form, Button, Alert } from "react-bootstrap";
4-
import { Trans } from "react-i18next";
4+
import { Trans, useTranslation } from "react-i18next";
55
import Loading from "../general/loading";
66

77
export default function ActivityMonitorSettings() {
8+
const { t } = useTranslation();
89
const [settings, setSettings] = useState({
910
activeSessionsInterval: 1000,
1011
idleInterval: 5000
@@ -55,12 +56,12 @@ export default function ActivityMonitorSettings() {
5556
},
5657
});
5758
setIsSubmitted("Success");
58-
setSubmissionMessage("Paramètres de surveillance mis à jour avec succès - Appliqués en temps réel");
59+
setSubmissionMessage(t("SETTINGS_PAGE.ACTIVITY_MONITOR_SETTINGS_SUCCESS"));
5960
} catch (error) {
6061
console.error("Error updating Activity Monitor settings:", error);
6162
setIsSubmitted("Failed");
6263
setSubmissionMessage(
63-
error.response?.data || "Erreur lors de la mise à jour des paramètres"
64+
error.response?.data || t("SETTINGS_PAGE.ACTIVITY_MONITOR_SETTINGS_ERROR")
6465
);
6566
}
6667
};
@@ -72,24 +73,24 @@ export default function ActivityMonitorSettings() {
7273
return (
7374
<div>
7475
<h1>
75-
<Trans i18nKey={"SETTINGS_PAGE.ACTIVITY_MONITOR"} defaults="Surveillance d'activité" />
76+
<Trans i18nKey={"SETTINGS_PAGE.ACTIVITY_MONITOR"} defaults="Activity Monitor" />
7677
</h1>
7778

7879
<div className="mb-3 text-muted">
7980
<small>
80-
<Trans
81-
i18nKey={"SETTINGS_PAGE.REALTIME_UPDATE_INFO"}
82-
defaults="Les modifications sont appliquées en temps réel sans redémarrage du serveur."
81+
<Trans
82+
i18nKey={"SETTINGS_PAGE.REALTIME_UPDATE_INFO"}
83+
defaults="Changes are applied in real-time without server restart."
8384
/>
8485
</small>
8586
</div>
8687

8788
<Form onSubmit={handleSubmit} className="settings-form">
8889
<Form.Group as={Row} className="mb-3">
8990
<Form.Label column className="">
90-
<Trans
91-
i18nKey={"SETTINGS_PAGE.ACTIVE_SESSIONS_INTERVAL"}
92-
defaults="Intervalle avec sessions actives (ms)"
91+
<Trans
92+
i18nKey={"SETTINGS_PAGE.ACTIVE_SESSIONS_INTERVAL"}
93+
defaults="Active Sessions Interval (ms)"
9394
/>
9495
</Form.Label>
9596
<Col sm="10">
@@ -105,19 +106,19 @@ export default function ActivityMonitorSettings() {
105106
autoComplete="off"
106107
/>
107108
<Form.Text className="text-muted">
108-
<Trans
109-
i18nKey={"SETTINGS_PAGE.ACTIVE_SESSIONS_HELP"}
110-
defaults="Fréquence de vérification quand des utilisateurs regardent du contenu (recommandé: 1000ms)"
109+
<Trans
110+
i18nKey={"SETTINGS_PAGE.ACTIVE_SESSIONS_HELP"}
111+
defaults="How often to check when users are watching content (recommended: 1000ms)"
111112
/>
112113
</Form.Text>
113114
</Col>
114115
</Form.Group>
115116

116117
<Form.Group as={Row} className="mb-3">
117118
<Form.Label column className="">
118-
<Trans
119-
i18nKey={"SETTINGS_PAGE.IDLE_INTERVAL"}
120-
defaults="Intervalle en veille (ms)"
119+
<Trans
120+
i18nKey={"SETTINGS_PAGE.IDLE_INTERVAL"}
121+
defaults="Idle Interval (ms)"
121122
/>
122123
</Form.Label>
123124
<Col sm="10">
@@ -133,19 +134,19 @@ export default function ActivityMonitorSettings() {
133134
autoComplete="off"
134135
/>
135136
<Form.Text className="text-muted">
136-
<Trans
137-
i18nKey={"SETTINGS_PAGE.IDLE_HELP"}
138-
defaults="Fréquence de vérification quand aucune session active (recommandé: 5000ms)"
137+
<Trans
138+
i18nKey={"SETTINGS_PAGE.IDLE_HELP"}
139+
defaults="How often to check when no active sessions (recommended: 5000ms)"
139140
/>
140141
</Form.Text>
141142
</Col>
142143
</Form.Group>
143144

144145
{settings.activeSessionsInterval > settings.idleInterval && (
145146
<Alert bg="dark" data-bs-theme="dark" variant="warning" className="mb-3">
146-
<Trans
147-
i18nKey={"SETTINGS_PAGE.INTERVAL_WARNING"}
148-
defaults="L'intervalle actif ne devrait pas être supérieur à l'intervalle de veille"
147+
<Trans
148+
i18nKey={"SETTINGS_PAGE.INTERVAL_WARNING"}
149+
defaults="Active sessions interval should not be greater than idle interval"
149150
/>
150151
</Alert>
151152
)}

0 commit comments

Comments
 (0)