import React, { useState } from 'react'; import { Loader2, Languages, AlertCircle } from 'lucide-react'; import Modal from './ui/Modal'; const LANGUAGES = { "es": "Spanish", "fr": "French", "de": "German", "it": "Italian", "pt": "Portuguese", "pl": "Polish", "hi": "Hindi", "ja": "Japanese", "ko": "Korean", "zh": "Chinese", "ar": "Arabic", "ru": "Russian", "tr": "Turkish", "nl": "Dutch", "sv": "Swedish", "id": "Indonesian", "fil": "Filipino", "ms": "Malay", "vi": "Vietnamese", "th": "Thai", "uk": "Ukrainian", "el": "Greek", "cs": "Czech", "fi": "Finnish", "ro": "Romanian", "da": "Danish", "bg": "Bulgarian", "hr": "Croatian", "sk": "Slovak", "ta": "Tamil", "en": "English", }; export default function TranslateModal({ isOpen, onClose, onTranslate, isProcessing, videoUrl, hasApiKey }) { const [targetLanguage, setTargetLanguage] = useState('es'); if (!isOpen) return null; const handleSubmit = () => { console.log('[TranslateModal] handleSubmit called, targetLanguage:', targetLanguage); onTranslate({ targetLanguage }); }; return ( } >

AI voice translation by ElevenLabs

{!hasApiKey && (
key missing

Configure ElevenLabs API Key in Settings first.

)} {/* Preview */}
{/* Language Selection */}
{/* Info */}

The audio will be dubbed with AI-generated voice in the selected language, matching the original speaker's characteristics.

{/* AI Act art. 50: we mark the file, the person publishing it is the one who owes the audience the disclosure. Saying so here is the only place they will read it. */}

The dubbed file is tagged as AI-generated content. When you publish it, disclose that the voice is synthetic.

{/* Processing State */} {isProcessing && (

Dubbing audio...

This may take a few minutes

)}
); }