Localize messages

491752599c694155c44e9d2fbd26d6b3fa10e96b

Cohee <18619528+Cohee1207@users.noreply.github.com>

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