Skip to content

Commit 2c44eb1

Browse files
committed
refactor(i18n): split index.json into per-component files
Split locales/{lang}/index.json into 18 individual JSON files: - One file per UI component (ui-message-view, ui-prompt-input, etc.) - Grouped small dropdowns into ui-dropdowns.json - Grouped undo-related into ui-undo.json - Session, prompt, cli-help remain separate Updated check-i18n.mjs to read all *.json files from locale dirs instead of just index.json. i18n.ts loadLocaleDir() already supports multi-file loading.
1 parent c85a3b1 commit 2c44eb1

39 files changed

Lines changed: 736 additions & 591 deletions

locales/en/cli-help.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"cli": {
3+
"help": {
4+
"title": "deepcode - Deep Code CLI",
5+
"usage": "Usage:",
6+
"launchTui": " deepcode Launch the interactive TUI in the current directory",
7+
"launchWithPrompt": " deepcode -p <prompt> Launch with a pre-filled prompt",
8+
"launchWithPromptLong": " deepcode --prompt <prompt> Same as -p",
9+
"printVersion": " deepcode --version Print the version",
10+
"printHelp": " deepcode --help Show this help",
11+
"configSection": "Configuration:",
12+
"userSettings": " ~/.deepcode/settings.json User-level API key, model, base URL",
13+
"projectSettings": " ./.deepcode/settings.json Project-level settings",
14+
"userSkills": " ~/.agents/skills/*/SKILL.md User-level skills",
15+
"projectSkills": " ./.agents/skills/*/SKILL.md Project-level skills",
16+
"legacySkills": " ./.deepcode/skills/*/SKILL.md Legacy project-level skills",
17+
"tuiSection": "Inside the TUI:",
18+
"enterSend": " enter Send the prompt",
19+
"shiftEnterNewline": " shift+enter Insert a newline",
20+
"homeEnd": " home/end Move within the current line",
21+
"altLeftRight": " alt+left/right Move by word",
22+
"ctrlW": " ctrl+w Delete the previous word",
23+
"ctrlV": " ctrl+v Paste an image from the clipboard",
24+
"ctrlX": " ctrl+x Clear pasted images",
25+
"esc": " esc Interrupt the current model turn",
26+
"slash": " / Open the skills/commands menu",
27+
"slashSkills": " /skills List available skills",
28+
"slashModel": " /model Select model, thinking mode and effort control",
29+
"slashNew": " /new Start a fresh conversation",
30+
"slashInit": " /init Initialize an AGENTS.md file with instructions for LLM",
31+
"slashResume": " /resume Pick a previous conversation to continue",
32+
"slashContinue": " /continue Continue the active conversation, or resume one if empty",
33+
"slashUndo": " /undo Restore code and/or conversation to a previous point",
34+
"slashMcp": " /mcp Show MCP server status and available tools",
35+
"slashRaw": " /raw Toggle display mode for viewing or collapsing reasoning content",
36+
"slashExit": " /exit Quit",
37+
"slashConfig": " /config Configure language settings",
38+
"ctrlD": " ctrl+d twice Quit",
39+
"ttyRequired": "deepcode requires an interactive terminal (TTY). Re-run from a real terminal session."
40+
}
41+
}
42+
}

locales/en/index.json

Lines changed: 0 additions & 290 deletions
This file was deleted.

locales/en/prompt.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"prompt": {
3+
"skillDocumentsHeader": "Use the skill documents below to assist the user:\n",
4+
"dateAndModel": "Today is {date}. As the conversation progresses, time passes.\nCurrent LLM model is {model}. You can switch models using the /model command.",
5+
"thinkingLanguageInstruction": "IMPORTANT: Your reasoning and thinking process should be in English.",
6+
"replyLanguageInstruction": "IMPORTANT: Always respond to the user in English."
7+
}
8+
}

locales/en/session.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"session": {
3+
"compacting": "The conversation is getting long, compacting...",
4+
"skillPromptHeader": "Use the skill document below to assist the user:\n"
5+
}
6+
}

locales/en/ui-app.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"ui": {
3+
"app": {
4+
"error": "Error: {message}",
5+
"statusStatus": "status: {status}",
6+
"statusTokens": "tokens: {tokens}",
7+
"statusFail": "fail: {reason}",
8+
"interrupted": "Interrupted.",
9+
"killedProcesses": "Killed processes: {pids}",
10+
"failedKillProcesses": "Failed to kill processes: {pids}",
11+
"modelUnchanged": "Model settings unchanged",
12+
"modelUpdated": "Model settings updated: {before} → {after}",
13+
"noActiveSession": "No active session to undo.",
14+
"codeRestoreFailed": "Code restore failed: {error}",
15+
"conversationRestoreFailed": "Conversation restore failed: {error}",
16+
"sessionAgentSteps": "The AI agent has taken several steps but hasn't reached a conclusion yet. Do you want to continue?",
17+
"apiKeyNotFound": "OpenAI API key not found. Please configure ~/.deepcode/settings.json or ./.deepcode/settings.json.",
18+
"requestFailed": "Request failed: {error}",
19+
"pressEscExitRaw": "Press ESC to exit raw mode",
20+
"noMessagesInSession": "(No messages in this session yet. Start chatting to see them here.)"
21+
}
22+
}
23+
}

locales/en/ui-ask-question.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ui": {
3+
"askUserQuestion": {
4+
"selectOptionHelp": "Select an option, or type an Other answer.",
5+
"selectMultiHelp": "Select at least one option with Space, or type an Other answer.",
6+
"typeAnswerHelp": "Type your answer · Backspace edit · Enter submit/next · ↑ choose presets · Esc type manually",
7+
"otherLabel": "Other",
8+
"selectMultiMove": "↑/↓ move · Space toggle · Enter submit/next · Esc type manually",
9+
"selectSingleMove": "↑/↓ move · Enter select/next · Esc type manually"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)