MCPcopy Create free account
hub / github.com/Qinbf/groundmap / localizeRelation

Function localizeRelation

web/components/GraphView.tsx:949–953  ·  view source on GitHub ↗
(t: ReturnType<typeof useT>, raw: string)

Source from the content-addressed store, hash-verified

947
948// 关系类型显示名翻译(找不到键则回退到原始 token,如自定义别名)
949function localizeRelation(t: ReturnType<typeof useT>, raw: string): string {
950 const key = `graph.rel.${raw}`;
951 const out = t(key as never);
952 return out === key ? raw : out;
953}
954
955// ============================================================
956// hover 卡(玻璃 HUD,随主题)

Callers 1

LegendFunction · 0.85

Calls 1

tFunction · 0.50

Tested by

no test coverage detected