From 10fa4ec2ca15847b28756f8e6392b570369ab2e1 Mon Sep 17 00:00:00 2001
From: ZhaiSoul <842607283@qq.com>
Date: Sun, 9 Mar 2025 22:30:22 +0800
Subject: [PATCH] chore: add more translation key
---
web/package-lock.json | 20 +--
web/public/locales/en/common.json | 7 +
web/public/locales/en/views/explore.json | 5 +-
web/public/locales/en/views/settings.json | 104 +++++++++++++--
web/public/locales/zh-CN/common.json | 6 +
web/public/locales/zh-CN/views/explore.json | 2 +-
web/public/locales/zh-CN/views/settings.json | 67 ++++++++--
web/src/components/card/ReviewCard.tsx | 9 +-
web/src/components/dynamic/TimeAgo.tsx | 9 +-
.../filter/CalendarFilterButton.tsx | 6 +-
.../components/filter/CameraGroupSelector.tsx | 27 ++--
.../components/filter/CamerasFilterButton.tsx | 2 +-
.../components/filter/SearchFilterGroup.tsx | 31 +++--
web/src/components/graph/CameraGraph.tsx | 2 +-
.../components/graph/CombinedStorageGraph.tsx | 8 +-
web/src/components/icons/IconPicker.tsx | 4 +-
web/src/components/input/SaveSearchDialog.tsx | 6 +-
web/src/components/menu/GeneralSettings.tsx | 122 +++++++++++++++--
web/src/components/menu/LiveContextMenu.tsx | 9 +-
.../components/menu/SearchResultActions.tsx | 26 +++-
.../components/overlay/CameraInfoDialog.tsx | 31 +++--
.../components/overlay/CreateUserDialog.tsx | 66 +++++++---
.../components/overlay/DeleteUserDialog.tsx | 5 +-
web/src/components/overlay/ExportDialog.tsx | 62 ++++++---
.../overlay/MobileReviewSettingsDrawer.tsx | 9 +-
.../components/overlay/RoleChangeDialog.tsx | 26 ++--
.../components/overlay/SaveExportOverlay.tsx | 4 +-
.../components/overlay/SetPasswordDialog.tsx | 47 +++++--
.../overlay/detail/SearchDetailDialog.tsx | 38 ++++--
.../overlay/dialog/RestartDialog.tsx | 5 +-
.../overlay/dialog/SearchFilterDialog.tsx | 4 +-
web/src/components/player/PreviewPlayer.tsx | 10 +-
.../settings/CameraStreamingDialog.tsx | 25 +++-
.../settings/MotionMaskEditPane.tsx | 54 +++-----
.../settings/ObjectMaskEditPane.tsx | 62 ++++-----
.../components/settings/SearchSettings.tsx | 32 +++--
web/src/components/settings/ZoneEditPane.tsx | 124 +++++++++---------
web/src/hooks/use-stats.ts | 4 +-
web/src/pages/Events.tsx | 4 +-
web/src/pages/Exports.tsx | 5 +-
web/src/pages/Live.tsx | 6 +-
web/src/pages/System.tsx | 8 +-
web/src/utils/i18n.ts | 61 +++++----
web/src/views/events/EventView.tsx | 21 ++-
web/src/views/live/DraggableGridLayout.tsx | 4 +-
web/src/views/live/LiveCameraView.tsx | 48 ++++---
web/src/views/live/LiveDashboardView.tsx | 4 +-
web/src/views/settings/AuthenticationView.tsx | 90 +++++++++----
web/src/views/settings/CameraSettingsView.tsx | 51 ++++---
web/src/views/settings/MotionTunerView.tsx | 19 +--
.../settings/NotificationsSettingsView.tsx | 40 ++++--
web/src/views/settings/ObjectSettingsView.tsx | 6 +-
web/src/views/settings/SearchSettingsView.tsx | 32 +++--
web/src/views/settings/UiSettingsView.tsx | 14 +-
web/src/views/system/CameraMetrics.tsx | 4 +-
web/src/views/system/GeneralMetrics.tsx | 36 +++--
56 files changed, 1026 insertions(+), 507 deletions(-)
diff --git a/web/package-lock.json b/web/package-lock.json
index a171f6c89..986677695 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -5477,15 +5477,6 @@
"node": ">= 14"
}
},
- "node_modules/human-signals": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
- "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
- "dev": true,
- "engines": {
- "node": ">=16.17.0"
- }
- },
"node_modules/i18next": {
"version": "24.2.0",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.0.tgz",
@@ -8590,7 +8581,7 @@
"version": "5.8.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
- "dev": true,
+ "devOptional": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -9016,6 +9007,15 @@
}
}
},
+ "node_modules/void-elements": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
+ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/vscode-jsonrpc": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz",
diff --git a/web/public/locales/en/common.json b/web/public/locales/en/common.json
index 48ce0edbe..973f3f1d6 100644
--- a/web/public/locales/en/common.json
+++ b/web/public/locales/en/common.json
@@ -64,6 +64,7 @@
"info": "Info"
},
"menu": {
+ "system": "System",
"systemMetrics": "System metrics",
"configuration": "Configuration",
"systemLogs": "System logs",
@@ -112,5 +113,11 @@
"error": "Failed to save config changes: {{errorMessage}}",
"error.noMessage": "Failed to save config changes"
}
+ },
+ "role": {
+ "title": "Role",
+ "admin": "Admin",
+ "viewer": "Viewer",
+ "desc": "Admins have full access to all features in the Frigate UI. Viewers are limited to viewing cameras, review items, and historical footage in the UI."
}
}
diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.json
index 41a325118..96d7d2002 100644
--- a/web/public/locales/en/views/explore.json
+++ b/web/public/locales/en/views/explore.json
@@ -29,7 +29,7 @@
"regenerateFromThumbnails": "Regenerate from Thumbnails",
"tips": {
"descriptionSaved": "Successfully saved description",
- "saveDescriptionFailed": "Failed to update the description"
+ "saveDescriptionFailed": "Failed to update the description: {{errorMessage}}"
}
},
"itemMenu": {
@@ -59,5 +59,6 @@
"title": "Confirm Delete",
"desc": "Deleting this tracked object removes the snapshot, any saved embeddings, and any associated object lifecycle entries. Recorded footage of this tracked object in History view will NOT be deleted.
Are you sure you want to proceed?"
}
- }
+ },
+ "noTrackedObjects": "No Tracked Objects Found"
}
diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json
index dacde1ffa..64fd734db 100644
--- a/web/public/locales/en/views/settings.json
+++ b/web/public/locales/en/views/settings.json
@@ -91,6 +91,10 @@
"noDefinedZones": "No zones are defined for this camera.",
"objectAlertsTips": "All {{alertsLabels}} objects on {{cameraName}} will be shown as Alerts.",
"zoneObjectAlertsTips": "All {{alertsLabels}} objects detected in {{zone}} on {{cameraName}} will be shown as Alerts.",
+ "objectDetectionsTips": "All {{detectionsLabels}} objects not categorized on {{cameraName}} will be shown as Detections regardless of which zone they are in.",
+ "zoneObjectDetectionsTips": "All {{detectionsLabels}} objects not categorized in {{zone}} on {{cameraName}} will be shown as Detections.",
+ "zoneObjectDetectionsTips.notSelectDetections": "All {{detectionsLabels}} objects detected in {{zone}} on {{cameraName}} not categorized as Alerts will be shown as Detections regardless of which zone they are in.",
+ "zoneObjectDetectionsTips.regardlessOfZoneObjectDetectionsTips": "All {{detectionsLabels}} objects not categorized on {{cameraName}} will be shown as Detections regardless of which zone they are in.",
"selectAlertsZones": "Select zones for Alerts",
"selectDetectionsZones": "Select zones for Detections",
"limitDetections": "Limit detections to specific zones",
@@ -103,9 +107,24 @@
"filter": {
"all": "All Masks and Zones"
},
- "polygonDrawing": {
- "error": {
- "mustBeFinished": "多边形绘制必须完成闭合后才能保存。"
+ "form": {
+ "zoneName": {
+ "error": {
+ "mustBeAtLeastTwoCharacters": "Zone name must be at least 2 characters.",
+ "mustNotBeSameWithCamera": "Zone name must not be the same as camera name.",
+ "alreadyExists": "A zone with this name already exists for this camera.",
+ "mustNotContainPeriod": "Zone name must not contain periods.",
+ "hasIllegalCharacter": "Zone name contains illegal characters."
+ }
+ },
+ "distance.error": "Distance must be greater than or equal to 0.1.",
+ "distance.error.mustBeFilled": "All distance fields must be filled to use speed estimation.",
+ "inertia.error.mustBeAboveZero": "Inertia must be above 0.",
+ "loiteringTime.error.mustBeGreaterOrEqualZero": "Loitering time must be greater than or equal to 0.",
+ "polygonDrawing": {
+ "error": {
+ "mustBeFinished": "Polygon drawing must be finished before saving."
+ }
}
},
"zones": {
@@ -182,7 +201,9 @@
"contourArea.desc": "The contour area value is used to decide which groups of changed pixels qualify as motion. Default: 10",
"improveContrast": "Improve Contrast",
"improveContrast.desc": "Improve contrast for darker scenes. Default: ON",
- "toast.success": "Motion settings have been saved.",
+ "toast": {
+ "success": "Motion settings have been saved."
+ }
},
"debug": {
"title": "Debug",
@@ -230,29 +251,86 @@
},
"users": {
"title": "Users",
+ "management": "Users Management",
+ "management.desc": "Manage this Frigate instance's user accounts.",
"addUser": "Add User",
"updatePassword": "Update Password",
"toast": {
+ "success": {
+ "createUser": "User {{user}} created successfully",
+ "deleteUser": "User {{user}} deleted successfully"
+ },
"error": {
- "setPasswordFailed": "Error setting password",
- "createUserFailed": "Error creating user. Check server logs.",
- "deleteUserFailed": "Error deleting user. Check server logs."
+ "setPasswordFailed": "Failed to save password: {{errorMessage}}",
+ "createUserFailed": "Failed to create user: {{errorMessage}}",
+ "deleteUserFailed": "Failed to delete user: {{errorMessage}}"
}
},
+ "table": {
+ "username": "Username",
+ "actions": "Actions",
+ "role": "Role",
+ "noUsers": "No users found.",
+ "changeRole": "Change user role",
+ "password": "Password",
+ "deleteUser": "Delete user"
+ },
"dialog": {
+ "form": {
+ "user": "Username",
+ "user.desc": "Only letters, numbers, periods and underscores allowed.",
+ "user.placeholder": "Enter username",
+ "password": "Password",
+ "password.placeholder": "Enter password",
+ "password.confirm": "Confirm Password",
+ "password.confirm.placeholder": "Confirm Password",
+ "password.strength": "password strength: ",
+ "password.strength.weak": "Weak",
+ "password.strength.medium": "Medium",
+ "password.strength.strong": "Strong",
+ "password.strength.veryStrong": "Very strong",
+ "password.match": "Passwords match",
+ "password.notMatch": "Passwords don't match",
+ "newPassword": "New Password",
+ "newPassword.placeholder": "Enter new password",
+ "newPassword.confirm.placeholder": "Re-enter new password",
+ "usernameIsRequired": "Username is required"
+ },
"createUser": {
- "title": "Create User",
- "user": "user",
- "password": "password",
+ "title": "Create New User",
+ "desc": "Add a new user account and specify an role for access to areas of the Frigate UI.",
"usernameOnlyInclude": "Username may only include letters, numbers, . or _"
},
"deleteUser": {
"title": "Delete User",
- "warn": "Are you sure?"
+ "desc": "This action cannot be undone. This will permanently delete the user account and remove all associated data.",
+ "warn": "Are you sure you want to delete {{username}}?"
},
- "setPassword": {
- "title": "Set Password"
+ "passwordSetting": {
+ "updatePassword": "Update Password for {{username}}",
+ "setPassword": "Set Password",
+ "desc": "Create a strong password to secure this account."
+ },
+ "changeRole": {
+ "title": "Change User Role",
+ "desc": "Update permissions for {{username}}",
+ "roleInfo": "
Select the appropriate role for this user:
请选择此用户的适当角色: