mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
feat(localization): update toast messages for improved user feedback and localization support across various components
This commit is contained in:
@@ -343,7 +343,7 @@ export class DownloadManager {
|
||||
|
||||
this.updateTargetPath();
|
||||
} catch (error) {
|
||||
showToast('downloads.loadError', { message: error.message }, 'error');
|
||||
showToast('toast.downloads.loadError', { message: error.message }, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ export class DownloadManager {
|
||||
const config = this.apiClient.apiConfig.config;
|
||||
|
||||
if (!modelRoot) {
|
||||
showToast(`Please select a ${config.displayName} root directory`, 'error');
|
||||
showToast('models.pleaseSelectRoot', { type: config.displayName }, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ export class DownloadManager {
|
||||
await resetAndReload(true);
|
||||
|
||||
} catch (error) {
|
||||
showToast('downloads.downloadError', { message: error.message }, 'error');
|
||||
showToast('toast.downloads.downloadError', { message: error.message }, 'error');
|
||||
} finally {
|
||||
this.loadingManager.hide();
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ class ExampleImagesManager {
|
||||
|
||||
if (data.status.status === 'completed' && !this.hasShownCompletionToast) {
|
||||
const actionType = this.isMigrating ? 'migration' : 'download';
|
||||
showToast(`Example images ${actionType} completed`, 'success');
|
||||
showToast('toast.downloads.imagesCompleted', { action: actionType }, 'success');
|
||||
// Mark as shown to prevent duplicate toasts
|
||||
this.hasShownCompletionToast = true;
|
||||
// Reset migration flag
|
||||
@@ -408,7 +408,7 @@ class ExampleImagesManager {
|
||||
setTimeout(() => this.hideProgressPanel(), 5000);
|
||||
} else if (data.status.status === 'error') {
|
||||
const actionType = this.isMigrating ? 'migration' : 'download';
|
||||
showToast(`Example images ${actionType} failed`, 'error');
|
||||
showToast('toast.downloads.imagesFailed', { action: actionType }, 'error');
|
||||
this.isMigrating = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user