Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix(web): restore clean production build across supported locales

Bingxi Zhao (Frank)aa225486eab7
diff --git a/web/components/notebook/NotebookRecordRow.tsx b/web/components/notebook/NotebookRecordRow.tsx
index 7df9d1cf3..5189f89d7 100644
--- a/web/components/notebook/NotebookRecordRow.tsx
+++ b/web/components/notebook/NotebookRecordRow.tsx
@@ -14,7 +14,7 @@ import {
} from "lucide-react";
import { useTranslation } from "react-i18next";
import { ConfirmDialog } from "@/components/ui/ConfirmDialog";
-import Tooltip from "@/components/common/Tooltip";
+import Tooltip from "@/shared/ui/Tooltip";
import NotebookRecordActions from "@/components/notebook/NotebookRecordActions";
import { notify } from "@/lib/notifications";
import type { NotebookRecordItem, NotebookSummary } from "@/lib/notebook-api";
diff --git a/web/features/settings/sections/ToolsSettingsSection.tsx b/web/features/settings/sections/ToolsSettingsSection.tsx
index ffb264bb8..0cf00bb01 100644
--- a/web/features/settings/sections/ToolsSettingsSection.tsx
+++ b/web/features/settings/sections/ToolsSettingsSection.tsx
@@ -76,6 +76,7 @@ const CAPABILITY_LABELS: Record<string, { zh: string; en: string }> = {
export default function ToolsSettingsPage() {
const { t } = useTranslation();
const { language, draftRevision } = useSettings();
+ const hintLanguage = language === "zh" ? "zh" : "en";
const [tools, setTools] = useState<BuiltinTool[] | null>(null);
const [error, setError] = useState<string | null>(null);
const [expanded, setExpanded] = useState<Set<string>>(new Set());
@@ -183,7 +184,7 @@ export default function ToolsSettingsPage() {
.map((section) => ({
...section,
tools: section.tools.filter((tool) => {
- const hints = tool.hints[language];
+ const hints = tool.hints[hintLanguage];
const alternateHints = tool.hints[language === "zh" ? "en" : "zh"];
const searchableText = [
tool.name,
@@ -218,7 +219,7 @@ export default function ToolsSettingsPage() {
}),
}))
.filter((section) => section.tools.length > 0);
- }, [language, query, sections]);
+ }, [hintLanguage, language, query, sections]);
const toggleExpanded = (name: string) => {
setExpanded((prev) => {
@@ -311,7 +312,7 @@ export default function ToolsSettingsPage() {
<div className="border-t border-[var(--border)]/60">
{list.map((tool, idx) => {
const isOpen = expanded.has(tool.name);
- const hints = tool.hints[language];
+ const hints = tool.hints[hintLanguage];
const isPending = pending.has(tool.name);
const isComingSoon = !!tool.coming_soon;
const isAvailable = tool.available !== false;