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

@@ -162,7 +162,7 @@ function getLoraStatusTitle(totalCount, missingCount) {
*/
function copyRecipeSyntax(recipeId) {
if (!recipeId) {
showToast('Cannot copy recipe syntax: Missing recipe ID', 'error');
showToast('recipeTab.noRecipeId', {}, 'error');
return;
}
@@ -177,7 +177,7 @@ function copyRecipeSyntax(recipeId) {
})
.catch(err => {
console.error('Failed to copy: ', err);
showToast('Failed to copy recipe syntax', 'error');
showToast('recipeTab.copyFailed', {}, 'error');
});
}

View File

@@ -445,7 +445,7 @@ export function initMediaControlHandlers(container) {
state.virtualScroller.updateSingleItem(result.model_file_path, updateData);
} else {
// Show error message
showToast('showcase.exampleImages.deleteFailed', { error: result.error }, 'error');
showToast('toast.exampleImages.deleteFailed', { error: result.error }, 'error');
// Reset button state
this.disabled = false;

View File

@@ -430,7 +430,7 @@ async function handleImportFiles(files, modelHash, importContainer) {
}
} catch (error) {
console.error('Error importing examples:', error);
showToast(`Failed to import example images: ${error.message}`, 'error');
showToast('import.importFailed', { message: error.message }, 'error');
}
}