From abe28964a1e11be0a2a432a2699e4a5cb32e670a Mon Sep 17 00:00:00 2001 From: opsx Date: Thu, 29 Oct 2026 13:42:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20=E5=85=A8=E7=AB=99=E6=96=87?= =?UTF-8?q?=E6=A1=88=E4=B9=A6=E9=9D=A2=E5=8C=96=20+=20=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E8=B4=A8=E9=87=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 中文(zh):约 40 处口语化改书面(「谁在什么时候改了什么」→「操作人、时间与变更前后对比」、 「找出最吵的业务」→「定位日志量最高的业务」、「点」→「点击」、创建你的第一个→创建首个等); 「副本 / Pod」统一为「Pod」。 英文(en)修复: - 功能 bug:wizard openGrafana ({url}) 插值失效→({{url}});settings notify 空态链接词悬空破句 - 语义补齐:clusters/hosts 删除确认补 Warning 与后果句;tokenInsecureHint 补 Kubeconfig 建议 (并删 en 死键 tokenRecommended);retention liveHint/costWarning/upgradeHint 补丢失半句 - 术语统一:data source / collection policy / log lines / Listen IP (internal) / Total deployments - 复数:users confirmDesc、pagination total、range lastMinutes 补 _one;storage deleteWarning 两形态对齐 - 风格:Select filtered users、Delivery History、Log Scrape Jobs、App label source、 Deployment Logs 连字符改间隔号;删除 zh 死键 liveTitle --- frontend/src/i18n/locales/en/alerts.ts | 4 ++-- frontend/src/i18n/locales/en/analysis.ts | 10 +++++----- frontend/src/i18n/locales/en/clusters.ts | 5 ++--- frontend/src/i18n/locales/en/collectors.ts | 6 +++--- frontend/src/i18n/locales/en/common.ts | 6 +++--- frontend/src/i18n/locales/en/dashboard.ts | 4 ++-- frontend/src/i18n/locales/en/deployments.ts | 14 +++++++------- frontend/src/i18n/locales/en/hosts.ts | 4 ++-- frontend/src/i18n/locales/en/logs.ts | 8 ++++---- frontend/src/i18n/locales/en/settings.ts | 4 ++-- frontend/src/i18n/locales/en/users.ts | 1 + frontend/src/i18n/locales/en/wizard.ts | 4 ++-- frontend/src/i18n/locales/zh/alerts.ts | 6 +++--- frontend/src/i18n/locales/zh/analysis.ts | 10 +++++----- frontend/src/i18n/locales/zh/audit.ts | 4 ++-- frontend/src/i18n/locales/zh/clusters.ts | 10 +++++----- frontend/src/i18n/locales/zh/collectors.ts | 12 ++++++------ frontend/src/i18n/locales/zh/common.ts | 8 +++----- frontend/src/i18n/locales/zh/dashboard.ts | 2 +- frontend/src/i18n/locales/zh/deployments.ts | 13 ++++++------- frontend/src/i18n/locales/zh/hosts.ts | 4 ++-- frontend/src/i18n/locales/zh/logs.ts | 16 ++++++++-------- frontend/src/i18n/locales/zh/settings.ts | 6 +++--- frontend/src/i18n/locales/zh/wizard.ts | 4 ++-- 24 files changed, 81 insertions(+), 84 deletions(-) diff --git a/frontend/src/i18n/locales/en/alerts.ts b/frontend/src/i18n/locales/en/alerts.ts index 50f7767..7ea0d06 100644 --- a/frontend/src/i18n/locales/en/alerts.ts +++ b/frontend/src/i18n/locales/en/alerts.ts @@ -11,7 +11,7 @@ export default { tabs: { rules: 'Rules', channels: 'Channels', - history: 'Delivery history', + history: 'Delivery History', }, notifySectionTitle: 'Notification channels (Feishu / Lark / Webhook)', notifySectionConfigured: '{{count}} configured', @@ -90,7 +90,7 @@ export default { channelDisabled: '(disabled)', window: 'Window (min)', threshold: 'Threshold (matches)', - windowHint: 'Look back this many minutes', + windowHint: 'The number of minutes to look back', thresholdHint: 'Alert only above this count', cooldownHint: 'No repeat within cooldown', cooldown: 'Cooldown (min)', diff --git a/frontend/src/i18n/locales/en/analysis.ts b/frontend/src/i18n/locales/en/analysis.ts index 13e412f..dc433ff 100644 --- a/frontend/src/i18n/locales/en/analysis.ts +++ b/frontend/src/i18n/locales/en/analysis.ts @@ -1,19 +1,19 @@ // Log analysis page (admin) — registered via i18n/domains.ts; page entry imports '@/i18n/domains' export default { title: 'Log Analysis', - subtitle: 'Log volume, errors and trends by app and namespace — spot the noisiest workloads', + subtitle: 'Log volume, errors and trends by app and namespace — identify the highest-volume workloads', adminOnly: { title: 'Admin only', desc: 'Log analysis provides platform-wide statistics for administrators. Contact an administrator for access.', }, emptySource: { title: 'No Loki data source yet', - desc: 'Connect a source on the log query page, then come back for aggregates.', + desc: 'Connect a data source on the log query page, then view the aggregate analysis here.', goLogs: 'Go to log query', }, filter: { source: 'Source', - sourceEmpty: 'No sources', + sourceEmpty: 'No data sources', namespace: 'Namespace', namespaceEmpty: 'Loading namespaces…', namespaceAll: 'All namespaces (slow)', @@ -61,13 +61,13 @@ export default { oneYear: '1y', coverage: '{{count}} days captured', seriesVolume: 'Volume', - inProgress: 'in progress', + inProgress: 'today: in progress', }, table: { title: 'App volume ranking', computing: 'Computing per-app volume (reads log content, usually 20–30s)…', - subtitle: 'Top 10 apps by volume; click "View logs" to jump to the query page', + subtitle: 'Top 10 apps by volume; click "View logs" to open the query page', rank: '#', app: 'App', appWithKey: 'App ({{key}})', diff --git a/frontend/src/i18n/locales/en/clusters.ts b/frontend/src/i18n/locales/en/clusters.ts index 3a882c0..0e0a095 100644 --- a/frontend/src/i18n/locales/en/clusters.ts +++ b/frontend/src/i18n/locales/en/clusters.ts @@ -23,7 +23,7 @@ export default { }, delete: { warning: - 'Delete "{{name}}"? {{dep}} deployment(s) and {{col}} collector policy(ies) still reference it.', + 'Delete "{{name}}"? Warning: {{dep}} deployments and {{col}} collection policies still reference this cluster and will stop working after deletion.', }, toast: { deleteFailed: 'Failed to delete cluster', @@ -46,9 +46,8 @@ export default { tokenLabel: 'Token *', tokenLabelEdit: 'Token (leave blank to keep unchanged)', tokenPlaceholder: 'Paste Service Account Token...', - tokenRecommended: 'Recommended: a token can be scoped precisely and revoked at any time.', tokenInsecureHint: - 'Uses insecure mode, for clusters on private networks or with self-signed certificates', + 'Token mode skips TLS verification for self-signed certificates in internal networks. If the cluster has a publicly trusted certificate, switch to Kubeconfig mode for strict verification.', rbacSummary: 'Least-privilege recommendations (click to expand)', rbacScope: 'Grant permissions only in the log namespace so a leaked Token cannot affect other namespaces; do not use cluster-admin.', diff --git a/frontend/src/i18n/locales/en/collectors.ts b/frontend/src/i18n/locales/en/collectors.ts index 25dc966..d7b88f7 100644 --- a/frontend/src/i18n/locales/en/collectors.ts +++ b/frontend/src/i18n/locales/en/collectors.ts @@ -122,7 +122,7 @@ const collectors = { nsLoadFailed: 'Failed to load namespaces', nsHint: '"All namespaces" collects cluster-wide; otherwise only the checked ones.', - appLabelSource: 'app label source', + appLabelSource: 'App label source', appSourcePlaceholder: 'Empty = default (controller-name fallback chain)', appSourceHint: 'Falls back through app.kubernetes.io/name → app → controller name → pod name; a cluster-specific label (e.g. k8s.kuboard.cn/name) set here takes priority.', @@ -140,8 +140,8 @@ const collectors = { logPathHint: 'Sidecar needs a shared log volume or the dedicated logs directory; click Deploy after saving.', // ── host mode: structured scrape jobs ── jobs: { - title: 'Log scrape jobs', - hint: 'One entry = one promtail job; add more paths for more directories. Click Deploy after saving.', + title: 'Log Scrape Jobs', + hint: 'One entry corresponds to one promtail job; add one path per directory. Click Deploy after saving.', add: 'Add job', remove: 'Remove job', namePlaceholder: 'job name, e.g. app-api', diff --git a/frontend/src/i18n/locales/en/common.ts b/frontend/src/i18n/locales/en/common.ts index 0a4d6ff..42538c1 100644 --- a/frontend/src/i18n/locales/en/common.ts +++ b/frontend/src/i18n/locales/en/common.ts @@ -34,9 +34,7 @@ export default { logout: 'Sign out', logoutShort: 'Sign out', toLight: 'Switch to light theme', - toDark: 'Switch to dark theme', - admin: 'Admin', - loading: 'Loading page', + toDark: 'Switch to dark theme', loading: 'Loading page', }, login: { subtitle: 'Loki Log Management Platform', @@ -71,6 +69,7 @@ export default { }, pagination: { total: '{{count}} items', + total_one: '{{count}} item', summary: '{{count}} items · Page {{page}} of {{pages}}', }, status: { @@ -105,6 +104,7 @@ export default { }, range: { lastMinutes: 'Last {{count}} minutes', + lastMinutes_one: 'Last {{count}} minute', lastHours: 'Last {{count}} hours', lastHours_one: 'Last {{count}} hour', custom: 'Custom time', diff --git a/frontend/src/i18n/locales/en/dashboard.ts b/frontend/src/i18n/locales/en/dashboard.ts index aeacbf9..bca991e 100644 --- a/frontend/src/i18n/locales/en/dashboard.ts +++ b/frontend/src/i18n/locales/en/dashboard.ts @@ -1,7 +1,7 @@ // dashboard namespace — Dashboard domain (stat cards / quick start / recent deployments / resource lists) export default { stat: { - totalDeployments: 'Deployments', + totalDeployments: 'Total deployments', runningCount: '{{count}} running', clusters: 'Clusters', connected: 'Connected', @@ -18,7 +18,7 @@ export default { }, quickStart: { title: 'Start collecting logs in three steps', - subtitle: 'Target & environment → Storage → Deploy Loki, then add a collection strategy', + subtitle: 'Target & environment → Storage → Deploy Loki, then add a collection policy', cta: 'Open Deploy Wizard', }, recent: { diff --git a/frontend/src/i18n/locales/en/deployments.ts b/frontend/src/i18n/locales/en/deployments.ts index 5ec095f..8560aee 100644 --- a/frontend/src/i18n/locales/en/deployments.ts +++ b/frontend/src/i18n/locales/en/deployments.ts @@ -36,7 +36,7 @@ export default { ready: 'Loki ready', notReady: 'Loki not ready', runningHint: - 'Link the Loki source under "Log Query → Data Sources" to query logs.', + 'Link the Loki data source under "Log Query → Data Sources" to query logs.', configure: 'Configure', deploy: 'Deploy', deploying: 'Deploying...', @@ -60,7 +60,7 @@ export default { namespace: 'Namespace *', host: 'Target Host *', hostPlaceholder: 'Select a host', - listenIP: 'Listen IP', + listenIP: 'Listen IP (internal)', listenIPPlaceholder: 'Defaults to the host IP once a host is selected', listenPort: 'Access Port', dockerHint: 'Starts a Docker container on the host via SSH; config and data stay on the host.', @@ -96,14 +96,14 @@ export default { locationHostDocker: 'Host /etc/lokistack/loki-{{id}}/loki.yaml → limits_config.retention_period', locationK8s: 'ConfigMap {{namespace}}/loki-config → loki.yaml', compactorNote: 'Retention is enforced by the Loki compactor; MinIO only stores the log objects.', - liveHint: 'Read from the deployment target with storage credentials masked.', + liveHint: 'Read from the deployment target with storage credentials masked. Retention days below are still edited separately.', daysLabel: 'Retention days', daysUnit: 'days', daysConvert: '= {{hours}} hours', - daysHint: 'Just enter a number — no YAML needed. Range 1–3650 days.', + daysHint: 'Enter the number of days directly — no YAML editing needed. Range: 1–3650 days.', daysInteger: 'Enter a whole number of days', daysRange: 'Days must be between 1 and 3650', - costWarning: 'Keeping {{days}} days grows object-storage usage linearly with retention.', + costWarning: 'Keeping {{days}} days grows object-storage usage linearly with retention. Be careful when purging historical logs.', loading: 'Loading…', liveToggle: 'Show the full live loki.yaml (read-only)', applyHintRunning: 'Save & Apply redeploys Loki; log queries may be briefly interrupted (~1 min).', @@ -128,12 +128,12 @@ export default { cpu: 'CPU', memory: 'Memory', refresh: 'Refresh', - upgradeHint: 'To scale up: adjust CPU / memory in the deployment form, then redeploy.', + upgradeHint: 'To scale up: open the deployment form next to "Edit retention policy", adjust CPU / memory, then redeploy.', noLimits: 'No resource limits configured (usage shown, ratio unavailable)', errLoad: 'Failed to read resource usage', }, logs: { - title: 'Deployment Logs - {{name}}', + title: 'Deployment Logs · {{name}}', empty: 'No logs yet...', errLoad: 'Failed to load deployment logs', }, diff --git a/frontend/src/i18n/locales/en/hosts.ts b/frontend/src/i18n/locales/en/hosts.ts index 0fce83e..19842b2 100644 --- a/frontend/src/i18n/locales/en/hosts.ts +++ b/frontend/src/i18n/locales/en/hosts.ts @@ -24,7 +24,7 @@ export default { }, delete: { warning: - 'Delete "{{name}}"? {{dep}} deployment(s) and {{col}} collector policy(ies) still reference it.', + 'Delete "{{name}}"? Warning: {{dep}} deployments and {{col}} collection policies still reference this host and will stop working after deletion.', }, toast: { deleteFailed: 'Failed to delete host', @@ -55,7 +55,7 @@ export default { validation: { nameRequired: 'Host name is required', hostIpRequired: 'Host IP is required', - hostIpLoopback: 'Do not use 127.0.0.1 / localhost: the platform runs in a container, so loopback points to itself. Use the server\'s real IP.', + hostIpLoopback: 'Do not use 127.0.0.1 / localhost: the platform runs in a container, so loopback points to the platform itself. Use the server\'s real IP.', portRequired: 'Port is required', portNumeric: 'Port must be a number', portRange: 'Port must be between 1 and 65535', diff --git a/frontend/src/i18n/locales/en/logs.ts b/frontend/src/i18n/locales/en/logs.ts index 9091721..b6b9799 100644 --- a/frontend/src/i18n/locales/en/logs.ts +++ b/frontend/src/i18n/locales/en/logs.ts @@ -32,7 +32,7 @@ export default { goConfigure: 'Go to data sources', sectionAria: 'Data source management', heading: 'Loki Data Sources', - hint: 'In-cluster Loki works with "Cluster Service"; cross-cluster / public access needs an Ingress domain plus "Direct URL".', + hint: 'In-cluster Loki works with "Cluster Service"; cross-cluster / public access needs an Ingress domain configured first, then "Direct URL".', managedCluster: 'Cluster {{name}}', managedBadge: 'Platform deployed · managed with the deployment', countLabel: '{{count}} total', @@ -176,7 +176,7 @@ export default { modeSlow: 'Top 10 slow requests', modeDetail: 'Request details', summary: - 'Based on {{loaded}} loaded entries', + 'Stats based on {{loaded}} loaded entries', statPv: 'PV', statUv: 'UV (IP)', statErrors: '4xx / 5xx', @@ -187,7 +187,7 @@ export default { error4xx: '4xx only', slowThreshold: 'Slow request threshold', seconds: '{{count}}s', - slowHint: 'Sorted by request_time; 408 / 499 / 504 are timeout hints.', + slowHint: 'Sorted by request_time; 408 / 499 / 504 usually indicate timeouts.', slowMissing: '{{count}} entries lack a valid duration.', trafficHint: 'Success rate = 2xx / 3xx ÷ PV', thHost: 'Request Host', @@ -256,7 +256,7 @@ export default { selectedCount: 'Selected {{count}}', anyoneToggle: 'Anyone (anyone)', anyoneActive: '✓ Anyone (anyone)', - selectFiltered: 'Select filtered', + selectFiltered: 'Select filtered users', clear: 'Clear', usersHint: 'A user can belong to only one policy group per data source; users already in another group are grayed out.', searchAria: 'Search users', diff --git a/frontend/src/i18n/locales/en/settings.ts b/frontend/src/i18n/locales/en/settings.ts index 6e8fad3..7365a9c 100644 --- a/frontend/src/i18n/locales/en/settings.ts +++ b/frontend/src/i18n/locales/en/settings.ts @@ -52,9 +52,9 @@ export default { cardTitle: 'Alert Channels — Feishu (Lark)', create: 'New channel', // Empty state is assembled as "prefix + link + suffix" (link points to the Alerts page) - emptyBefore: 'No channels yet — create one per alert group, ', + emptyBefore: 'No channels yet — create one per alert group, then open ', emptyLink: 'Alerts', - emptyAfter: 'then link rules to it on the alerts page.', + emptyAfter: 'to link rules to their channels.', webhookConfigured: 'Webhook configured', webhookMissing: 'Not configured', secretConfigured: ' · Signing secret configured', diff --git a/frontend/src/i18n/locales/en/users.ts b/frontend/src/i18n/locales/en/users.ts index e2fa855..b46872e 100644 --- a/frontend/src/i18n/locales/en/users.ts +++ b/frontend/src/i18n/locales/en/users.ts @@ -81,6 +81,7 @@ export default { selectAll: 'Select all', confirmTitle: 'Confirm Bulk Deletion', confirmDesc: 'Delete {{count}} selected users? Protected accounts are skipped; this cannot be undone.', + confirmDesc_one: 'Delete {{count}} selected user? Protected accounts are skipped; this cannot be undone.', skippedWarn: '{{count}} skipped: {{reasons}}', failed: 'Bulk delete failed', }, diff --git a/frontend/src/i18n/locales/en/wizard.ts b/frontend/src/i18n/locales/en/wizard.ts index eea30c0..fe6b2da 100644 --- a/frontend/src/i18n/locales/en/wizard.ts +++ b/frontend/src/i18n/locales/en/wizard.ts @@ -22,7 +22,7 @@ const wizard = { storage: 'Environment ready — object storage is recommended next', deploy: 'Target and storage ready — create your Loki deployment', collect: 'Loki is running — add a collection policy to start collecting logs', - all: 'All set: logs are being collected — head to Log Query to analyze them', + all: 'Setup complete: logs are being collected — head to Log Query to analyze them', }, env: { k8sTitle: 'Kubernetes Cluster', @@ -50,7 +50,7 @@ const wizard = { autoTriggerFailed: 'Auto deploy failed; trigger it manually on the Deploy Loki page', meta: '{{mode}} · Namespace {{namespace}} · {{endpoint}}', endpointPending: 'endpoint available after deployment', - openGrafana: 'Open log query ({url})', + openGrafana: 'Open log query ({{url}})', openLoki: 'Open Loki', details: 'Deployment Details', none: 'No running Loki — deploy to Kubernetes or host Docker', diff --git a/frontend/src/i18n/locales/zh/alerts.ts b/frontend/src/i18n/locales/zh/alerts.ts index 3cc4d25..f185b83 100644 --- a/frontend/src/i18n/locales/zh/alerts.ts +++ b/frontend/src/i18n/locales/zh/alerts.ts @@ -14,7 +14,7 @@ export default { }, notifySectionTitle: '通知通道(飞书 / Lark / Webhook)', notifySectionConfigured: '已配置 {{count}} 个', - notifySectionEmpty: '尚未配置,告警发不出去', + notifySectionEmpty: '尚未配置,告警将无法发送', col: { enabled: '启用', name: '规则', @@ -41,7 +41,7 @@ export default { loadFailed: '加载告警数据失败', saveFailed: '保存失败', deleteFailed: '删除失败', - checkDone: '已执行一次检查,结果见发送历史', + checkDone: '已执行检查,结果见「发送历史」', checkFailed: '检查失败', toggleFailed: '切换失败', confirmDeleteTitle: '确认删除告警规则', @@ -86,7 +86,7 @@ export default { channelDisabled: '(禁用)', window: '统计窗口(分)', threshold: '触发阈值(条)', - windowHint: '统计最近多少分钟', + windowHint: '统计最近 N 分钟内的日志', thresholdHint: '超过该条数才告警', cooldown: '冷却(分)', cooldownHint: '冷却内不重复发送', diff --git a/frontend/src/i18n/locales/zh/analysis.ts b/frontend/src/i18n/locales/zh/analysis.ts index 0a4c6e7..7a364a8 100644 --- a/frontend/src/i18n/locales/zh/analysis.ts +++ b/frontend/src/i18n/locales/zh/analysis.ts @@ -1,14 +1,14 @@ // 日志分析页(admin)— 经 i18n/domains.ts 注册,页面入口 import '@/i18n/domains' export default { title: '日志分析', - subtitle: '按应用与命名空间看日志量、错误与趋势,找出最吵的业务', + subtitle: '按应用与命名空间看日志量、错误与趋势,定位日志量最高的业务', adminOnly: { title: '仅管理员可访问', desc: '日志分析面向管理员提供全量日志统计,请联系管理员开通。', }, emptySource: { title: '还没有可用的 Loki 数据源', - desc: '请先在日志查询页关联数据源,再回来看聚合分析。', + desc: '请先在日志查询页关联数据源,再查看聚合分析。', goLogs: '去日志查询', }, filter: { @@ -18,7 +18,7 @@ export default { namespaceEmpty: '正在加载命名空间…', namespaceAll: '全部命名空间(较慢)', refresh: '刷新', - pendingApply: '筛选条件已改,点「刷新」生效', + pendingApply: '筛选条件已变更,点击「刷新」生效', }, stats: { total: '日志总量', @@ -56,7 +56,7 @@ export default { badge: '平台留存历史', title: '每日日志量', subtitle: '每天的日志总量,平台保留历史趋势', - empty: '还没有历史数据,平台每天会自动记录一次', + empty: '暂无历史数据,平台每日自动记录一次', lastDays: '{{count}} 天', oneYear: '1 年', coverage: '已有 {{count}} 天数据', @@ -66,7 +66,7 @@ export default { table: { title: '应用日志量排行', - subtitle: '按日志条数排前 10 的应用,点「查看日志」跳到查询页', + subtitle: '按日志条数排前 10 的应用,点击「查看日志」跳转至查询页', computing: '正在按应用统计(需读取日志内容,通常 20~30 秒)…', rank: '#', app: '应用', diff --git a/frontend/src/i18n/locales/zh/audit.ts b/frontend/src/i18n/locales/zh/audit.ts index d4a7478..39a9063 100644 --- a/frontend/src/i18n/locales/zh/audit.ts +++ b/frontend/src/i18n/locales/zh/audit.ts @@ -1,7 +1,7 @@ // audit 命名空间 — 审计日志页中文文案 export default { title: '审计日志', - description: '记录所有写操作:谁在什么时候改了什么,含变更前后对比', + description: '记录全部写操作:操作人、时间与变更前后对比', refresh: '刷新', loadFailed: '加载审计日志失败', filter: '筛选', @@ -12,7 +12,7 @@ export default { filterFailed: '仅失败', total: '共 {{count}} 条', emptyTitle: '暂无审计记录', - emptyDesc: '之后的所有写操作(部署、采集、存储、集群、用户等)都会自动记录在这里', + emptyDesc: '后续所有写操作(部署、采集、存储、集群、用户等)将自动记录于此', detailTruncated: '详情已截断,仅显示列表中的摘要', stat: { today: '今日操作', diff --git a/frontend/src/i18n/locales/zh/clusters.ts b/frontend/src/i18n/locales/zh/clusters.ts index 314e20d..05f7a1d 100644 --- a/frontend/src/i18n/locales/zh/clusters.ts +++ b/frontend/src/i18n/locales/zh/clusters.ts @@ -23,7 +23,7 @@ export default { }, delete: { warning: - '确定要删除「{{name}}」吗?警告:仍有 {{dep}} 个部署、{{col}} 个采集策略引用该集群,删除后它们将无法工作。', + '确定删除「{{name}}」吗?仍有 {{dep}} 个部署、{{col}} 个采集策略在引用,删除后将不可用。', }, toast: { deleteFailed: '删除集群失败', @@ -46,18 +46,18 @@ export default { tokenLabel: 'Token *', tokenLabelEdit: 'Token(留空保持不变)', tokenPlaceholder: '粘贴 Service Account Token...', - tokenInsecureHint: '推荐:Token 权限可精确控制、可随时吊销;该模式下跳过 TLS 校验以兼容内网自签证书。若集群有公网可信证书,请改用 Kubeconfig 模式做严格校验。', + tokenInsecureHint: '推荐:Token 权限可精确控制、可随时吊销;该模式下跳过 TLS 校验以兼容内网自签证书。若集群有公网可信证书,请改用 Kubeconfig 模式进行严格校验。', rbacSummary: '最小授权建议(点击展开)', rbacScope: '只授予 log 命名空间权限,Token 泄露也不会影响其他命名空间;不要使用 cluster-admin。', rbacScriptIntro: '在集群执行一次,创建命名空间 / SA / Role / 长期 Token:', - rbacScriptComment1: '# 1) 一次创建:命名空间 + SA + 命名空间级 Role + 长期 Token', - rbacScriptComment2: '# 2) 取出长期 Token(不自动过期),粘贴到 Token 输入框', + rbacScriptComment1: '# 1) 一次性创建:命名空间 + SA + 命名空间级 Role + 长期 Token', + rbacScriptComment2: '# 2) 提取长期 Token(不自动过期),粘贴至 Token 输入框', rbacNamespaceNote: 'Token 无集群级权限;仅当需要平台自建命名空间时才额外授予 namespaces: create/get。', rbacTokenNote: - 'Token 仅限 log 命名空间,泄露影响面小;服务端加密存储。轮换:删除该 Secret 重建。', + 'Token 仅限 log 命名空间,泄露影响面小;服务端加密存储。轮换方式:删除该 Secret 后重建。', contextLabel: '上下文(可选)', contextPlaceholder: '留空则使用默认上下文', submitAdd: '添加集群', diff --git a/frontend/src/i18n/locales/zh/collectors.ts b/frontend/src/i18n/locales/zh/collectors.ts index 266a9f4..28592aa 100644 --- a/frontend/src/i18n/locales/zh/collectors.ts +++ b/frontend/src/i18n/locales/zh/collectors.ts @@ -101,7 +101,7 @@ const collectors = { logPathSidecarHint: '填业务写入的路径,如 /var/log/app/*.log;仅共享已有日志卷或专用 logs 目录。', labels: '自定义标签(JSON,可选)', - labelsHint: '合法 JSON 时将附加到每条日志的标签,便于在日志平台中筛选;留空则不加', + labelsHint: '合法 JSON 时将附加到每条日志的标签,便于在日志平台中筛选;留空则不附加', submit: '创建并部署', submitting: '创建中...', validation: { @@ -121,12 +121,12 @@ const collectors = { allCheckbox: '所有命名空间(全集群采集)', nsSearch: '搜索命名空间…', loading: '加载中…', - nsListEmpty: '未取到命名空间列表(可手动输入)', + nsListEmpty: '未能获取命名空间列表(可手动输入)', nsNoMatch: '无匹配', nsLoadFailed: '加载命名空间失败', // nsHint/appSourceHint/appIncludeHint 含行内 ,渲染处用 Trans 组件 nsHint: - '勾「所有命名空间」= 采集全集群;否则只采勾选项。', + '勾选「所有命名空间」即采集全集群;未勾选时仅采集所选命名空间。', appLabelSource: 'app 标签取值来源', appSourcePlaceholder: '留空 = 默认(controller 名回退链)', appSourceHint: @@ -142,11 +142,11 @@ const collectors = { appIncludePlaceholder: '留空 = 不限;多个用逗号分隔,如 cex-spot-api, cex-asset-api', appIncludeHint: '只保留 app 命中这些值的日志(action: keep),是控制日志量最直接的手段。', - logPathHint: 'Sidecar 需共享日志卷或专用 logs 目录;保存后点「部署」生效。', + logPathHint: 'Sidecar 需共享日志卷或专用 logs 目录;保存后点击「部署」生效。', // ── 主机模式:结构化采集项(B 档) ── jobs: { title: '日志采集项', - hint: '一个采集项 = promtail 的一个 job;多个目录就多填几个路径。保存后点「部署」下发。', + hint: '每个采集项对应一个 promtail job;每个目录填写一个路径。保存后点击「部署」下发。', add: '添加采集项', remove: '删除采集项', namePlaceholder: 'job 名称,如 app-api', @@ -173,7 +173,7 @@ const collectors = { loading: '渲染中…', failed: '预览失败', title: '将要下发的 promtail.yaml', - description: '只预览,不保存也不下发;确认无误再点「保存」→「部署」。', + description: '仅预览,不保存且不下发;确认无误后点击「保存」→「部署」。', copy: '复制', copied: '已复制', close: '关闭', diff --git a/frontend/src/i18n/locales/zh/common.ts b/frontend/src/i18n/locales/zh/common.ts index 4366e23..919c83b 100644 --- a/frontend/src/i18n/locales/zh/common.ts +++ b/frontend/src/i18n/locales/zh/common.ts @@ -34,9 +34,7 @@ export default { logout: '退出登录', logoutShort: '退出', toLight: '切换为浅色', - toDark: '切换为深色', - admin: '管理员', - loading: '页面加载中', + toDark: '切换为深色', loading: '页面加载中', }, login: { subtitle: 'Loki 日志管理平台', @@ -54,7 +52,7 @@ export default { backendDown: '服务暂不可用', showPassword: '显示密码', hidePassword: '隐藏密码', - backendDownHint: '暂时连不上服务,请稍后再试或联系管理员。', + backendDownHint: '服务暂时无法连接,请稍后重试或联系管理员。', }, dialog: { confirmTitle: '确认删除', @@ -95,7 +93,7 @@ export default { }, boundary: { title: '页面渲染出错', - hint: '页面遇到异常,可尝试刷新;若持续出现请把下方信息反馈给开发者。', + hint: '页面遇到异常,可尝试刷新;若持续出现,请将下方错误信息反馈给开发人员。', unknown: '未知错误', reload: '刷新页面', reset: '重置组件', diff --git a/frontend/src/i18n/locales/zh/dashboard.ts b/frontend/src/i18n/locales/zh/dashboard.ts index 997b708..988b181 100644 --- a/frontend/src/i18n/locales/zh/dashboard.ts +++ b/frontend/src/i18n/locales/zh/dashboard.ts @@ -25,7 +25,7 @@ export default { title: '最近部署', viewAll: '查看全部', emptyTitle: '暂无部署', - emptyDesc: '创建你的第一个 Loki 部署', + emptyDesc: '创建首个 Loki 部署', }, list: { manage: '管理', diff --git a/frontend/src/i18n/locales/zh/deployments.ts b/frontend/src/i18n/locales/zh/deployments.ts index 4adfc5d..a596771 100644 --- a/frontend/src/i18n/locales/zh/deployments.ts +++ b/frontend/src/i18n/locales/zh/deployments.ts @@ -5,7 +5,7 @@ export default { description: '部署与管理 Loki 日志聚合服务', create: '新建部署', emptyTitle: '暂无部署', - emptyDescription: '创建你的第一个 Loki 部署', + emptyDescription: '创建首个 Loki 部署', // 删除确认:host-docker 连容器一起删,其余模式仅删记录不卸载资源 deleteDockerDesc: '确定要删除「{{name}}」吗?将同时移除主机上的 Loki 容器,此操作不可恢复。', deleteRecordDesc: @@ -35,7 +35,7 @@ export default { ready: 'Loki 就绪', notReady: 'Loki 未就绪', runningHint: - '到「日志查询 → 数据源」关联 Loki 后即可查询。', + '在「日志查询 → 数据源」中关联 Loki 后即可查询。', configure: '配置', deploy: '部署', deploying: '部署中...', @@ -86,7 +86,7 @@ export default { hostRequired: '请选择目标主机', portInvalid: '端口须在 1-65535 之间', namespaceRequired: '请填写命名空间', - storageSizeMin: '阿里云 ESSD 最小 20Gi,请填 20Gi 或以上', + storageSizeMin: '阿里云 ESSD 最小容量为 20Gi,请填写 20Gi 或以上', }, retention: { title: '编辑保留策略 · {{name}}', @@ -95,15 +95,14 @@ export default { locationHostDocker: '主机 /etc/lokistack/loki-{{id}}/loki.yaml → limits_config.retention_period', locationK8s: 'ConfigMap {{namespace}}/loki-config → loki.yaml', compactorNote: '保留策略由 Loki compactor 执行;MinIO 只负责存储日志对象。', - liveTitle: '运行中的完整 loki.yaml', liveHint: '从部署目标读取,存储凭证已遮盖;下方保留天数仍单独编辑。', daysLabel: '保留天数', daysUnit: '天', daysConvert: '= {{hours}} 小时', - daysHint: '填一个数字即可,无需写 YAML。范围 1–3650 天。', + daysHint: '填写天数即可,无需编写 YAML;范围为 1–3650 天。', daysInteger: '请填写整数天数', daysRange: '天数需在 1–3650 之间', - costWarning: '保留 {{days}} 天会让对象存储占用随天数线性增长;清空历史日志请谨慎。', + costWarning: '保留 {{days}} 天会让对象存储占用随天数线性增长;缩短保留期将清除历史日志,请谨慎操作。', loading: '读取中…', liveToggle: '查看运行中的完整 loki.yaml(只读)', applyHintRunning: '保存并应用会重新部署 Loki,查询可能短暂中断(约 1 分钟)。', @@ -128,7 +127,7 @@ export default { cpu: 'CPU', memory: '内存', refresh: '刷新', - upgradeHint: '如需扩容:在「编辑保留策略」旁用部署表单调整 CPU / 内存后重新部署。', + upgradeHint: '如需扩容,请在「编辑保留策略」旁的部署表单中调整 CPU / 内存并重新部署。', noLimits: '未配置资源限额(可查看实时占用,但无法计算占比)', errLoad: '读取资源用量失败', }, diff --git a/frontend/src/i18n/locales/zh/hosts.ts b/frontend/src/i18n/locales/zh/hosts.ts index e417918..cf270e3 100644 --- a/frontend/src/i18n/locales/zh/hosts.ts +++ b/frontend/src/i18n/locales/zh/hosts.ts @@ -24,7 +24,7 @@ export default { }, delete: { warning: - '确定删除「{{name}}」吗?仍有 {{dep}} 个部署、{{col}} 个采集策略在引用。', + '确定删除「{{name}}」吗?仍有 {{dep}} 个部署、{{col}} 个采集策略在引用,删除后将不可用。', }, toast: { deleteFailed: '删除主机失败', @@ -55,7 +55,7 @@ export default { validation: { nameRequired: '请输入主机名称', hostIpRequired: '请输入主机 IP', - hostIpLoopback: '不能填 127.0.0.1 / localhost:平台运行在容器内,回环地址指向平台自身,请填服务器的实际 IP', + hostIpLoopback: '请勿填写 127.0.0.1 / localhost:平台运行于容器内,回环地址指向平台自身,请填写服务器实际 IP', portRequired: '请输入端口', portNumeric: '端口必须为数字', portRange: '端口必须在 1-65535 之间', diff --git a/frontend/src/i18n/locales/zh/logs.ts b/frontend/src/i18n/locales/zh/logs.ts index ff23d3b..6d949f9 100644 --- a/frontend/src/i18n/locales/zh/logs.ts +++ b/frontend/src/i18n/locales/zh/logs.ts @@ -7,8 +7,8 @@ export default { query: 'Loki 查询', access: '查询授权', sources: '数据源管理', - descQuery: '按日志流与时间范围检索,可拖时间线、看前后文。', - descAccess: '用策略组复用日志范围,并一次关联多个用户。', + descQuery: '按日志流与时间范围检索,支持拖拽时间线与查看上下文。', + descAccess: '通过策略组复用日志范围,并批量关联多个用户。', descSources: '配置 Loki 连接与认证方式。', }, toolbar: { @@ -19,7 +19,7 @@ export default { sourceAria: '数据源', sourceEmptyOption: '暂无可用数据源', limitLabel: '每页条数', - limitHint: '默认 200 条(每条约 0.7KB)。日志量很大时先收窄时间范围或加过滤条件,比调大每页条数更有效。', + limitHint: '默认 200 条(每条约 0.7KB)。日志量较大时,建议优先收窄时间范围或增加过滤条件,而非调大每页条数。', rangeInvalid: '请选择有效的起止时间', queryFailed: '查询失败', }, @@ -27,7 +27,7 @@ export default { loadFailed: '加载数据源失败', missingTitle: '还没有可用的 Loki 数据源', missingBody: - '请先到「数据源管理」关联 Loki:集群内选「集群服务」,跨集群 / 公网用「URL 直连」。', + '请先到「数据源管理」关联 Loki:集群内选「集群服务」,跨集群 / 公网使用「URL 直连」。', goConfigure: '去配置数据源', sectionAria: '数据源管理', heading: 'Loki 数据源', @@ -91,7 +91,7 @@ export default { namespace: '命名空间', app: 'App', appWithKey: 'App({{key}})', - pod: '副本 / Pod', + pod: 'Pod', selectCount: '请选择(共 {{count}} 个)', loading: '加载中…', loadFailed: '加载失败', @@ -243,7 +243,7 @@ export default { sourceEmpty: '请先添加数据源', scopeTitle: '允许查询的日志范围', ownerFallback: '策略组', - scopeHint: '可按命名空间、App、副本 / Pod 精确限制。未选择的标签不作限制。', + scopeHint: '可按命名空间、App、Pod 精确限制。未选择的标签不作限制。', usersTitle: '关联用户', selectedAnyone: '已选 所有人(anyone)', selectedCount: '已选 {{count}} 位', @@ -251,7 +251,7 @@ export default { anyoneActive: '✓ 所有人(anyone)', selectFiltered: '选择当前筛选', clear: '清空', - usersHint: '同一用户在同一数据源只能属于一个策略组;已在其他组的用户会置灰。', + usersHint: '同一用户在同一数据源仅可属于一个策略组;已在其他策略组的用户将显示为不可选。', searchAria: '搜索用户', searchPlaceholder: '搜索用户名或昵称', grouped: '已分组', @@ -263,7 +263,7 @@ export default { ruleAria: '{{name}} 查询范围', nsLabel: '命名空间', appLabel: 'App', - podLabel: '副本 / Pod', + podLabel: 'Pod', }, select: { placeholder: '搜索并选择', diff --git a/frontend/src/i18n/locales/zh/settings.ts b/frontend/src/i18n/locales/zh/settings.ts index 94d535f..6916a60 100644 --- a/frontend/src/i18n/locales/zh/settings.ts +++ b/frontend/src/i18n/locales/zh/settings.ts @@ -52,9 +52,9 @@ export default { cardTitle: '告警通知通道(飞书/Lark)', create: '新建通道', // 空态文案按「前段 + 链接 + 后段」拼接(链接指向日志告警页) - emptyBefore: '尚无通知通道 —— 每个告警群建一个通道,', + emptyBefore: '尚无通知通道 —— 建议为每个告警群创建一个通道,', emptyLink: '日志告警', - emptyAfter: '在告警规则页把规则关联到对应通道。', + emptyAfter: '并在告警规则页将规则关联到对应通道。', webhookConfigured: 'Webhook 已配置', webhookMissing: '未配置', secretConfigured: ' · 签名已配置', @@ -114,7 +114,7 @@ export default { modeOverseasLabel: '海外官方', modeOverseasDesc: 'docker.io,海外网络环境', modeCnLabel: '国内加速', - modeCnDesc: 'docker.m.daocloud.io 镜像,国内环境防被墙', + modeCnDesc: 'docker.m.daocloud.io 镜像,适用于国内网络环境', modeCustomLabel: '私有仓库', modeCustomDesc: '自有 registry 前缀(如华为云 SWR)', errLoad: '加载镜像源配置失败', diff --git a/frontend/src/i18n/locales/zh/wizard.ts b/frontend/src/i18n/locales/zh/wizard.ts index 298c28e..40e07f1 100644 --- a/frontend/src/i18n/locales/zh/wizard.ts +++ b/frontend/src/i18n/locales/zh/wizard.ts @@ -21,9 +21,9 @@ const wizard = { hint: { env: '先选择部署环境并接入集群或主机', storage: '环境已就绪,建议先配置对象存储', - deploy: '目标与存储已就绪,创建 Loki 部署吧', + deploy: '目标与存储已就绪,请创建 Loki 部署', collect: 'Loki 已运行,添加采集策略开始收集日志', - all: '全部就绪:日志正在收集,可到日志查询页分析', + all: '全部就绪:日志正在收集,可前往日志查询页进行分析', }, env: { k8sTitle: 'Kubernetes 集群',