newmark-agent 0.4.0 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Lightweight terminal i18n for the Newmark TUI.
5
+ *
6
+ * The TUI chrome (navigation, section headers, view titles, and hints) is
7
+ * rendered in the language chosen under Settings → General → Language. Model,
8
+ * tool, provider, conversation, and workspace names are user data and stay
9
+ * verbatim. Keys are the English source strings, so an untranslated string
10
+ * silently falls back to English rather than dropping text.
11
+ */
12
+
13
+ const ZH = Object.freeze({
14
+ // Sidebar sections
15
+ "WORKSPACES": "工作区",
16
+ "OPERATIONS": "操作",
17
+ "ACTIVE TARGET": "当前目标",
18
+ "ACTIVE CONVERSATION": "当前对话",
19
+ "Agent TUI": "Agent 终端",
20
+
21
+ // Navigation labels (TUI/src/data.js)
22
+ "Conversations": "对话",
23
+ "Plan": "计划",
24
+ "Goal": "目标",
25
+ "Subagents": "子代理",
26
+ "Model": "模型",
27
+ "Flow Bar": "流程条",
28
+ "Flow List": "流程列表",
29
+ "Flow Task": "流程任务",
30
+ "Tools": "工具",
31
+ "Memory Lab": "记忆实验室",
32
+ "Automations": "自动化",
33
+ "WorkFlow": "工作流",
34
+ "Settings": "设置",
35
+ "Help": "帮助",
36
+
37
+ // Conversation context
38
+ "Conversation plan": "对话计划",
39
+ "Conversation goal": "对话目标",
40
+ "Conversation subagents": "对话子代理",
41
+ "Model and reasoning effort": "模型与推理档位",
42
+ "Flow bar": "流程条",
43
+ "Flow list": "流程列表",
44
+ "Flow task": "流程任务",
45
+
46
+ // Model view
47
+ "Reasoning effort": "推理档位",
48
+ "Deployment": "部署",
49
+ "Shared GUI/TUI request tier · ←/→ changes section": "GUI/TUI 共享请求档位 · ←/→ 切换区块",
50
+ "Used by this conversation, including its Plan and Subagents": "当前对话使用(含计划与子代理)",
51
+ "Enter applies the focused tier or deployment. Effort persists globally; deployments remain per conversation.":
52
+ "Enter 应用当前档位或部署。档位全局持久化,部署按对话保存。",
53
+
54
+ // Memory Lab
55
+ "Tags": "标签",
56
+ "Selected tag": "已选标签",
57
+ "Child tags": "子标签",
58
+ "Memory components": "记忆组件",
59
+ "Core memory": "核心记忆",
60
+ "No memory components": "无记忆组件",
61
+ "No component selected": "未选择组件",
62
+ "Overview": "总览",
63
+ "Memory overview": "记忆总览",
64
+ "Memory tag": "记忆标签",
65
+
66
+ // Chat view
67
+ "N new": "N 新建",
68
+ "Workspace": "工作区",
69
+ "Current": "当前",
70
+ "Preview": "预览",
71
+ "Current conversation": "当前对话",
72
+ "Enter to open this conversation": "Enter 打开此对话",
73
+ "Type a message · Shift+Enter newline · Enter send": "输入消息 · Shift+Enter 换行 · Enter 发送",
74
+ "Select a conversation · Enter to edit": "选择对话 · Enter 编辑",
75
+
76
+ // Settings categories
77
+ "General": "通用",
78
+ "Personalization": "个性化",
79
+ "Runtime": "运行时",
80
+ "Providers": "服务商",
81
+ "Models": "模型",
82
+ "Archive": "归档",
83
+ "Updates": "更新",
84
+
85
+ // Settings
86
+ "Categories": "分类",
87
+ "Language": "语言",
88
+ "Input mode": "输入模式",
89
+ "Conversation style": "对话风格",
90
+ "Option feedback": "选项反馈",
91
+ "Close behavior": "关闭行为",
92
+ "Expand tool usage": "展开工具使用",
93
+ "Theme": "主题",
94
+ "Application font": "应用字体",
95
+ "Font color": "字体颜色",
96
+ "Background color": "背景颜色",
97
+ "Glass intensity": "玻璃强度",
98
+ "Agent backend": "Agent 后端",
99
+ "WSL distribution": "WSL 发行版",
100
+ "Terminal timeout cap": "终端超时上限",
101
+ "Default shell": "默认 Shell",
102
+ "Automatic archive": "自动归档",
103
+ "Retention": "保留期",
104
+ "Include Memory Lab": "包含记忆实验室",
105
+ "Export format": "导出格式",
106
+ "Update channel": "更新通道",
107
+ "Automatic checks": "自动检查",
108
+ "Automatic download": "自动下载",
109
+ "Update source": "更新来源",
110
+ "Live color preview": "实时颜色预览",
111
+
112
+ // Plan / Goal / Agents
113
+ "Linked Plan": "关联计划",
114
+ "Next handoff": "下一交接",
115
+ "Linked goal": "关联目标",
116
+ "No active goal": "无活动目标",
117
+ "RESULT": "结果",
118
+ "No messages recorded yet.": "暂无消息记录。",
119
+ "Records come from the active Newmark conversation": "记录来自当前 Newmark 对话",
120
+
121
+ // Tools
122
+ "Tools & connectors": "工具与连接器",
123
+ "Live runtime": "实时运行时",
124
+ "Safety boundary": "安全边界",
125
+
126
+ // Automation / Workflow
127
+ "[+] New automation": "[+] 新建自动化",
128
+ "[+] New workflow": "[+] 新建工作流",
129
+ "No workflows configured.": "未配置工作流。",
130
+
131
+ // Help
132
+ "SHORTCUT GUIDE": "快捷键指南",
133
+ "Navigation": "导航",
134
+ "Conversation editing": "对话编辑",
135
+ "Running work": "运行中的工作",
136
+ "Operation content": "操作内容",
137
+ "Global": "全局"
138
+ });
139
+
140
+ function resolveLanguage(state) {
141
+ const value = String(state?.settings?.general?.language || "Auto");
142
+ return value === "中文" || value === "zh" ? "zh" : "en";
143
+ }
144
+
145
+ function tr(state, text) {
146
+ const value = String(text ?? "");
147
+ if (resolveLanguage(state) === "zh") return ZH[value] || value;
148
+ return value;
149
+ }
150
+
151
+ module.exports = { resolveLanguage, tr };