[codex] Localize strategy plugin notice labels#83
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e2e910a54
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "strategy_plugin_action_blocked": "已阻断", | ||
| "strategy_plugin_guidance_crisis_response_shadow_true_crisis_defend": "优先考虑降低杠杆或清理杠杆仓位,暂停加仓;如需保留风险敞口,先降到可承受的小仓位。", | ||
| "strategy_plugin_guidance_crisis_response_shadow_no_action_blocked": "危机路线被风控阻断;先核对数据新鲜度和外部情境,不建议仅凭此条加仓。", | ||
| "strategy_plugin_guidance_macro_risk_governor_delever_delever": "宏观风险控制建议降低杠杆敞口;是否执行由策略侧可回测规则和仓位适配器决定。", |
There was a problem hiding this comment.
Use the risk_reduced route in macro guidance key
When macro_risk_governor emits the route already used by the execution metadata (dual_drive_macro_risk_governor_route is risk_reduced in the existing signal/decision tests) with action delever, the guidance lookup follows the adjacent strategy_plugin_guidance_{plugin}_{route}_{action} pattern. This new _delever_delever key will not match that alert, so zh plugin-bot messages still miss the localized guidance and fall back to the default/English text; add or rename it to strategy_plugin_guidance_macro_risk_governor_risk_reduced_delever.
Useful? React with 👍 / 👎.
| "strategy_plugin_name_crisis_response_shadow": "危机观察通知", | ||
| "strategy_plugin_name_macro_risk_governor": "宏观风险控制通知", | ||
| "strategy_plugin_name_market_regime_control": "市场状态控制通知", | ||
| "strategy_plugin_name_panic_reversal_shadow": "恐慌反转观察通知", |
There was a problem hiding this comment.
Add guidance for panic reversal alerts
This commit localizes the panic_reversal_shadow plugin name/route but adds no strategy_plugin_guidance_panic_reversal_shadow_* key in either locale. When that newly localized plugin produces a panic-reversal alert, the alert body still has no matching localized guidance entry, so Chinese plugin-bot messages can continue falling back to the default/English guidance instead of the intended Chinese instruction; add the guidance key for the emitted route/action pair.
Useful? React with 👍 / 👎.
Summary
Validation
python -m compileall -q notifications/telegram.py tests/test_rebalance_service.pygit diff --checkrequests.