feat: add i18n (translation/localization) (#16877)

* Translation module init

* Add more i18n keys

* fix: fix string wrong

* refactor: use namespace translation file

* chore: add more translation key

* fix: fix some page name error

* refactor: change Trans tag for t function

* chore: fix some key not work

* chore: fix SearchFilterDialog i18n key error

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* chore: fix en i18n file filter missing some keys

* chore: add some i18n keys

* chore: add more i18n keys again

* feat: add search page i18n

* feat: add explore model i18n keys

* Update web/src/components/menu/GeneralSettings.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/components/menu/GeneralSettings.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/components/menu/GeneralSettings.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* feat: add more live i18n keys

* feat: add more search setting i18n keys

* fix: remove some comment

* fix: fix some setting page url error

* Update web/src/views/settings/SearchSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* fix: add system missing keys

* fix: update password update i18n keys

* chore: remove outdate translation.json file

* fix: fix exploreSettings error

* chore: add object setting i18n keys

* Update web/src/views/recording/RecordingView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/public/locales/en/components/filter.json

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/components/overlay/ExportDialog.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* feat: add more i18n keys

* fix: fix motionDetectionTuner html node

* feat: add more page i18n keys

* fix: cameraStream i18n keys error

* feat: add Player i18n keys

* feat: add more toast i18n keys

* feat: change explore setting name

* feat: add more document title i18n keys

* feat: add more search i18n keys

* fix: fix accessDenied i18n keys error

* chore: add objectType i18n

* chore: add  inputWithTags i18n

* chore: add SearchFilterDialog i18n

* Update web/src/views/settings/ObjectSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/views/settings/ObjectSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/views/settings/ObjectSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/views/settings/ObjectSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/views/settings/ObjectSettingsView.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* chore: add some missing i18n keys

* chore: remove most import { t } from "i18next";

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
GuoQing Liu
2025-03-16 10:36:20 -05:00
committed by GitHub
co-authored by Josh Hawkins
parent db541abed4
commit d34533981f
150 changed files with 6809 additions and 1926 deletions
@@ -0,0 +1,15 @@
{
"form": {
"user": "用户名",
"password": "密码",
"login": "登录",
"errors": {
"usernameRequired": "用户名不能为空",
"passwordRequired": "密码不能为空",
"rateLimit": "超出请求限制,请稍后再试。",
"loginFailed": "登录失败",
"unknownError": "未知错误,请检查日志。",
"webUnkownError": "未知错误,请检查控制台日志。"
}
}
}
@@ -0,0 +1,77 @@
{
"group": {
"label": "摄像头组",
"add": "添加摄像头组",
"edit": "编辑摄像头组",
"delete": {
"label": "删除摄像头组",
"confirm": "确认删除",
"confirm.desc": "你确定要删除摄像头组 <em>{{name}}</em> 吗?"
},
"name": {
"label": "名称",
"placeholder": "请输入名称",
"error": {
"mustLeastCharacters": "摄像头组的名称必须至少有 2 个字符。",
"exists": "摄像头组名称已存在。",
"nameMustNotPeriod": "摄像头组名称不能包含英文句号(.)。",
"invalid": "无效的摄像头组名称。"
}
},
"cameras": {
"label": "摄像头",
"desc": "选择添加至该组的摄像头。"
},
"icon": "图标",
"success": "摄像头组({{name}})保存成功。",
"camera": {
"setting": {
"label": "摄像头视频流设置",
"title": "{{cameraName}} 视频流设置",
"desc": "更改此摄像头组仪表板的实时视频流选项。<em>这些设置特定于设备/浏览器。</em>",
"audioIsAvailable": "此视频流支持音频",
"audioIsUnavailable": "此视频流不支持音频",
"audio": {
"tips": "音频必须从您的摄像头输出并在 go2rtc 中配置此流。",
"tips.document": "阅读文档(英文) "
},
"streamMethod": {
"label": "视频流方法",
"method": {
"noStreaming": {
"label": "无视频流",
"desc": "摄像头图像每分钟仅更新一次,不会进行实时视频流播放。"
},
"smartStreaming": {
"label": "智能视频流(推荐)",
"desc": "智能视频流在没有检测到活动时,每分钟更新一次摄像头图像,以节省带宽和资源。当检测到活动时,图像会无缝切换到实时视频流。"
},
"continuousStreaming": {
"label": "持续视频流",
"desc": "当摄像头画面在仪表板上可见时,始终为实时视频流,即使未检测到活动。",
"desc.warning": "持续视频流可能会导致高带宽使用和性能问题,请谨慎使用。"
}
}
},
"compatibilityMode": {
"label": "兼容模式",
"desc": "仅在摄像头的实时视频流显示颜色伪影,并且图像右侧有一条对角线时启用此选项。"
}
}
}
},
"debug": {
"options": {
"label": "设置",
"title": "选项",
"showOptions": "显示选项",
"hideOptions": "隐藏选项"
},
"boundingBox": "边界框",
"timestamp": "时间戳",
"zones": "区域",
"mask": "遮罩",
"motion": "运动",
"regions": "区域"
}
}
@@ -0,0 +1,96 @@
{
"restart": {
"title": "你确定要重启 Frigate?",
"button": "重启",
"restarting": {
"title": "Frigate 正在重启",
"content": "该页面将会在 {{countdown}} 秒后自动刷新。",
"button": "强制刷新"
}
},
"explore": {
"plus": {
"submitToPlus": {
"label": "提交至 Frigate+",
"desc": "您希望避开的地点中的物体不应被视为误报。若将其作为误报提交,可能会导致AI模型容易混淆相关物体的识别。"
},
"review": {
"true.label": "为 Frigate Plus 确认此标签",
"true_one": "这是 {{label}}",
"true_other": "这是 {{label}}",
"false.label": "不为 Frigate Plus 确认此标签",
"false_one": "这不是 {{label}}",
"false_other": "这不是 {{label}}",
"state.submitted": "已提交"
}
},
"video": {
"viewInHistory": "在历史中查看"
}
},
"export": {
"time": {
"fromTimeline": "从时间线选择",
"lastHour_one": "最后1小时",
"lastHour_other": "最后 {{count}} 小时",
"custom": "自定义",
"start": "开始时间",
"start.label": "选择开始时间",
"end": "结束时间",
"end.label": "选择结束时间"
},
"name": {
"placeholder": "导出项目的名字"
},
"select": "选择",
"export": "导出",
"selectOrExport": "选择或导出",
"toast": {
"success": "导出成功。进入 /exports 目录查看文件。",
"error": {
"failed": "导出失败:{{error}}",
"endTimeMustAfterStartTime": "结束时间必须在开始时间之后",
"noVaildTimeSelected": "未选择有效的时间范围"
}
},
"fromTimeline": {
"saveExport": "保存导出",
"previewExport": "预览导出"
}
},
"streaming": {
"label": "视频流",
"restreaming": {
"NotEnabled": "重新流式传输未启用。",
"desc": "为此摄像头设置 go2rtc,以获取额外的实时预览选项和音频支持。",
"desc.readTheDocumentation": "阅读文档(英文) "
},
"showStats": {
"label": "显示视频流统计信息",
"desc": "启用后将在摄像头画面上叠加显示视频流统计信息。"
},
"debugView": "调试界面"
},
"search": {
"saveSearch": {
"label": "保存搜索",
"desc": "请为此已保存的搜索提供一个名称。",
"placeholder": "请输入搜索名称",
"overwrite": "{{searchName}} 已存在。保存将覆盖现有值。",
"success": "搜索 ({{searchName}}) 已保存。",
"button.save.label": "保存此搜索"
}
},
"recording": {
"confirmDelete": {
"title": "确认删除",
"desc": "您确定要删除与此审核项相关的所有录制视频吗?<br /><br />提示:按住 <em>Shift</em> 键点击删除可跳过此对话框。",
"desc.selected": "您确定要删除与此审核项相关的所有录制视频吗?<br /><br />提示:按住 <em>Shift</em> 键点击删除可跳过此对话框。"
},
"button": {
"export": "导出",
"markAsReviewed": "标记为已审核",
"deleteNow": "立即删除"
}
}
}
@@ -0,0 +1,108 @@
{
"filter": "过滤器",
"labels": {
"label": "标签",
"all": "所有标签",
"all.short": "标签",
"count": "{{count}} 个标签"
},
"zones": {
"all": "所有区域",
"all.short": "区域"
},
"dates": {
"all": "所有日期",
"all.short": "日期"
},
"more": "更多筛选项",
"reset.label": "重置筛选器为默认值",
"timeRange": "时间范围",
"zones.label": "区域",
"subLabels": {
"label": "子标签",
"all": "所有子标签"
},
"score": "分值",
"estimatedSpeed": "预计速度({{unit}}",
"features": {
"label": "特性",
"hasSnapshot": "包含快照",
"hasVideoClip": "包含视频片段",
"submittedToFrigatePlus": {
"label": "提交至 Frigate+",
"tips": "你必须要先筛选具有快照的探测对象。<br /><br />没有快照的跟踪对象无法提交至 Frigate+."
}
},
"sort": {
"label": "排序",
"dateAsc": "日期 (正序)",
"dateDesc": "日期 (倒序)",
"scoreAsc": "对象分值 (正序)",
"scoreDesc": "对象分值 (倒序)",
"speedAsc": "预计速度 (正序)",
"speedDesc": "预计速度 (倒序)",
"relevance": "关联性"
},
"cameras": {
"label": "摄像头筛选",
"all": "所有摄像头",
"all.short": "摄像头"
},
"review": {
"showReviewed": "显示已查看的项目"
},
"motion": {
"showMotionOnly": "仅显示运动"
},
"explore": {
"settings": {
"title": "设置",
"defaultView": "默认视图",
"defaultView.desc": "当未选择任何过滤器时,显示每个标签最近跟踪对象的摘要,或显示未过滤的网格。",
"defaultView.summary": "摘要",
"defaultView.unfilteredGrid": "未过滤网格",
"gridColumns": "网格列数",
"gridColumns.desc": "选择网格视图中的列数。",
"searchSource": {
"label": "搜索源",
"desc": "选择是搜索缩略图还是跟踪对象的描述。",
"options": {
"thumbnailImage": "缩略图",
"description": "描述"
}
},
"date": {
"selectDateBy": {
"label": "选择日期进行筛选"
}
}
}
},
"logSettings": {
"label": "日志级别筛选",
"filterBySeverity": "按严重程度筛选日志",
"loading": "加载中",
"loading.desc": "当日志面板滚动到底部时,新的日志会自动流式加载。",
"disableLogStreaming": "禁用日志流式加载",
"allLogs": "所有日志"
},
"trackedObjectDelete": {
"title": "确认删除",
"desc": "删除这 {{objectLength}} 个跟踪对象将移除快照、任何已保存的嵌入和任何相关的对象生命周期条目。历史视图中这些跟踪对象的录制片段将<em>不会</em>被删除。<br /><br />您确定要继续吗?<br /><br />按住 <em>Shift</em> 键可在将来跳过此对话框。",
"toast": {
"success": "跟踪对象删除成功。",
"error": "删除跟踪对象失败:{{errorMessage}}"
}
},
"zoneMask": {
"filterBy": "按区域遮罩筛选"
},
"recognizedLicensePlates": {
"title": "识别的车牌",
"loadFailed": "加载识别的车牌失败。",
"loading": "正在加载识别的车牌...",
"placeholder": "输入以搜索车牌...",
"noLicensePlatesFound": "未找到车牌。",
"selectPlatesFromList": "从列表中选择一个或多个车牌。"
}
}
@@ -0,0 +1,8 @@
{
"iconPicker": {
"selectIcon": "选择图标",
"search": {
"placeholder": "搜索图标..."
}
}
}
@@ -0,0 +1,10 @@
{
"button": {
"downloadVideo": {
"label": "下载视频",
"toast": {
"success": "下载成功"
}
}
}
}
@@ -0,0 +1,39 @@
{
"noRecordingsFoundForThisTime": "找不到此次录制",
"noPreviewFound": "没有找到预览",
"noPreviewFoundFor": "没有在 {{cameraName}} 下找到预览",
"submitFrigatePlus": {
"title": "提交此帧到 Frigate+",
"submit": "提交"
},
"livePlayerRequiredIOSVersion": "此直播流类型需要 iOS 17.1 或更高版本。",
"streamOffline": {
"title": "视频流离线",
"desc": "未在 {{cameraName}} 的 <code>detect</code> 流上接收到任何帧,请检查错误日志"
},
"cameraDisabled": "摄像机已禁用",
"stats": {
"streamType": "流类型:",
"streamType.short": "类型",
"bandwidth": "带宽:",
"bandwidth.short": "带宽",
"latency": "延迟:",
"latency.short": "延迟",
"latency.value": "{{secounds}} 秒",
"latency.short.value": "{{secounds}} 秒",
"totalFrames": "总帧数:",
"droppedFrames": "丢帧数:",
"droppedFrames.short": "丢帧",
"droppedFrames.short.value": "{{droppedFrames}} 帧",
"decodedFrames": "解码帧数:",
"droppedFrameRate": "丢帧率:"
},
"toast": {
"success": {
"submittedFrigatePlus": "已成功提交帧到 Frigate+"
},
"error": {
"submitFrigatePlusFailed": "提交帧到 Frigate+ 失败"
}
}
}