feat: wire i18n config to frontend runtime#131
feat: wire i18n config to frontend runtime#131praisonai-triage-agent[bot] wants to merge 2 commits into
Conversation
- Promote i18n from EXPERIMENTAL to IMPLEMENTED status in feature registry - Create LocaleProvider React context for managing locale state - Add LocaleSwitcher component in header when multiple locales configured - Connect frontend to existing i18n API endpoints for translation strings - Implement RTL support with automatic dir attribute switching - Add comprehensive tests for i18n implementation status - Update compiler to remove experimental comment for i18n This completes the i18n wiring gap identified in issue #126, enabling full internationalization support in the frontend runtime with locale switching, RTL support, and translation loading from the backend API. Co-Authored-By: Claude <noreply@anthropic.com>
|
@coderabbitai review |
|
/review |
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAIUI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on PraisonAIUI (src/praisonaiui, src/frontend, tests, docs). Read ALL prior reviewer comments. No bot reviews detected. Review Context: 2 total comments, 0 bot reviews. Phase 1: Review per AGENTS.md (lazy imports, backward compat, import-time <200ms) |
|
Claude finished @MervinPraison's task —— View job Phase 1: Architecture Review ✅
Phase 2: Security Fixes Implemented ✅Fixed the following security vulnerabilities:
Test Results ✅
Changes SummaryFiles Modified:
Commit: e1bb77f - "fix(security): add input validation and XSS protection to i18n" Phase 3: Final Verdict ✅APPROVED - This PR successfully completes the i18n implementation with proper security measures: ✅ Security: All vulnerabilities fixed with proper input validation The PR is ready to merge. |
- Add regex escaping in LocaleProvider to prevent regex injection - Add locale format validation (e.g., 'en', 'en-US') - Add key format validation for translation keys - Pre-compile regex patterns for better performance - Add AbortController to handle race conditions - Add loading state to context for better UX Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
Fixes #126
Summary
This PR completes the i18n implementation by wiring the configuration to the frontend runtime. Previously, i18n was marked as EXPERIMENTAL with the backend API implemented but no frontend integration. This change promotes i18n to IMPLEMENTED status and adds full frontend support.
Changes
Acceptance Criteria
Test Evidence
All tests passing. Import time under 200ms (159.5ms). No heavy dependencies leaked.
Generated with Claude Code