Commit Graph

6 Commits

Author SHA1 Message Date
PaloSP
b0a3fdf95f feat: add terminal shortcuts panel for mobile (#411)
* feat: add terminal shortcuts panel for mobile users

Slide-out panel providing touch-friendly shortcut buttons (Esc, Tab,
Shift+Tab, Arrow Up/Down) and scroll-to-bottom for the terminal.
Integrates into the new modular shell architecture by exposing
terminalRef and wsRef from useShellRuntime hook and reusing the
existing sendSocketMessage utility.

Includes localization keys for en, ja, ko, and zh-CN.

* fix: replace dual touch/click handlers with unified pointer events

Prevents double-fire on touch devices by removing onTouchEnd handlers
and using a single onClick for all interactions (mouse, touch, keyboard).
onPointerDown with preventDefault handles focus steal prevention.
Also clears pending close timer before scheduling a new one to avoid
stale timeout overlap.

Addresses CodeRabbit review feedback on PR #411.

---------

Co-authored-by: Haileyesus <118998054+blackmammoth@users.noreply.github.com>
2026-03-04 11:41:00 +03:00
simosmik
855e22f917 fix: missing translation label 2026-03-03 13:18:08 +00:00
YuanNiancai
5131d2ae27 add some translations for CodeEditor.jsx、QuickSettingsPanel.jsx 2026-01-22 14:57:32 +08:00
YuanNiancai
73375d7653 fix: improve i18n translation strings based on code review
Refactored translation strings to follow best practices:

1. Removed HTML tags from translation strings (en/chat.json)
   - Changed "Adds <span class=\"font-mono\">{{entry}}</span>" to "Adds {{entry}}"

2. Simplified TasksSettings.jsx component (TasksSettings.jsx)
   - Moved command code directly into translation file

3. Updated both English and Chinese translation files
   - en/chat.json: Removed HTML markup from permissions.addTo
   - zh-CN/chat.json: Corresponding Chinese translation update
   - en/settings.json: Added task-master init command
   -zh-CN/settings.json: Added task-master init command in Chinese

根据代码审查改进 i18n 翻译字符串:

1. 从翻译字符串中移除 HTML 标签(en/chat.json)
   - 将 "Adds <span class=\"font-mono\">{{entry}}</span>" 改为 "Adds {{entry}}"

2. 简化 TasksSettings.jsx 组件
   - 将命令代码直接移到翻译文件中

3. 更新英文和中文翻译文件
   - en/chat.json: 从 permissions.addTo 移除 HTML 标记
   - zh-CN/chat.json: 对应的中文翻译更新
   - en/settings.json: 添加 task-master init 命令
   - zh-CN/settings.json: 添加 task-master init 命令的中文翻译
2026-01-21 14:29:16 +08:00
YuanNiancai
0517ee609e feat: complete internationalization (i18n) for components
Implemented comprehensive i18n translation support for the following components:

1. GitSettings.jsx - Git configuration interface
2. ApiKeysSettings.jsx - API keys settings
3. CredentialsSettings.jsx - Credentials settings (GitHub tokens)
4. TasksSettings.jsx - TaskMaster task management settings
5. ChatInterface.jsx - Chat interface (major translation work)

New translation files:
- src/i18n/locales/en/chat.json - English chat interface translations
- src/i18n/locales/zh-CN/chat.json - Chinese chat interface translations

ChatInterface.jsx translations:
- Code block copy buttons (Copy, Copied, Copy code)
- Message type labels (User, Error, Tool, Claude, Cursor, Codex)
- Tool settings tooltip
- Search result display (pattern, in, results)
- Codex permission modes (Default, Accept Edits, Bypass Permissions, Plan)
- Input placeholder and hint text
- Keyboard shortcut hints (Ctrl+Enter/Enter modes)
- Command menu button

i18n configuration updates:
- Registered chat namespace in config.js
- Extended settings.json translations (git, apiKeys, tasks, agents, mcpServers sections)

完成以下组件的 i18n 翻译工作:

1. GitSettings.jsx - Git 配置界面
2. ApiKeysSettings.jsx - API 密钥设置
3. CredentialsSettings.jsx - 凭据设置(GitHub Token)
4. TasksSettings.jsx - TaskMaster 任务管理设置
5. ChatInterface.jsx - 聊天界面(主要翻译工作)

新增翻译文件:
- src/i18n/locales/en/chat.json - 英文聊天界面翻译
- src/i18n/locales/zh-CN/chat.json - 中文聊天界面翻译

ChatInterface.jsx 翻译内容:
- 代码块复制按钮
- 消息类型标签
- 工具设置提示
- 搜索结果显示
- Codex 权限模式(默认、编辑、无限制、计划模式)
- 输入框占位符和提示文本
- 键盘快捷键提示
- 命令菜单按钮

更新 i18n 配置:
- 在 config.js 中注册 chat 命名空间
- 扩展 settings.json 翻译(git、apiKeys、tasks、agents、mcpServers 等部分)
2026-01-21 13:58:30 +08:00
YuanNiancai
4216676395 add i18n feat && Add partial translation 2026-01-16 19:11:19 +08:00