Skip to content

feat(i18n): add privacy policy and terms translations#173

Merged
ViktorSvertoka merged 1 commit into
developfrom
i18n-privacy-terms
Jan 20, 2026
Merged

feat(i18n): add privacy policy and terms translations#173
ViktorSvertoka merged 1 commit into
developfrom
i18n-privacy-terms

Conversation

@TiZorii
Copy link
Copy Markdown
Collaborator

@TiZorii TiZorii commented Jan 20, 2026

  • Add Privacy Policy translations (uk/en/pl)
  • Add Terms & Conditions translations (uk/en/pl)
  • Create /privacy and /terms pages with proper i18n routing
  • Add legal pages navigation links
  • Ensure GDPR compliance across all language versions

Summary by CodeRabbit

  • New Features

    • Added internationalization support for Privacy Policy and Terms of Service pages with translations in English, Polish, and Ukrainian.
    • Implemented server-side metadata generation for improved SEO on legal pages.
  • Localization

    • Legal pages now display translated content based on user's locale preferences.
    • Added comprehensive translated legal documentation across all supported languages.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add Privacy Policy translations (uk/en/pl)
- Add Terms & Conditions translations (uk/en/pl)
- Create /privacy and /terms pages with proper i18n routing
- Add legal pages navigation links
- Ensure GDPR compliance across all language versions
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 20, 2026

Deploy Preview for develop-devlovers ready!

Name Link
🔨 Latest commit 52bc11e
🔍 Latest deploy log https://app.netlify.com/projects/develop-devlovers/deploys/696fd14a587e540008ab84d4
😎 Deploy Preview https://deploy-preview-173--develop-devlovers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Adds server-side metadata generation and full internationalization support to legal pages (Privacy Policy and Terms of Service), converting page components and layout components to async functions that fetch translations from legal, legal.privacy, and legal.terms namespaces, with comprehensive legal content added to translation files for English, Polish, and Ukrainian.

Changes

Cohort / File(s) Summary
Legal Page Metadata & Rendering
frontend/app/[locale]/privacy-policy/page.tsx, frontend/app/[locale]/terms-of-service/page.tsx
Added generateMetadata() function exporting server-side metadata with locale resolution and translation-driven titles/descriptions. Converted page components to async, replacing hard-coded titles with t('title') translation lookups from legal.privacy and legal.terms namespaces respectively.
Legal Component Layout
frontend/components/legal/LegalPageShell.tsx, frontend/components/legal/PrivacyPolicyContent.tsx, frontend/components/legal/TermsOfServiceContent.tsx
Converted all three components to async functions. Replaced hard-coded strings (section titles, content, back button text, contact email, labels) with translation lookups from legal and legal.privacy/legal.terms namespaces. Added reusable linkClass constant for mailto link styling. Email now dynamically retrieved from translations for use in mailto links.
English Translation Data
frontend/messages/en.json
Added top-level legal entity containing complete Privacy Policy and Terms of Service sections with metadata (metaTitle, metaDescription), subsections (data collection, GDPR rights, terms acceptance, etc.), contact email, and localized labels (back, lastUpdated).
Polish Translation Data
frontend/messages/pl.json
Added legal section under dashboard with full Privacy Policy and Terms of Service content in Polish, including metadata, subsections, and localized strings mirroring English structure.
Ukrainian Translation Data
frontend/messages/uk.json
Added top-level legal entity with complete Privacy Policy and Terms of Service content in Ukrainian, including all metadata, subsections (whoWeAre, dataWeCollect, GDPR rights, etc.), and localized labels.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant NextJS as Next.js Server
    participant i18n as Translation System

    Client->>NextJS: Request /privacy-policy (with locale)
    
    rect rgba(100, 150, 200, 0.5)
    Note over NextJS,i18n: Metadata Generation Phase
    NextJS->>i18n: getTranslations('legal.privacy')
    i18n-->>NextJS: Return privacy translations
    NextJS->>NextJS: Extract metaTitle & metaDescription
    NextJS-->>Client: Return metadata (title, description)
    end
    
    rect rgba(100, 200, 150, 0.5)
    Note over NextJS,i18n: Page Rendering Phase
    NextJS->>i18n: getTranslations('legal.privacy')
    i18n-->>NextJS: Return privacy translations
    NextJS->>i18n: getTranslations('legal')
    i18n-->>NextJS: Return legal translations (back, lastUpdated, contactEmail)
    NextJS->>NextJS: Render PrivacyPolicyContent with t() lookups
    NextJS->>NextJS: Render LegalPageShell with localized labels
    NextJS-->>Client: Return fully translated page
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested reviewers

  • AM1007
  • ViktorSvertoka

Poem

🐰 hops with glee 🌍

Legal pages now speak in tongues so bright,
English, Polish, Ukrainian delight,
Async magic awaits each translation divine,
Metadata flows and multilingual signs,
A warren's work—our i18n shines! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objective of the pull request, which is to add internationalization support for privacy policy and terms of service translations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants