feat(localization): update toast messages for improved user feedback and localization support across various components

This commit is contained in:
Will Miao
2025-08-31 16:52:58 +08:00
parent b2428f607c
commit 7bef562541
12 changed files with 68 additions and 95 deletions

View File

@@ -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;
}
}