-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Implement comprehensive internationalization (i18n) support to make the AlternateFutures CLI accessible to non-English speaking users worldwide. This aligns with our mission as a censorship-resistant, privacy-focused platform serving a global audience.
Current State: English-only CLI (365 strings in /locales/en.json)
Desired State: Multi-language support with auto-detection, starting with Spanish
Problem Statement
The CLI currently only supports English, which:
- Limits accessibility for non-English speaking users (majority of world population)
- Contradicts our mission of global censorship resistance
- Reduces adoption in non-English speaking markets
- Creates barriers for international developers
Success Criteria
- Language auto-detection from system locale
- Spanish localization complete (365 strings translated)
- Emoji accessibility mode (
--no-emojiflag) - Documentation for contributors to add new languages
- All tests pass with new i18n system
- No breaking changes to existing English users
Implementation Phases
Phase 1: Infrastructure
- Implement
detectLanguage()function (checkAF_LANGUAGEenv var, fall back to systemLANG) - Update locale loading to support multiple languages
- Implement plural handling for English and Spanish
Phase 2: Spanish Localization
- Translate all 365 strings to Spanish
- Create
/locales/es.jsonand/locales/es.d.ts - Native speaker review for technical accuracy
Phase 3: Accessibility
- Add
--no-emojiCLI flag andNO_EMOJIenv var - Replace emoji icons with text equivalents for screen reader compatibility
- Terminal width detection for responsive formatting
Phase 4: Documentation & Testing
- Create
/docs/i18n.mdguide - Update README with language support section
- Comprehensive test coverage (40+ unit tests, 10+ integration tests)
Phase 5: Package & Release
- Update package.json files array
- CI/CD updates for multi-language testing
- Beta release, then stable v0.3.0
Technical Requirements
- No new dependencies - use existing translation infrastructure
- Performance: <1ms language detection, <10ms locale loading
- Bundle size increase: <50KB for Spanish locale
- Backward compatible with English-only users
Future Languages (prioritized by demand)
- Portuguese (pt)
- French (fr)
- German (de)
- Mandarin (zh)
- Japanese (ja)
See .github/issues/INTERNATIONALIZATION_TICKET.md for full implementation details including code examples, test plans, and rollout strategy.
Estimate: 3 weeks (15 working days)