Skip to content

Commit d538944

Browse files
committed
i18n: 翻译 feedConfigs 和 dream.ts 为中文
- 将 LogoV2/feedConfigs.tsx 中的界面文本翻译为简体中文 - 将 skills/bundled/dream.ts 中的注释和提示词翻译为中文
1 parent b35ef93 commit d538944

2 files changed

Lines changed: 21 additions & 22 deletions

File tree

src/components/LogoV2/feedConfigs.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export function createRecentActivityFeed(activities: LogOption[]): FeedConfig {
2525
})
2626

2727
return {
28-
title: 'Recent activity',
28+
title: '最近活动',
2929
lines,
30-
footer: lines.length > 0 ? '/resume for more' : undefined,
31-
emptyMessage: 'No recent activity',
30+
footer: lines.length > 0 ? '/resume 查看更多' : undefined,
31+
emptyMessage: '暂无最近活动',
3232
}
3333
}
3434

@@ -50,16 +50,16 @@ export function createWhatsNewFeed(releaseNotes: string[]): FeedConfig {
5050

5151
const emptyMessage =
5252
process.env.USER_TYPE === 'ant'
53-
? 'Unable to fetch latest claude-cli-internal commits'
54-
: 'Check the Claude Code changelog for updates'
53+
? '无法获取最新 claude-cli-internal 提交记录'
54+
: '查看 Claude Code 更新日志以获取更新'
5555

5656
return {
5757
title:
5858
process.env.USER_TYPE === 'ant'
59-
? "What's new [ANT-ONLY: Latest CC commits]"
60-
: "What's new",
59+
? "最新动态 [仅内部: 最新 CC 提交]"
60+
: "最新动态",
6161
lines,
62-
footer: lines.length > 0 ? '/release-notes for more' : undefined,
62+
footer: lines.length > 0 ? '/release-notes 查看更多' : undefined,
6363
emptyMessage,
6464
}
6565
}
@@ -78,7 +78,7 @@ export function createProjectOnboardingFeed(steps: Step[]): FeedConfig {
7878

7979
const warningText =
8080
getCwd() === homedir()
81-
? 'Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.'
81+
? '提示: 你已在主目录中启动 claude。为获得最佳体验,建议在项目目录中启动。'
8282
: undefined
8383

8484
if (warningText) {
@@ -88,18 +88,18 @@ export function createProjectOnboardingFeed(steps: Step[]): FeedConfig {
8888
}
8989

9090
return {
91-
title: 'Tips for getting started',
91+
title: '入门提示',
9292
lines,
9393
}
9494
}
9595

9696
export function createGuestPassesFeed(): FeedConfig {
9797
const reward = getCachedReferrerReward()
9898
const subtitle = reward
99-
? `Share Claude Code and earn ${formatCreditAmount(reward)} of extra usage`
100-
: 'Share Claude Code with friends'
99+
? `分享 Claude Code 可获得 ${formatCreditAmount(reward)} 额外使用额度`
100+
: '与朋友分享 Claude Code'
101101
return {
102-
title: '3 guest passes',
102+
title: '3 个访客邀请码',
103103
lines: [],
104104
customContent: {
105105
content: (

src/skills/bundled/dream.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// Manual /dream skill — runs the memory consolidation prompt interactively.
2-
// Extracted from the KAIROS feature gate so it's available unconditionally
3-
// whenever auto-memory is enabled.
1+
// 手动 /dream 技能 — 交互式运行记忆整合提示词。
2+
// 从 KAIROS 功能门控中提取,只要启用了自动记忆功能即可无条件使用。
43

54
import { getAutoMemPath, isAutoMemoryEnabled } from '../../memdir/paths.js'
65
import { buildConsolidationPrompt } from '../../services/autoDream/consolidationPrompt.js'
@@ -9,33 +8,33 @@ import { getOriginalCwd } from '../../bootstrap/state.js'
98
import { getProjectDir } from '../../utils/sessionStorage.js'
109
import { registerBundledSkill } from '../bundledSkills.js'
1110

12-
const DREAM_PROMPT_PREFIX = `# Dream: Memory Consolidation (manual run)
11+
const DREAM_PROMPT_PREFIX = `# Dream: 记忆整合(手动运行)
1312
14-
You are performing a manual dream — a reflective pass over your memory files. Unlike the automatic background dream, this run has full tool permissions and the user is watching. Synthesize what you've learned recently into durable, well-organized memories so that future sessions can orient quickly.
13+
你正在执行一次手动 dream — 对你的记忆文件进行回顾性整理。与自动后台 dream 不同,本次运行拥有完整的工具权限,且用户正在观看。将最近学到的内容整合为持久、有条理的记忆,以便未来的会话能够快速定位。
1514
1615
`
1716

1817
export function registerDreamSkill(): void {
1918
registerBundledSkill({
2019
name: 'dream',
2120
description:
22-
'Manually trigger memory consolidation — review, organize, and prune your auto-memory files.',
21+
'手动触发记忆整合 — 审查、整理和清理你的自动记忆文件。',
2322
whenToUse:
24-
'Use when the user says /dream or wants to manually consolidate memories, organize memory files, or clean up stale entries.',
23+
'当用户说 /dream 或希望手动整合记忆、整理记忆文件或清理过时条目时使用。',
2524
userInvocable: true,
2625
isEnabled: () => isAutoMemoryEnabled(),
2726
async getPromptForCommand(args) {
2827
const memoryRoot = getAutoMemPath()
2928
const transcriptDir = getProjectDir(getOriginalCwd())
3029

31-
// Stamp the consolidation lock optimistically (same as the KAIROS path).
30+
// 乐观地标记整合锁定(与 KAIROS 路径相同)。
3231
await recordConsolidation()
3332

3433
const basePrompt = buildConsolidationPrompt(memoryRoot, transcriptDir, '')
3534
let prompt = DREAM_PROMPT_PREFIX + basePrompt
3635

3736
if (args) {
38-
prompt += `\n\n## Additional context from user\n\n${args}`
37+
prompt += `\n\n## 用户提供的额外上下文\n\n${args}`
3938
}
4039

4140
return [{ type: 'text', text: prompt }]

0 commit comments

Comments
 (0)