Localize messages
| @@ -466,7 +466,7 @@ async function convertFileIfVideo(formData) { | ||
| 466 | 466 | return; |
| 467 | 467 | } |
| 468 | 468 | if (typeof globalThis.convertVideoToAnimatedWebp !== 'function') { |
| 469 | 469 | toastr.warning('t`Click here to install the Video Background Loader extension'`, 't`Video background uploads require a downloadable add-on'`, { |
| 470 | 470 | timeOut: 0, |
| 471 | 471 | extendedTimeOut: 0, |
| 472 | 472 | onclick: () => openThirdPartyExtensionMenu('https://github.com/SillyTavern/Extension-VideoBackgroundLoader'), |
| @@ -476,7 +476,7 @@ async function convertFileIfVideo(formData) { | ||
| 476 | 476 | |
| 477 | 477 | let toastMessage = jQuery(); |
| 478 | 478 | try { |
| 479 | 479 | toastMessage = toastr.info('t`Preparing video for upload.. This may take several minutes.'`, 't`Please wait'`, { timeOut: 0, extendedTimeOut: 0 }); |
| 480 | 480 | const sourceBuffer = await file.arrayBuffer(); |
| 481 | 481 | const convertedBuffer = await globalThis.convertVideoToAnimatedWebp({ buffer: new Uint8Array(sourceBuffer), name: file.name }); |
| 482 | 482 | const convertedFileName = file.name.replace(/\.[^/.]+$/, '.webp'); |
| @@ -487,7 +487,7 @@ async function convertFileIfVideo(formData) { | ||
| 487 | 487 | formData.delete('avatar'); |
| 488 | 488 | toastMessage.remove(); |
| 489 | 489 | console.error('Error converting video to animated webp:', error); |
| 490 | 490 | toastr.error('t`Error converting video to animated webp'`); |
| 491 | 491 | } |
| 492 | 492 | } |
| 493 | 493 | |