Skip to content

PR-2: Frontend Translation.io Integration & i18n Setup #85

@kevalyq

Description

@kevalyq

📌 Parent Epic

#83

🎯 Goal

Integrate Translation.io into the React/TypeScript frontend to enable multi-language support. This includes setting up i18n library, configuring Translation.io integration, implementing language switching UI, and syncing translations with Translation.io service.

📋 Implementation Tasks

  • Research and select React i18n library (react-i18next recommended)
  • Install Translation.io frontend package/integration
  • Configure source locale (en) and target locale (de)
  • Set up translation file structure
  • Implement language switcher component/UI
  • Add locale persistence (localStorage/cookies)
  • Configure Translation.io sync for frontend
  • Run initial sync with Translation.io
  • Add Translation.io credit to frontend README.md (required for Open Source plan)
  • Update CHANGELOG.md with entry in [Unreleased] → Added section
  • All tests passing (Vitest + React Testing Library)
  • ESLint and TypeScript checks passing
  • Update documentation in README about translation workflow

✅ Acceptance Criteria

  • i18n library installed and configured
  • Translation.io integration working for frontend
  • Language switching functional in UI
  • Locale preference persists across sessions
  • Translation files synced with Translation.io
  • Frontend README includes mention of Translation.io (Open Source plan requirement)
  • All tests passing (maintain coverage standards)
  • ESLint passing
  • TypeScript strict mode passing
  • CHANGELOG.md updated
  • No breaking changes to existing components
  • LOC count ≤ 600 (excluding lock files, or marked with large-pr-approved label if needed)

🔗 Dependencies

📝 Technical Notes

  • i18n Library: Consider react-i18next (most popular, well-maintained)
  • Translation.io: Check if they have a specific React/JavaScript integration package
  • Locales:
    • Source: en (English)
    • Target: de (German)
  • Storage: Use localStorage or cookies for locale preference
  • Fallback: Always fall back to English if translation missing
  • Open Source Plan Requirements:
    • Public repository (✓ already public)
    • Mention Translation.io in README

🧪 Testing Strategy

  • Unit tests for language switching logic
  • Component tests for language switcher UI
  • Integration tests for locale persistence
  • Test fallback behavior when translations missing
  • Visual regression testing for different locales

📝 PR Linking Instructions

When creating the PR for this sub-issue, use this in your PR description:

Fixes #<this-sub-issue-number>
Closes SecPal/api#83

⚠️ Important:

  • This IS the last sub-issue, so use Closes #83 to close the epic
  • Ensure API implementation is complete and merged before starting this work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions