Skip to content

Commit b464a21

Browse files
committed
docs(CLAUDE.md): update CLAUDE.md with internationalization overview, feature list, and usage details
1 parent ca104ac commit b464a21

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

CLAUDE.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Gemini Desktop is a powerful, cross-platform desktop and web application that pr
2727
- **Multi-backend support**: Gemini CLI and Qwen Code integration
2828
- **Project management**: Session-based workspace management with chat history
2929
- **Security-first design**: Comprehensive command filtering and permission system
30+
- **Internationalization**: Full i18n support with language switching for English, Chinese Simplified, and Traditional Chinese
3031
- **Custom title bar**: Enhanced desktop experience with native window controls
3132
- **About dialog**: Integrated help and version information
3233
- **Resizable sidebar**: Interactive sidebar with drag-to-resize functionality and persistent width settings
@@ -113,6 +114,8 @@ The project is organized as a Rust workspace with three main crates:
113114
- `ToolCallsList.tsx` - Tool execution history
114115
- `ToolResultRenderer.tsx` - Tool output formatting
115116
- `UserAvatar.tsx` - User profile display
117+
- `LanguageSwitcher.tsx` - Language selection interface with flag icons
118+
- `I18nExample.tsx` - Translation demonstration component
116119
- **`conversation/`** - Chat interface components
117120
- `ConversationList.tsx` - Message history and pagination
118121
- `MessageInputBar.tsx` - Text input with mention support
@@ -161,6 +164,10 @@ The project is organized as a Rust workspace with three main crates:
161164
- Message history and pagination
162165
- Tool call confirmation state
163166
- Real-time event integration
167+
- **`LanguageContext.tsx`** - Internationalization management
168+
- Current language state and persistence
169+
- Language switching functionality
170+
- Browser language detection integration
164171

165172
#### Custom Hooks
166173
- **`useCliInstallation.ts`** - CLI availability detection
@@ -203,6 +210,9 @@ The project is organized as a Rust workspace with three main crates:
203210
- **next-themes** - Theme management system
204211
- **class-variance-authority** - CSS class variance utilities
205212
- **Google Generative AI** - Direct Gemini API integration
213+
- **react-i18next** - Internationalization framework with hooks and components
214+
- **i18next** - Core internationalization library with interpolation and pluralization
215+
- **i18next-browser-languagedetector** - Browser language detection and persistence
206216

207217
### Development Tools
208218
- **Just** - Task runner and build automation
@@ -603,13 +613,22 @@ gemini-desktop/
603613
- **Chat history** stored in structured format
604614
- **Tool call logs** for debugging and replay
605615
- **Custom title bar** for enhanced desktop experience
616+
- **Full internationalization** with language detection and persistence
606617

607618
#### Authentication
608619
- **API key storage** (encrypted/secure storage planned)
609620
- **Multiple provider support** (Gemini, Vertex AI, Qwen)
610621
- **Session-based authentication** for web mode
611622
- **Unified backend configuration** with validation
612623

624+
#### Internationalization
625+
- **Language support**: English, Simplified Chinese, Traditional Chinese
626+
- **Browser language detection** with automatic fallback
627+
- **Persistent language preferences** stored in localStorage
628+
- **Component-level translations** using react-i18next hooks
629+
- **Translation interpolation** for dynamic content
630+
- **Pluralization support** for count-based translations
631+
613632
## Development Workflow
614633

615634
### Code Style and Standards
@@ -796,6 +815,8 @@ gemini-desktop/
796815
│ │ │ │ ├── CodeBlock.tsx
797816
│ │ │ │ ├── DiffViewer.tsx
798817
│ │ │ │ ├── DirectorySelectionDialog.tsx
818+
│ │ │ │ ├── I18nExample.tsx
819+
│ │ │ │ ├── LanguageSwitcher.tsx
799820
│ │ │ │ ├── MarkdownRenderer.tsx
800821
│ │ │ │ ├── MentionInput.tsx
801822
│ │ │ │ ├── ModelContextProtocol.tsx
@@ -864,7 +885,8 @@ gemini-desktop/
864885
│ │ │ └── tooltip.tsx
865886
│ │ ├── contexts/
866887
│ │ │ ├── BackendContext.tsx
867-
│ │ │ └── ConversationContext.tsx
888+
│ │ │ ├── ConversationContext.tsx
889+
│ │ │ └── LanguageContext.tsx
868890
│ │ ├── hooks/
869891
│ │ │ ├── use-mobile.ts
870892
│ │ │ ├── useCliInstallation.ts
@@ -898,6 +920,18 @@ gemini-desktop/
898920
│ │ │ ├── toolCallParser.ts
899921
│ │ │ ├── toolInputParser.ts
900922
│ │ │ └── wordDiff.ts
923+
│ │ ├── i18n/
924+
│ │ │ ├── README.md
925+
│ │ │ ├── config.ts
926+
│ │ │ ├── index.ts
927+
│ │ │ ├── locales/
928+
│ │ │ │ ├── en/
929+
│ │ │ │ │ └── translation.json
930+
│ │ │ │ ├── zh-CN/
931+
│ │ │ │ │ └── translation.json
932+
│ │ │ │ └── zh-TW/
933+
│ │ │ │ └── translation.json
934+
│ │ │ └── types.ts
901935
│ │ └── vite-env.d.ts
902936
│ ├── tsconfig.json
903937
│ ├── tsconfig.node.json

0 commit comments

Comments
 (0)