Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 67 additions & 19 deletions src/quant_platform_kit/common/notification_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,34 @@

STRATEGY_PLUGIN_I18N: dict[str, dict[str, str]] = {
"zh": {
"strategy_plugin_alert_locale": "zh-CN",
"strategy_plugin_alert_reason_joiner": "、",
"strategy_plugin_alert_reason_none": "未提供明确原因",
"strategy_plugin_line": "🧩 插件:{plugin} | 状态:{route} | 提醒:{action}",
"strategy_plugin_alert_subject": "🚨 策略插件告警:{plugin} | {route}",
"strategy_plugin_alert_title": "🚨 【策略插件告警】",
"strategy_plugin_alert_context": "运行环境:{context}",
"strategy_plugin_alert_subject": "策略插件提醒:{plugin} | {route}",
"strategy_plugin_alert_title": "【策略插件提醒】",
"strategy_plugin_alert_context": "发布来源:{context}",
"strategy_plugin_alert_context_strategy_plugin_publish": "插件发布 / {target}",
"strategy_plugin_alert_target": "{target_name}:{target}",
"strategy_plugin_alert_target_name_strategy": "策略",
"strategy_plugin_alert_target_name_notification_target": "通知目标",
"strategy_plugin_alert_target_name_notification_target": "通知对象",
"strategy_plugin_alert_strategy": "策略:{strategy}",
"strategy_plugin_alert_plugin": "插件:{plugin}",
"strategy_plugin_alert_status": "状态:{route}",
"strategy_plugin_alert_action": "人工处理建议:{action}",
"strategy_plugin_alert_situation": "当前情况:{situation}",
"strategy_plugin_alert_recommendation": "建议处理:{recommendation}",
"strategy_plugin_alert_status": "插件状态:{route}",
"strategy_plugin_alert_action": "动作边界:{action}",
"strategy_plugin_alert_mode": "模式:{mode}",
"strategy_plugin_alert_as_of": "信号时间:{as_of}",
"strategy_plugin_alert_guidance": "处置建议:{guidance}",
"strategy_plugin_alert_scope_note": "执行范围:{scope_note}",
"strategy_plugin_alert_scope": "仅作人工复核提醒;插件不会自动下单或改仓位",
"strategy_plugin_alert_scope_note": "自动化边界:{scope_note}",
"strategy_plugin_alert_scope": "这条通知只用于人工复核;插件不会自动下单,也不会直接修改仓位",
"strategy_plugin_name_crisis_response_shadow": "危机观察通知",
"strategy_plugin_name_macro_risk_governor": "宏观风险控制通知",
"strategy_plugin_name_market_regime_control": "市场状态控制通知",
"strategy_plugin_name_market_regime_control": "市场状态控制",
"strategy_plugin_name_panic_reversal_shadow": "恐慌反转观察通知",
"strategy_plugin_name_taco_rebound_shadow": "TACO 反弹观察通知",
"strategy_plugin_notification_target_market_regime_notification": "统一市场状态通知",
"strategy_plugin_mode_shadow": "影子观察",
"strategy_plugin_route_blocked": "已阻断",
"strategy_plugin_route_crisis": "危机",
Expand All @@ -61,13 +68,30 @@
"strategy_plugin_route_unknown_route": "未知状态",
"strategy_plugin_route_watch": "观察",
"strategy_plugin_action_no_action": "不操作",
"strategy_plugin_action_watch_only": "仅通知",
"strategy_plugin_action_watch_only": "仅观察,不自动交易",
"strategy_plugin_action_notify_manual_review": "通知人工复核",
"strategy_plugin_action_defend": "防守",
"strategy_plugin_action_delever": "降杠杆",
"strategy_plugin_action_blocked": "已阻断",
"strategy_plugin_action_monitor": "持续观察",
"strategy_plugin_action_unknown_action": "未知提醒",
"strategy_plugin_situation_watch_watch_only": "当前不是危机,也不是自动抄底信号;插件只提示市场进入观察状态。触发原因:{reasons}。",
"strategy_plugin_situation_market_regime_control_watch_watch_only": "当前不是危机,也不是自动抄底信号;市场状态控制只提示波动或宏观条件进入观察区。触发原因:{reasons}。",
"strategy_plugin_situation_market_regime_control_risk_reduced_delever": "市场压力升高,策略可能需要按已批准的可回测规则降杠杆。触发原因:{reasons}。",
"strategy_plugin_situation_market_regime_control_risk_off_defend": "市场状态进入防守区,机会类信号应先让位给风险控制。触发原因:{reasons}。",
"strategy_plugin_situation_market_regime_control_opportunity_watch_notify_manual_review": "出现可能的反弹或低吸窗口,但证据只够人工复核,不足以自动交易。触发原因:{reasons}。",
"strategy_plugin_situation_market_regime_control_blocked_blocked": "数据质量或新鲜度保护触发,当前插件信号不能直接使用。触发原因:{reasons}。",
"strategy_plugin_situation_taco_rebound_shadow_taco_rebound_notify_manual_review": "出现 TACO 反弹观察窗口;这属于人工复核机会,不是自动买入信号。触发原因:{reasons}。",
"strategy_plugin_situation_true_crisis_defend": "危机防守信号已触发,需要优先处理风险敞口。触发原因:{reasons}。",
"strategy_plugin_situation_delever_delever": "降杠杆信号已触发,需要按策略规则压低风险敞口。触发原因:{reasons}。",
"strategy_plugin_situation_notify_manual_review": "插件发现需要人工复核的市场状态。触发原因:{reasons}。",
"strategy_plugin_situation_default": "插件发现需要关注的市场状态。触发原因:{reasons}。",
"strategy_plugin_recommendation_watch_only": "先人工核对市场环境和现有仓位;策略仓位不因这条通知自动调整,具体买卖仍以策略运行结果或人工确认执行。",
"strategy_plugin_recommendation_notify_manual_review": "人工复核触发原因、新闻/宏观背景、现有仓位和失效条件;未确认前不要把这条通知当成下单指令。",
"strategy_plugin_recommendation_defend": "优先确认策略运行结果和账户约束;如果策略已触发自动防守,由策略通知和仓位适配器执行,插件通知本身不直接下单。",
"strategy_plugin_recommendation_delever": "优先确认策略运行结果和账户约束;如果策略已触发自动降杠杆,由策略通知和仓位适配器执行,插件通知本身不直接下单。",
"strategy_plugin_recommendation_blocked": "先修复数据源或产物新鲜度,再决定是否人工处理;不要基于被阻断的信号调仓。",
"strategy_plugin_recommendation_default": "先人工复核,再决定是否交给策略规则或人工流程处理;不要把插件通知直接当作交易指令。",
"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": "宏观风险控制建议降低杠杆敞口;是否执行由策略侧可回测规则和仓位适配器决定。",
Expand All @@ -79,27 +103,34 @@
"strategy_plugin_guidance_taco_rebound_shadow_taco_rebound_notify_manual_review": "TACO 仅提示可能的反弹窗口;可考虑小仓位、分批、预设止损/失效条件的人工博弈,不建议一次性满仓。",
},
"en": {
"strategy_plugin_alert_locale": "en-US",
"strategy_plugin_alert_reason_joiner": ", ",
"strategy_plugin_alert_reason_none": "no explicit reason provided",
"strategy_plugin_line": "🧩 Plugin: {plugin} | status: {route} | notice: {action}",
"strategy_plugin_alert_subject": "🚨 Strategy plugin alert: {plugin} | {route}",
"strategy_plugin_alert_title": "🚨 【Strategy Plugin Alert】",
"strategy_plugin_alert_context": "Context: {context}",
"strategy_plugin_alert_subject": "Strategy plugin notice: {plugin} | {route}",
"strategy_plugin_alert_title": "【Strategy Plugin Notice】",
"strategy_plugin_alert_context": "Source: {context}",
"strategy_plugin_alert_context_strategy_plugin_publish": "plugin publish / {target}",
"strategy_plugin_alert_target": "{target_name}: {target}",
"strategy_plugin_alert_target_name_strategy": "Strategy",
"strategy_plugin_alert_target_name_notification_target": "Notification target",
"strategy_plugin_alert_target_name_notification_target": "Notification scope",
"strategy_plugin_alert_strategy": "Strategy: {strategy}",
"strategy_plugin_alert_plugin": "Plugin: {plugin}",
"strategy_plugin_alert_status": "Status: {route}",
"strategy_plugin_alert_action": "Notice: {action}",
"strategy_plugin_alert_situation": "Situation: {situation}",
"strategy_plugin_alert_recommendation": "Suggested review: {recommendation}",
"strategy_plugin_alert_status": "Plugin status: {route}",
"strategy_plugin_alert_action": "Action boundary: {action}",
"strategy_plugin_alert_mode": "Mode: {mode}",
"strategy_plugin_alert_as_of": "Signal as-of: {as_of}",
"strategy_plugin_alert_guidance": "Manual guidance: {guidance}",
"strategy_plugin_alert_scope_note": "Execution scope: {scope_note}",
"strategy_plugin_alert_scope": "Manual review notice only; the plugin does not place orders or change allocations",
"strategy_plugin_alert_scope_note": "Automation boundary: {scope_note}",
"strategy_plugin_alert_scope": "Manual review notice only; the plugin does not place orders or directly change allocations",
"strategy_plugin_name_crisis_response_shadow": "Crisis Watch Notice",
"strategy_plugin_name_macro_risk_governor": "Macro Risk Governor Notice",
"strategy_plugin_name_market_regime_control": "Market Regime Control Notice",
"strategy_plugin_name_market_regime_control": "Market Regime Control",
"strategy_plugin_name_panic_reversal_shadow": "Panic Reversal Watch Notice",
"strategy_plugin_name_taco_rebound_shadow": "TACO Rebound Watch Notice",
"strategy_plugin_notification_target_market_regime_notification": "Unified market-regime notification",
"strategy_plugin_mode_shadow": "shadow",
"strategy_plugin_route_blocked": "blocked",
"strategy_plugin_route_crisis": "crisis",
Expand All @@ -121,6 +152,23 @@
"strategy_plugin_action_blocked": "blocked",
"strategy_plugin_action_monitor": "watch",
"strategy_plugin_action_unknown_action": "unknown notice",
"strategy_plugin_situation_watch_watch_only": "This is not a crisis signal and not an automatic dip-buy signal; the plugin is only flagging a watch state. Trigger: {reasons}.",
"strategy_plugin_situation_market_regime_control_watch_watch_only": "This is not a crisis signal and not an automatic dip-buy signal; market-regime control is only flagging volatility or macro conditions for review. Trigger: {reasons}.",
"strategy_plugin_situation_market_regime_control_risk_reduced_delever": "Market stress has risen; the strategy may need to reduce leverage under approved backtestable rules. Trigger: {reasons}.",
"strategy_plugin_situation_market_regime_control_risk_off_defend": "The market regime is defensive; opportunity signals should give way to risk control. Trigger: {reasons}.",
"strategy_plugin_situation_market_regime_control_opportunity_watch_notify_manual_review": "A possible rebound or dip-buy window is present, but the evidence is only strong enough for manual review, not automatic trading. Trigger: {reasons}.",
"strategy_plugin_situation_market_regime_control_blocked_blocked": "Data-quality or freshness guards blocked the signal, so it should not be used directly. Trigger: {reasons}.",
"strategy_plugin_situation_taco_rebound_shadow_taco_rebound_notify_manual_review": "A TACO rebound watch window is present; this is a manual-review opportunity, not an automatic buy signal. Trigger: {reasons}.",
"strategy_plugin_situation_true_crisis_defend": "A crisis-defense signal is active and risk exposure needs priority review. Trigger: {reasons}.",
"strategy_plugin_situation_delever_delever": "A de-lever signal is active and risk exposure should be reduced under strategy rules. Trigger: {reasons}.",
"strategy_plugin_situation_notify_manual_review": "The plugin found a market state that needs manual review. Trigger: {reasons}.",
"strategy_plugin_situation_default": "The plugin found a market state that needs attention. Trigger: {reasons}.",
"strategy_plugin_recommendation_watch_only": "Review the market context and current holdings first; this notice does not automatically change strategy exposure, and any trade should come from the strategy run or an explicit manual decision.",
"strategy_plugin_recommendation_notify_manual_review": "Review the trigger, news or macro context, current exposure, and invalidation level before acting; do not treat this notice as an order instruction.",
"strategy_plugin_recommendation_defend": "Confirm the strategy run and account constraints first; if automatic defense is active, execution belongs to the strategy notification and position adapter, not to this plugin notice.",
"strategy_plugin_recommendation_delever": "Confirm the strategy run and account constraints first; if automatic de-levering is active, execution belongs to the strategy notification and position adapter, not to this plugin notice.",
"strategy_plugin_recommendation_blocked": "Fix source data or artifact freshness before acting; do not adjust exposure from a blocked signal.",
"strategy_plugin_recommendation_default": "Review manually first, then decide whether the action belongs to strategy rules or a manual process; do not treat the plugin notice as a trade instruction.",
"strategy_plugin_guidance_crisis_response_shadow_true_crisis_defend": "Consider reducing or clearing leveraged exposure, then pause new risk additions; if keeping exposure, resize it to a small amount you can tolerate.",
"strategy_plugin_guidance_crisis_response_shadow_no_action_blocked": "A guard blocked the crisis route; verify data freshness and external context before acting on this alert.",
"strategy_plugin_guidance_macro_risk_governor_delever_delever": "The macro risk governor suggests reducing leveraged exposure; execution is controlled by strategy-side backtestable rules and position adapters.",
Expand Down
Loading