Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

feat(ui): zh chrome — new tabs and project switcher translated

Martin Vogel470a8021427a
diff --git a/graph-ui/src/App.tsx b/graph-ui/src/App.tsx
index d79f85bae..b31d3c79f 100644
--- a/graph-ui/src/App.tsx
+++ b/graph-ui/src/App.tsx
@@ -144,12 +144,12 @@ export function App() {
* App-level destinations (Projects, Control) live on the right instead of
* being mixed into this row as dead buttons. */
const projectTabs: { id: TabId; label: string }[] = [
- { id: "overview", label: "Overview" },
- { id: "modules", label: "Modules" },
- { id: "graph", label: "Galaxy" },
- { id: "flows", label: "Flows" },
- { id: "changes", label: "Changes" },
- { id: "dashboard", label: "Dashboard" },
+ { id: "overview", label: t.tabs.overview },
+ { id: "modules", label: t.tabs.modules },
+ { id: "graph", label: t.tabs.graph },
+ { id: "flows", label: t.tabs.flows },
+ { id: "changes", label: t.tabs.changes },
+ { id: "dashboard", label: t.tabs.dashboard },
];
const symbolRef = route.sym
@@ -174,6 +174,7 @@ export function App() {
{/* Context first: which project is everything below about? */}
<ProjectSwitcher
selected={selectedProject}
+ labels={t.switcher}
allProjectsLabel={t.tabs.projects}
onSelect={(project) => navigate({ tab: "overview", project })}
onAllProjects={() => navigate({ tab: "stats", project: null })}
diff --git a/graph-ui/src/components/ProjectSwitcher.tsx b/graph-ui/src/components/ProjectSwitcher.tsx
index 3a57ae926..e673e381e 100644
--- a/graph-ui/src/components/ProjectSwitcher.tsx
+++ b/graph-ui/src/components/ProjectSwitcher.tsx
@@ -8,11 +8,13 @@ import type { Project } from "../lib/types";
* of dead tabs. */
export function ProjectSwitcher({
selected,
+ labels,
allProjectsLabel,
onSelect,
onAllProjects,
}: {
selected: string | null;
+ labels: { select: string; search: string; manage: string };
allProjectsLabel: string;
onSelect: (project: string) => void;
onAllProjects: () => void;
@@ -73,7 +75,7 @@ export function ProjectSwitcher({
}`}
title={selected ?? "Choose which indexed project to explore"}
>
- <span className="font-mono truncate">{selected ?? "Select a project…"}</span>
+ <span className="font-mono truncate">{selected ?? labels.select}</span>
<span className="text-foreground/40 text-[11px] shrink-0">▾</span>
</button>
{open &&
@@ -105,7 +107,7 @@ export function ProjectSwitcher({
onSelect(filtered[0].name);
}
}}
- placeholder="Search projects…"
+ placeholder={labels.search}
className="w-full bg-background border border-border/60 rounded-md px-2.5 py-1.5 text-[13px] text-foreground placeholder-foreground/35 outline-none focus:border-primary/60 transition-all"
/>
</div>
@@ -144,7 +146,7 @@ export function ProjectSwitcher({
}}
className="w-full text-left px-3 py-1.5 text-[13px] text-foreground/55 hover:text-foreground/85 hover:bg-surface-4 transition-colors"
>
- {allProjectsLabel} — manage &amp; index →
+ {allProjectsLabel} — {labels.manage} →
</button>
</div>
</div>
diff --git a/graph-ui/src/lib/i18n.ts b/graph-ui/src/lib/i18n.ts
index 1f50ab927..970462f48 100644
--- a/graph-ui/src/lib/i18n.ts
+++ b/graph-ui/src/lib/i18n.ts
@@ -5,10 +5,20 @@ export type UiLanguage = "en" | "zh";
export const messages = {
en: {
tabs: {
- graph: "Graph",
+ overview: "Overview",
+ modules: "Modules",
+ graph: "Galaxy",
+ flows: "Flows",
+ changes: "Changes",
+ dashboard: "Dashboard",
projects: "Projects",
control: "Control",
},
+ switcher: {
+ select: "Select a project…",
+ search: "Search projects…",
+ manage: "manage & index",
+ },
common: {
cancel: "Cancel",
refresh: "Refresh",
@@ -76,10 +86,20 @@ export const messages = {
},
zh: {
tabs: {
- graph: "图谱",
+ overview: "总览",
+ modules: "模块",
+ graph: "星系",
+ flows: "流程",
+ changes: "变更",
+ dashboard: "仪表盘",
projects: "项目",
control: "控制",
},
+ switcher: {
+ select: "选择项目…",
+ search: "搜索项目…",
+ manage: "管理与索引",
+ },
common: {
cancel: "取消",
refresh: "刷新",