agent-Specialization/modules/i18n_messages/memory_manager.py
JOJO a2cf547400 feat(i18n): 后端用户可见消息国际化(zh/en 双语 + ui_locale 偏好持久化)
- 新增 modules/i18n.py:tr() + 进程级语言缓存 + modules/i18n_messages/ 域文案包自动聚合
- 新增 29 个域文案包,共 1153 条双语 key;90+ 源文件 1146 处用户可见消息 tr 化
- ui_locale 存入 personalization.json(用户级共享),前后端双向同步
- 前端匹配点双语兼容(history/shared/ChatArea/taskPolling/upload 等正则)
- 修复语言判等陷阱:审批等待加稳定 code 字段;conversation.py 不存在判等改双语 helper
- 边界:日志/prompt 注入/子智能体工具回填/容器内嵌脚本不迁移
2026-08-29 07:58:29 +08:00

32 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Backend i18n message pack: memory manager user-visible messages.
Pure data module — do not import anything here. Auto-discovered and merged
by modules/i18n.py at import time.
"""
MESSAGES = {
"memory.append_requires_content": {
"zh-CN": "append 需要 content",
"en-US": "append requires content",
},
"memory.replace_requires_valid_index": {
"zh-CN": "replace 需要有效的 index从1开始",
"en-US": "replace requires a valid index (starting from 1)",
},
"memory.replace_requires_content": {
"zh-CN": "replace 需要 content",
"en-US": "replace requires content",
},
"memory.index_out_of_range": {
"zh-CN": "序号 {index} 超出当前记忆条目数 {total}",
"en-US": "Index {index} exceeds the current memory entry count {total}",
},
"memory.delete_requires_valid_index": {
"zh-CN": "delete 需要有效的 index从1开始",
"en-US": "delete requires a valid index (starting from 1)",
},
"memory.unknown_operation": {
"zh-CN": "未知操作: {operation}",
"en-US": "Unknown operation: {operation}",
},
}