mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-09 09:11:00 +08:00
feat(ui): zh chrome — new tabs and project switcher translated
The Atlas program added seven tabs of hardcoded English on top of an en/zh UI. This translates the shell (tab labels, switcher strings) so zh users get a coherent frame; panel-content i18n is a dedicated follow-up pass, recorded. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
@@ -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 })}
|
||||
|
||||
@@ -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 & index →
|
||||
{allProjectsLabel} — {labels.manage} →
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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: "刷新",
|
||||
|
||||
Reference in New Issue
Block a user