feat(localization): enhance toast messages for better user feedback and localization support

This commit is contained in:
Will Miao
2025-08-31 11:51:28 +08:00
parent a258a18fa4
commit be8edafed0
9 changed files with 268 additions and 50 deletions

View File

@@ -210,7 +210,7 @@ export class VirtualScroller {
this.scheduleRender();
} catch (err) {
console.error('Failed to initialize virtual scroller:', err);
showToast('Failed to load items', 'error');
showToast('toast.virtual.loadFailed', {}, 'error');
}
}
@@ -293,7 +293,7 @@ export class VirtualScroller {
return items;
} catch (err) {
console.error('Failed to load more items:', err);
showToast('Failed to load more items', 'error');
showToast('toast.virtual.loadMoreFailed', {}, 'error');
} finally {
this.isLoading = false;
pageState.isLoading = false;
@@ -571,7 +571,7 @@ export class VirtualScroller {
}
} catch (err) {
console.error('Failed to fetch data window:', err);
showToast('Failed to load items at this position', 'error');
showToast('toast.virtual.loadPositionFailed', {}, 'error');
} finally {
this.fetchingWindow = false;
}