fix(i18n): translate backend errors at UI boundaries

This commit is contained in:
Rahul authored and GitHub committed 2026-07-29 02:40:45 +08:00
1 parent 4422ac8e01
commit 2f44d36018
82 files changed
+1862 -335

No files matched your search

@@ -9,6 +9,7 @@ import { useQueryStore } from "@/stores/queryStore";
import { useConnectionStore } from "@/stores/connectionStore";
import { useToast } from "@/composables/useToast";
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
import { translateBackendError } from "@/i18n/backend-errors";
import { resolveDefaultDatabase } from "@/lib/database/defaultDatabase";
import { copyToClipboard } from "@/lib/common/clipboard";
import { externalSqlFileOpenErrorMessage, formatSqlFileSize, isExternalSqlFileTooLargeError } from "@/lib/sql/sqlFileOpen";
@@ -156,7 +157,7 @@ async function revealInFileManager(path: string) {
try {
await api.revealPathInFileManager(path);
} catch (e: any) {
toast(t("sqlFileTree.revealFailed", { message: e?.message || String(e) }), 5000);
toast(t("sqlFileTree.revealFailed", { message: translateBackendError(t, e) }), 5000);
}
}