Polish dynamic Chinese UI labels

This commit is contained in:
Codex
2026-05-20 21:29:30 +08:00
parent bac39fd7d1
commit 21a97638db
4 changed files with 203 additions and 0 deletions
+4
View File
@@ -120,6 +120,10 @@ Automation execution-layer PXX remains closed and its known scope stays frozen.
- latest_decision_assistant_digest_preference_slice: digest_preference_profile_local_mode
- latest_trader_mode_shell_slice: unified_workbench_left_tree_route
- latest_frontend_i18n_slice: zh_cn_default_en_switcher
- latest_frontend_i18n_dynamic_slice: existing_dynamic_card_field_value_polish
- latest_frontend_i18n_dynamic_status: implemented_deployed_remote_smoke_passed
- latest_frontend_i18n_dynamic_closure: expanded existing zh-CN dynamic term coverage for session focus, candidate cards, readiness/runtime codes, and nested evidence JSON; remote browser audit on `/trader-mode#intraday-candidates` had no tracked English remnants, no visible snake_case remnants in the active candidate section, and no console errors
- latest_frontend_i18n_dynamic_validation: node --check src/web/i18n.js, tests.unit.test_api_static_server, secret static checks, script static checks, full unit 790 tests, deploy smoke 11 endpoints, remote ops smoke, and readonly live analysis smoke passed; readonly boundary still reports must_not_trade=true and submit_cancel_or_live_execution_called=false
- latest_decision_assistant_workflow_queue_slice: assistant_loop_queue
- latest_decision_assistant_workspace_loop_slice: workflow_section_navigation_loop_queue
- latest_decision_assistant_learning_focus_slice: learning_focus_queue
+1
View File
@@ -164,6 +164,7 @@
- [x] Live usefulness blocker recovery: root workbench split-navigation is usable, slow frontend requests time out instead of freezing the page, remote DB/compose/deploy/migration/proxy/runtime blockers were recovered, standard remote ops smoke including `unattended_harness` passed, and readonly live analysis smoke passed without enabling order submission
- [x] Trader Mode unified workbench shell closure: `/trader-mode` now opens inside the same left-tree/right-workspace framework with the Trader Mode tree item active, hides the generic workbench filters only for this section, scopes Trader Mode JS to avoid app globals/hidden-section shortcuts, deploy smoke passed, remote gstack browser verification passed, readonly live analysis smoke passed, and remote ops smoke passed
- [x] Frontend Chinese/English i18n closure: added shared `/static/i18n.js`, default Chinese locale, persistent language selector, dynamic `setText` translation in workbench / Trader Mode / training pages, remote browser evidence for Chinese default and English switch, full unit validation, deploy smoke, remote ops smoke, and readonly live analysis smoke
- [x] Existing frontend dynamic i18n polish closure: expanded zh-CN coverage for dynamic session labels, readiness/runtime codes, candidate card labels, management/evidence JSON keys and common ICT enum values; remote browser audit on `/trader-mode#intraday-candidates` found no tracked English remnants, no visible snake_case remnants in the active candidate section, and no console errors; full unit, deploy smoke, remote ops smoke, and readonly live analysis smoke passed without changing execution/readiness gates
- [x] Next trader-usefulness refinement: compress Trader Mode / watchlist language around why no trade, what to watch next, unique focus quality, stale data, and no-candidate states so the first screen answers live operator questions faster
- [ ] R2 next collection action after readonly launch: wait for or surface a real executable candidate, then build shadow paper ticket / confirm paper execution / record operator feedback / add weekly review evidence without changing execution/live gates
- [x] R3 OKX sandbox preflight starter implemented and deployed: signed dry-run request previews, idempotency key preview, error normalization catalog, `/trading/okx-sandbox-preflight`, live-readiness summary, cockpit surface, deploy smoke, remote ops smoke, and remote field/UI smoke
+181
View File
@@ -247,6 +247,186 @@
'db ready': '数据库就绪',
};
const zhDynamicTerms = {
'source': '来源',
'label': '标签',
'price': '价格',
'id': 'ID',
'model': '模型',
'side': '方向',
'type': '类型',
'field': '字段',
'table': '数据表',
'code': '代码',
'action': '动作',
'trigger': '触发',
'fraction': '比例',
'to': '移至',
'level': '价位',
'direction': '方向',
'buy': '多头',
'sell': '空头',
'bullish': '多头',
'bearish': '空头',
'state': '状态',
'reason': '原因',
'channel': '通道',
'payload': '载荷',
'message': '消息',
'summary': '摘要',
'detail': '详情',
'target': '目标',
'priority': '优先级',
'lane': '队列线',
'queue': '队列',
'focus': '焦点',
'operator': '操作员',
'workflow': '工作流',
'task': '任务',
'note': '备注',
'evidence': '证据',
'feedback': '反馈',
'capture': '捕获',
'delivery': '投递',
'retry': '重试',
'counts': '计数',
'history': '历史',
'context': '上下文',
'handoff': '交接',
'next': '下一步',
'Session': '交易时段',
'Review': '复核',
'Capture': '捕获',
'Execution': '执行',
'position': '仓位',
'running': '运行中',
'disabled': '已禁用',
'true': '是',
'false': '否',
'null': '空',
'objective_layer': '目标层',
'selection_reason': '入选原因',
'liquidity_pools': '流动性池',
'price_high': '最高价',
'price_low': '最低价',
'external_liquidity_pool': '外部流动性池',
'external_liquidity_after_internal_partial': '内部部分扫流后的外部流动性',
'session_external_pivot': '时段外部枢轴',
'invalidated_before_entry': '入场前已失效',
'awaiting_confirmation': '等待确认',
'backtest_lifecycle_state': '回测生命周期状态',
'error_tags': '错误标签',
'risk_checks': '风险检查',
'settlement_source': '结算来源',
'session_code': '交易时段代码',
'signal_side': '信号方向',
'market_truth_ready': '行情真实源就绪',
'runtime_ready': '运行就绪',
'broker_read_ready': '经纪商只读就绪',
'blacklist': '黑名单',
'whitelist': '白名单',
'boundary': '边界',
'links': '链接',
'quality': '质量',
'confirmation chain': '确认链',
'missing requirements': '缺失条件',
'entry zone': '入场区间',
'stop': '止损',
'expiry': '过期时间',
'trust mode': '信任模式',
'management rules': '管理规则',
'evidence links': '证据链接',
'target_plan': '目标计划',
'sweep_id': '扫流 ID',
'dealing_ranges': '交易区间表',
'market_sessions': '交易时段表',
'internal_liquidity_before_external_expansion': '外部扩展前内部流动性',
'internal_liquidity_pool': '内部流动性池',
'dealing_range_boundary': '交易区间边界',
'external_range_liquidity_boundary': '外部区间流动性边界',
'adr_external_projection': 'ADR 外部投射',
'adr_projection': 'ADR 投射',
'average_range': '平均波幅',
'buy_side': '买方流动性',
'sell_side': '卖方流动性',
'close_std_2': '收盘两倍标准差',
'entry_price': '入场价',
'fvg_related_displacement_id': 'FVG 关联位移 ID',
'liquidity_pool': '流动性池',
'management_rules': '管理规则',
'missing_targets': '缺失目标',
'mss_displacement_event_id': 'MSS 位移事件 ID',
'pool_id': '流动性池 ID',
'pool_type': '流动性池类型',
'primary_draw': '主要牵引',
'session_high': '时段高点',
'session_low': '时段低点',
'setup_tf': '形态周期',
'source_counts': '来源计数',
'std_projection': '标准差投射',
'sweep_pool_id': '扫流池 ID',
'timeframe_set': '周期集合',
'trading_plan_id': '交易计划 ID',
'trigger_tf': '触发周期',
'two_standard_deviation_external_projection': '两倍标准差外部投射',
'osok_or_daily_range_context': 'OSOK/日线区间上下文',
'sweep_confirmed': '扫流确认',
'mss_confirmed': 'MSS 确认',
'nearest_internal_range_liquidity': '最近内部区间流动性',
'dealing_range_equilibrium': '交易区间均衡位',
'IRL': '内部流动性',
'ASIA': '亚洲盘',
'LONDON': '伦敦盘',
'NY_AM': '纽约上午盘',
'NY_LUNCH': '纽约午间盘',
'NY_PM': '纽约下午盘',
'OFF_HOURS': '非主要时段',
'credential_missing': '凭据缺失',
'wait_for_confirmations': '等待确认',
'action_recommendation': '动作建议',
'why_allowed': '允许原因',
'why_blocked': '阻塞原因',
'candidate_id': '候选 ID',
'signal_id': '信号 ID',
'instrument_id': '品种 ID',
'range_id': '区间 ID',
'fvg_id': 'FVG ID',
'mss_id': 'MSS ID',
'allowed_sessions': '允许时段',
'invalidation_sources': '失效来源',
'tp1_partial': 'TP1 部分止盈',
'partial_close': '部分平仓',
'tp1_hit': '触及 TP1',
'move_stop': '移动止损',
'breakeven': '保本',
'invalidate_on_reclaim': '收回失效',
'exit': '退出',
'invalidation_reclaim': '失效位收回',
'mss_broken_level_reclaimed': 'MSS 破位被收回',
'structure_event': '结构事件',
'range_low_lost': '跌破区间低点',
'dealing_range': '交易区间',
'fvg_invalidated_or_fully_mitigated': 'FVG 已失效或完全回补',
'fvg_zone': 'FVG 区域',
'invalidated': '已失效',
'expire_by_session': '按时段过期',
'cancel_unfilled_or_flatten': '取消未成交或平仓',
'session_end': '时段结束',
'webhook': 'Webhook',
'workbench': '工作台',
'snoozed_handoff': '已稍后提醒的交接',
'stale_handoff': '过期交接',
'aging_handoff': '临近过期交接',
'fresh_handoff': '新鲜交接',
'operator_resume_queue': '操作员恢复队列',
'resolved_lane_state_counts': '已解决队列线状态计数',
'handoff_lifecycle_summary': '交接生命周期摘要',
'resume_backlog_groups': '恢复积压分组',
'cleanup_execution_log': '清理执行日志',
};
Object.assign(zhExact, zhDynamicTerms);
const zhPhrases = [
['No clean execution signal is available yet.', '还没有干净的执行信号。'],
['Trust gate keeps this in observe-only review.', '信任门禁仍要求仅观察复核。'],
@@ -509,6 +689,7 @@
['Loading case list.', '正在加载案例列表。'],
['Loading progress.', '正在加载进度。'],
['Select a case to review its public context.', '选择一个案例查看公开上下文。'],
...Object.entries(zhDynamicTerms),
];
const zhPatterns = [
+17
View File
@@ -205,6 +205,23 @@ class ApiStaticServerTests(unittest.TestCase):
"open executions",
"avoid_new_risk",
"review_alerts",
"zhDynamicTerms",
"Object.assign(zhExact, zhDynamicTerms)",
"objective_layer",
"selection_reason",
"market_truth_ready",
"why_blocked",
"credential_missing",
"instrument_id",
"allowed_sessions",
"tp1_partial",
"cancel_unfilled_or_flatten",
"confirmation chain",
"missing requirements",
"nearest_internal_range_liquidity",
"internal_liquidity_pool",
"dealing_range_boundary",
"trading_plan_id",
"market_data_fresh",
"operator_feedback_count",
"paper_ticket_sample_gate",