fix(i18n): Add missing translations for agent, metrics, and language strategy

New translations:
- agent.state, agent.idle, agent.patrolling, etc.
- metrics.title, metrics.rps, metrics.errorRate, etc.

Updated docs:
- HARD_RULES.md: Added language strategy table
- Skills 01: Added language selection standards
- LOGBOOK.md: Updated progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-24 16:22:44 +08:00
parent 417ed4594d
commit 7bd4cf30e3
5 changed files with 70 additions and 15 deletions

View File

@@ -22,11 +22,20 @@
```typescript
// ❌ 絕對禁止
<span></span>
<span>STATE: IDLE</span>
// ✅ 唯一許可
<span>{t('actions.confirm')}</span>
<span>{t('agent.state')}: {t('agent.idle')}</span>
```
**語言選擇標準** (詳見 `feedback_i18n_language_strategy.md`):
| 元素 | 語言 | 範例 |
|------|------|------|
| UI 文字/狀態/按鈕 | **繁體中文** | 「系統穩定」「待命」 |
| 技術標識/版本 | 英文 | `P0`, `v1.0.0` |
| 產品名稱 | 英文 | `OpenClaw`, `AWOOOI` |
- 所有 UI 文字必須透過 `next-intl``useTranslations()`
- 字典檔案位置: `apps/web/messages/{locale}.json`

View File

@@ -122,11 +122,27 @@
"processing": "Processing"
},
"agent": {
"standby": "STANDBY",
"analyzing": "ANALYZING",
"executing": "EXECUTING",
"waitingApproval": "AWAITING APPROVAL",
"error": "ERROR"
"title": "AI Agent",
"state": "State",
"idle": "Idle",
"standby": "Standby",
"patrolling": "Patrolling",
"intercepting": "Intercepting",
"analyzing": "Analyzing",
"generating": "Generating",
"complete": "Complete",
"executing": "Executing",
"waitingApproval": "Awaiting Approval",
"error": "Error",
"lastCheck": "Last check"
},
"metrics": {
"title": "Global Pulse",
"realtime": "Real-time",
"rps": "Requests/sec",
"errorRate": "Error Rate",
"p99Latency": "P99 Latency",
"aiSuccess": "AI Success"
},
"connection": {
"disconnected": "Disconnected",

View File

@@ -122,11 +122,27 @@
"processing": "處理中"
},
"agent": {
"title": "AI 代理",
"state": "狀態",
"idle": "待命",
"standby": "待命中",
"patrolling": "巡邏中",
"intercepting": "攔截異常中",
"analyzing": "分析中",
"generating": "生成提案中",
"complete": "分析完成",
"executing": "執行中",
"waitingApproval": "等待授權",
"error": "錯誤"
"error": "錯誤",
"lastCheck": "最後檢查"
},
"metrics": {
"title": "全局脈搏",
"realtime": "即時更新",
"rps": "每秒請求",
"errorRate": "錯誤率",
"p99Latency": "P99 延遲",
"aiSuccess": "AI 成功率"
},
"connection": {
"disconnected": "已斷線",

View File

@@ -55,17 +55,26 @@ await bot.log_out()
## i18n
**Memory:** `~/.claude/projects/-Users-ogt-awoooi/memory/feedback_i18n_zero_hardcode.md`
**Memory:**
- `feedback_i18n_zero_hardcode.md` - 零容忍硬編碼
- `feedback_i18n_language_strategy.md` - 語言選擇標準
```tsx
// ❌ 禁止
// ❌ 禁止硬編碼
<button>Submit</button>
<span>STATE: IDLE</span>
// ✅ 正確
// ✅ 使用 next-intl
<button>{t('common.submit')}</button>
<span>{t('agent.state')}: {t('agent.idle')}</span>
```
**原因:** 100% 雙語支援 (zh-TW + en)。
| 元素 | 語言 | 範例 |
|------|------|------|
| UI 文字 | 繁體中文 | 「系統穩定」 |
| 技術標識 | 英文 | `P0`, `RESOLVED` |
**原因:** 面向使用者的文字必須繁體中文。
---

View File

@@ -5,15 +5,15 @@
---
## 📍 當前狀態 (2026-03-24 14:50)
## 📍 當前狀態 (2026-03-24 16:15)
| 項目 | 狀態 |
|------|------|
| **當前 Phase** | **Phase 8.0 架構淬鍊 + QA 修復** |
| **當前 Phase** | **Phase 10 Sentry + OTEL CI/CD 整合** |
| **Day** | Day 6 |
| **下一步** | CD #23476501452 (7a76f3e) 構建中 → Nginx 負載均衡 → QA 測試修復 |
| **重大發現** | 🔴 **NEXT_PUBLIC_API_URL 未注入** - 前端用 localhost:8000 (已修復 7a76f3e) |
| **QA 結果** | ⚠️ 13 通過 / 9 失敗 (59%) - Multi-Sig ✅ 核心安全通過 |
| **下一步** | CD #23479188207 (OTEL) 構建中 → Sentry Tunnel (#45) → SignOz 驗證 (#46c) |
| **重大發現** | 🔴 **Sentry DSN 內網 IP 觸發區域網路權限對話框** (已暫時停用) |
| **CI/CD** | ✅ OTEL 環境變數已加入 (cd7d63e)Pre-flight Check 通過 |
### 🧠 認知覺醒計畫 Phase 6 施工順序 (C-Suite 2026-03-23 統帥方案)
@@ -41,6 +41,11 @@
| 時間 | 事件 | 負責人 |
|------|------|--------|
| 2026-03-24 16:25 | **✅ Sentry Tunnel 完成 (b20987e)**: /api/sentry-tunnel API Route + sentry.client.config.ts 使用 tunnel + 重新啟用 NEXT_PUBLIC_SENTRY_DSN | Claude Code |
| 2026-03-24 16:10 | **📊 OTEL CI/CD 監控 (cd7d63e)**: CI/CD workflows 加入 OTEL exporter → SignOz (192.168.0.121:4318) | Claude Code |
| 2026-03-24 16:05 | **🔧 API import 修復 (75c991d)**: 修正 ruff I001 lint 錯誤 (import 排序) | Claude Code |
| 2026-03-24 16:00 | **🔴 Sentry 區域網路權限修復 (bf702ff)**: 暫時停用 NEXT_PUBLIC_SENTRY_DSN (內網 IP 觸發瀏覽器授權) | Claude Code |
| 2026-03-24 15:50 | **📋 Sentry 完整整合計畫**: 三層架構 (SDK → Sentry Server → AI 分析 → BFF → 自建 UI) 批准 | 統帥 |
| 2026-03-24 14:50 | **🧪 QA 測試執行**: 13 通過 / 9 失敗 (59%) - Multi-Sig ✅ 核心安全通過UI 測試需更新 | 資深顧問 |
| 2026-03-24 14:45 | **🔴 根因發現**: NEXT_PUBLIC_API_URL 未 build-arg 注入,前端用 localhost:8000 | 資深顧問 |
| 2026-03-24 14:40 | **🔧 CD 修復 (7a76f3e)**: 新增 `--build-arg NEXT_PUBLIC_API_URL=https://awoooi.wooo.work` | Claude Code |