๐ฏ Issue Type
๐ Description
Problem/Need
GitRay currently only supports German text hardcoded in components. To reach international users and improve accessibility, we need multi-language support for 7-10 languages with automatic detection and user preference persistence.
Expected Behavior
- Support for 7-10 languages (starting with DE + EN)
- Language selector in Settings drawer
- Automatic browser language detection
- User language preference persists across sessions
- All UI text properly translated (no hardcoded strings)
- Pluralization support (e.g., "1 commit" vs "5 commits")
- Language-specific date/number formatting
- TypeScript type safety for translation keys
Current Behavior
- All text hardcoded in German/English mix
- No language switching capability
- No internationalization framework
๐ Steps to Reproduce
This is a feature implementation. To test completion:
- Clone branch
feature/i18n-implementation
- Run
npm install and npm run dev
- Open Settings drawer โ verify language selector visible
- Switch between languages โ verify all text updates
- Reload page โ verify language preference persists
- Test browser language detection (change browser language)
- Test pluralization with different counts
- Verify date formatting changes per language
- Check for any untranslated strings (hardcoded text)
๐จ Mockups/Screenshots
Language selector in Settings drawer:
Settings
โโโ Theme: [Light | Dark | System]
โโโ Language: [๐ฉ๐ช Deutsch | ๐ฌ๐ง English | ๐ช๐ธ Espaรฑol | ...]
Translation file structure:
{
"header.menu": "Menรผ",
"landing.hero.title": "Analysiere dein Repository",
"dashboard.heatmap.commits": "{{count}} Commit",
"dashboard.heatmap.commits_plural": "{{count}} Commits"
}
๐งช Acceptance Criteria
๐ Technical Details
Affected Files/Components
New Files:
src/i18n/
โโโ config.ts # i18next configuration
โโโ types.ts # TypeScript type definitions
public/locales/
โโโ de/
โ โโโ common.json # Header, Footer, Settings, Toasts
โ โโโ landing.json # Landing page specific
โ โโโ dashboard.json # Dashboard specific
โโโ en/
โ โโโ common.json
โ โโโ landing.json
โ โโโ dashboard.json
โโโ [es, fr, it, pt, pl, nl, ja]/
Updated Components (add useTranslation hook):
Header.tsx - Menu, news, signOut buttons
Footer.tsx - Links
SettingsDrawer.tsx - Add language selector, translate theme labels
LandingPage.tsx - Hero, buttons, placeholders
DashboardPage.tsx - Tab labels
ActivityHeatmap.tsx - Filter labels, commit counts
CommitList.tsx - Column headers
InfoModal.tsx - Modal content
NewsDrawer.tsx - News titles
App.tsx - Toast messages
Updated Files:
main.tsx - Import i18n config before App
Dependencies
New packages:
npm install i18next react-i18next i18next-browser-languagedetector
# Optional for better performance:
npm install i18next-http-backend
Depends on:
- #[ui-migration-issue-number] - MUST be completed and merged first
- All UI components must exist before adding translations
Blocks:
Breaking Changes
๐ท Categorization
Scope
Priority
Effort
๐ Environment
Development:
- OS: Cross-platform (Windows, macOS, Linux)
- Browser: Chrome 120+, Firefox 121+, Safari 17+
- Node Version: 18+ required
- Repo Branch:
feature/i18n-implementation (create from main AFTER UI migration merged)
๐ Related Issues/PRs
- Blocked by: #[ui-migration-issue-number] - UI Migration (MUST be merged first)
- Relates to: Accessibility improvements
๐ Additional Notes
Target Languages & Rollout
Phase 1: MVP (Week 1)
- ๐ฉ๐ช German (Deutsch) - Professional translation
- ๐ฌ๐ง English - Professional translation
Phase 2: European Expansion (Week 2-3)
- ๐ช๐ธ Spanish (Espaรฑol)
- ๐ซ๐ท French (Franรงais)
- ๐ฎ๐น Italian (Italiano)
- ๐ต๐น Portuguese (Portuguรชs)
Phase 3: Global (Week 4+)
- ๐ต๐ฑ Polish (Polski)
- ๐ณ๐ฑ Dutch (Nederlands)
- ๐ฏ๐ต Japanese (ๆฅๆฌ่ช)
- ๐จ๐ณ Chinese (ไธญๆ) - Optional
Implementation Timeline (2 days)
Day 1 (Morning): Setup, install dependencies, create folder structure, i18n config, TypeScript types
Day 1 (Afternoon): Create English + German translation files, update first components (Header, Footer, Landing)
Day 2 (Morning): Update remaining components (Dashboard, Heatmap, Lists), add language selector
Day 2 (Afternoon): Add remaining language structures, testing, documentation
Week 2+: Professional translation review, community translations for additional languages
Translation Strategy (Cost-Effective Hybrid Approach)
Recommended: Hybrid Approach
- Core languages (DE, EN): Professional translation (โฌ600-1,200)
- Additional languages: DeepL API + native speaker review
- Total cost: โฌ800-1,500
- Quality: Good to very high
- Scalable: Yes โ
Alternatives:
- DIY: ~40 hours developer time, variable quality
- Full Professional: โฌ2,100-โฌ4,200 (7 languages), highest quality
Content Volume
- ~90 translation keys per language
- ~500 words per language
- Total for 7 languages: ~3,500 words
Documentation
Complete i18n implementation guide available:
docs/migration-plan/I18N_IMPLEMENTATION.md - Full guide (30 pages)
- Translation file templates
- Component update examples
- Maintenance workflow
- Adding new languages process
Key Technical Decisions
Why react-i18next?
- Industry standard (11k+ stars)
- Small bundle size (12KB vs 45KB for react-intl)
- Perfect TypeScript support
- Built-in lazy loading
- Excellent Vite support
Namespace Organization:
common.json - Used everywhere (header, footer, toasts)
landing.json - Landing page specific
dashboard.json - Dashboard specific
- Benefit: Code splitting, better performance
Key Naming Convention:
{
"section.component.element": "Text",
"header.menu": "Menรผ",
"landing.hero.title": "Analysiere dein Repository"
}
Performance Impact
- Initial bundle increase: ~30KB (with lazy loading)
- Language files load on demand
- Minimal impact on app performance
- All languages cached in localStorage
Maintenance Workflow
- Add new text to English files first (source of truth)
- Copy structure to other language files
- Translate or mark as TODO
- Test in all languages
- Quarterly audit for completeness
Testing Strategy
- Component tests with multiple languages
- Language switching tests
- Pluralization tests
- Date formatting tests
- Translation key existence tests
- No hardcoded strings validation
โ
Checklist for Reviewer
๐ฏ Issue Type
๐ Description
Problem/Need
GitRay currently only supports German text hardcoded in components. To reach international users and improve accessibility, we need multi-language support for 7-10 languages with automatic detection and user preference persistence.
Expected Behavior
Current Behavior
๐ Steps to Reproduce
This is a feature implementation. To test completion:
feature/i18n-implementationnpm installandnpm run dev๐จ Mockups/Screenshots
Language selector in Settings drawer:
Translation file structure:
{ "header.menu": "Menรผ", "landing.hero.title": "Analysiere dein Repository", "dashboard.heatmap.commits": "{{count}} Commit", "dashboard.heatmap.commits_plural": "{{count}} Commits" }๐งช Acceptance Criteria
t()function (no hardcoded strings)๐ Technical Details
Affected Files/Components
New Files:
Updated Components (add
useTranslationhook):Header.tsx- Menu, news, signOut buttonsFooter.tsx- LinksSettingsDrawer.tsx- Add language selector, translate theme labelsLandingPage.tsx- Hero, buttons, placeholdersDashboardPage.tsx- Tab labelsActivityHeatmap.tsx- Filter labels, commit countsCommitList.tsx- Column headersInfoModal.tsx- Modal contentNewsDrawer.tsx- News titlesApp.tsx- Toast messagesUpdated Files:
main.tsx- Import i18n config before AppDependencies
New packages:
npm install i18next react-i18next i18next-browser-languagedetector # Optional for better performance: npm install i18next-http-backendDepends on:
Blocks:
Breaking Changes
๐ท Categorization
Scope
scope:frontend- Frontend/UI changesPriority
prio:high- Important featureEffort
effort:medium- 2-8 hours (2 days estimated)๐ Environment
Development:
feature/i18n-implementation(create frommainAFTER UI migration merged)๐ Related Issues/PRs
๐ Additional Notes
Target Languages & Rollout
Phase 1: MVP (Week 1)
Phase 2: European Expansion (Week 2-3)
Phase 3: Global (Week 4+)
Implementation Timeline (2 days)
Day 1 (Morning): Setup, install dependencies, create folder structure, i18n config, TypeScript types
Day 1 (Afternoon): Create English + German translation files, update first components (Header, Footer, Landing)
Day 2 (Morning): Update remaining components (Dashboard, Heatmap, Lists), add language selector
Day 2 (Afternoon): Add remaining language structures, testing, documentation
Week 2+: Professional translation review, community translations for additional languages
Translation Strategy (Cost-Effective Hybrid Approach)
Recommended: Hybrid Approach
Alternatives:
Content Volume
Documentation
Complete i18n implementation guide available:
docs/migration-plan/I18N_IMPLEMENTATION.md- Full guide (30 pages)Key Technical Decisions
Why react-i18next?
Namespace Organization:
common.json- Used everywhere (header, footer, toasts)landing.json- Landing page specificdashboard.json- Dashboard specificKey Naming Convention:
{ "section.component.element": "Text", "header.menu": "Menรผ", "landing.hero.title": "Analysiere dein Repository" }Performance Impact
Maintenance Workflow
Testing Strategy
โ Checklist for Reviewer