Skip to content

Commit

Permalink
fix: remove test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoreilly committed Nov 17, 2024
1 parent 275c863 commit 32357fa
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ function App() {
const newMediaBlob = await rebuildMedia(fileToProcess, tracks, selectedAudioBuffers, selectedSubtitles, setDownloadProgress);

setDownloadProgress(t('preparingDownload'));
throw new Error("test");
const url = URL.createObjectURL(newMediaBlob);
const a = document.createElement('a');
a.href = url;
Expand Down
7 changes: 6 additions & 1 deletion src/components/DownloadModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useState } from 'react';
import styled, { keyframes } from 'styled-components';
import { useTranslation } from 'react-i18next';
import { useTranslation, Trans } from 'react-i18next';
import { Button, Label, ModalOverlay, colors, Title, ErrorMessage, Message, ErrorBox } from '../styles/designSystem';
import { AudioTrack } from '../types/AudioTrack';

Expand Down Expand Up @@ -147,6 +147,11 @@ const DownloadModal: React.FC<DownloadModalProps> = ({
<Title>{!isDownloading ? t('selectTracksForDownload') : t('preparingDownload')}</Title>
{!isDownloading ? (
<>
<Message>
<Trans i18nKey="downloadExplanation" components={{
regenerateLink: <span style={{ color: colors.primary, cursor: 'pointer' }} onClick={handleRegenerateClick} />
}} />
</Message>
<TrackList>
<h3>{t('audioTracks')}</h3>
{Object.entries(audioTracks).filter(([id]) => id !== 'background').map(([id, track], index) => (
Expand Down
1 change: 0 additions & 1 deletion src/components/RegenerateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const RegenerateModal: React.FC<RegenerateModalProps> = ({ onClose, onRegenerate
const handleRegenerate = async () => {
setIsRegenerating(true);
try {
throw new Error("test");
await onRegenerate();
setIsComplete(true);
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"loadingFFmpeg": "Carregant FFmpeg...",
"preparingMedia": "Preparant el vídeo...",
"addSpeaker": "Afegir un parlant",
"selectVoice": "Seleccionar veu"
"selectVoice": "Seleccionar veu",
"downloadExplanation": "Selecciona les pistes d'àudio i subtítols que vols descarregar. El video es regenerarà en el teu navegador pel que depenent del teu dispositiu pot ser lent. Si ho prefereixes, pots demanar que el vídeo sigui regenerat al nostre servidor clicant <regenerateLink>aquí</regenerateLink>."
}
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"loadingFFmpeg": "Loading FFmpeg...",
"preparingMedia": "Preparing media...",
"addSpeaker": "Add speaker",
"selectVoice": "Select voice"
"selectVoice": "Select voice",
"downloadExplanation": "Select the audio and subtitles tracks you want to download. The video will be regenerated in your browser so it may be slow depending on your device. If you prefer, you can request that the video be regenerated on our server <regenerateLink>here</regenerateLink>."
}
3 changes: 2 additions & 1 deletion src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"loadingFFmpeg": "Cargando FFmpeg...",
"preparingMedia": "Preparando el vídeo...",
"addSpeaker": "Añadir hablante",
"selectVoice": "Seleccionar voz"
"selectVoice": "Seleccionar voz",
"downloadExplanation": "Selecciona las pistas de audio y subtítulos que quieres descargar. El vídeo se regenerará en tu navegador, por lo que puede ser lento dependiendo de tu dispositivo. Si prefieres, puedes solicitar que el vídeo se regenera en nuestro servidor <regenerateLink>aquí</regenerateLink>."
}

0 comments on commit 32357fa

Please sign in to comment.