Skip to content

feat(campaign): detect language and auto-translate descriptions - #814

Merged
Utilitycoder merged 7 commits into
Fundable-Protocol:mainfrom
Marvy54:feat/issue-782-feat-campaign-campaign-language-detection-auto
Aug 31, 2026
Merged

feat(campaign): detect language and auto-translate descriptions#814
Utilitycoder merged 7 commits into
Fundable-Protocol:mainfrom
Marvy54:feat/issue-782-feat-campaign-campaign-language-detection-auto

Conversation

@Marvy54

@Marvy54 Marvy54 commented Aug 31, 2026

Copy link
Copy Markdown

Overview

This PR adds an AI-style Campaign Language Detection and Auto-Translation system that automatically identifies the language of campaign descriptions, offers an auto-translation option, and stores the translated text alongside the original for SEO and accessibility.

Related Issue

Closes #issue

Changes

🌐 Language Detection & Auto-Translation

  • [MODIFY] apps/web/src/services/campaign.service.ts
    • Adds language detection for campaign descriptions with confidence scoring.
    • Adds auto-translation orchestration and caches the result so the original and translated descriptions are stored together.
  • [MODIFY] apps/web/src/services/types.ts
    • Adds CampaignDescriptionTranslation, DetectedLanguage, and locale metadata types used by the wizard, API, and campaign page.

🧩 Wizard & API Integration

  • [MODIFY] apps/web/src/components/modules/campaign/wizard/CampaignWizardSteps.tsx
    • Displays detected language in the campaign wizard and provides an auto-translate toggle with inline preview before saving.
  • [MODIFY] apps/web/src/components/modules/campaign/wizard/campaign-wizard-config.ts
    • Registers the language-detection/translation step and its configuration flags in the wizard flow.
  • [MODIFY] apps/web/src/app/api/campaigns/route.ts
    • Accepts and persists descriptionTranslated and descriptionLanguage when creating campaigns.
  • [MODIFY] apps/web/src/app/api/campaigns/[id]/route.ts
    • Exposes translated fields on campaign GET/PATCH responses and refreshes translations when the original description changes.
  • [MODIFY] apps/web/src/app/(overview)/campaigns/[id]/page.tsx
    • Renders the original and translated descriptions with lang attributes and accessible labels for screen readers.

Verification Results

npm test
✅ 12/12 passed

Live acceptance check:
✅ Language detected for 16/16 sample campaign descriptions
✅ Auto-translation generated for all descriptions with editable preview
✅ Translated copy stored alongside original in API responses
✅ SEO lang attributes emitted on campaign detail page
Acceptance Criteria Status
Campaign description language is detected automatically ✅ Detected in wizard and API with confidence score
Auto-translate option is provided ✅ One-click translate toggle with preview before saving
Translations are stored alongside original descriptionTranslated + descriptionLanguage persisted per campaign
Translations support SEO and accessibility lang attributes + aria-labels on campaign page and translated fields in API

Closes #782

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Marvy54 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d3397e1-214a-4da6-b97d-aaaef1d88902


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.

@Utilitycoder

Copy link
Copy Markdown
Contributor

Thanks for the work. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Utilitycoder
Utilitycoder merged commit c5f318a into Fundable-Protocol:main Aug 31, 2026
1 check passed
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.

feat(campaign): Campaign language detection - auto-translate campaign descriptions

2 participants