feat(localization): update toast messages for consistency and improved error handling across various components

This commit is contained in:
Will Miao
2025-08-31 18:38:42 +08:00
parent 7bef562541
commit f80e266d02
8 changed files with 366 additions and 120 deletions

View File

@@ -77,7 +77,7 @@ export class DownloadManager {
if (!result.success) {
// Handle save error
console.error("Failed to save recipe:", result.error);
showToast('import.recipeSaveFailed', { error: result.error }, 'error');
showToast('toast.import.recipeSaveFailed', { error: result.error }, 'error');
// Close modal
modalManager.closeModal('importModal');
return;
@@ -107,7 +107,7 @@ export class DownloadManager {
} catch (error) {
console.error('Error:', error);
showToast('import.processingError', { message: error.message }, 'error');
showToast('toast.import.processingError', { message: error.message }, 'error');
} finally {
this.importManager.loadingManager.hide();
}

View File

@@ -136,7 +136,7 @@ export class FolderBrowser {
this.initializeFolderBrowser();
} catch (error) {
console.error('Error in API calls:', error);
showToast('import.folderBrowserError', { message: error.message }, 'error');
showToast('toast.import.folderBrowserError', { message: error.message }, 'error');
}
}