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

Function tType

web/components/FrontmatterPanel.tsx:123–128  ·  view source on GitHub ↗
(value: string | undefined, locale: Locale)

Source from the content-addressed store, hash-verified

121
122// 翻译 type/status/confidence 字段值(fallback 到原值)
123export function tType(value: string | undefined, locale: Locale): string {
124 if (!value) return t("type.unknown", locale);
125 const key = `type.${value}` as TranslationKey;
126 const translated = t(key, locale);
127 return translated === key ? value : translated;
128}
129
130export function tStatus(value: string | undefined, locale: Locale): string {
131 if (!value) return t("status.draft", locale);

Callers 5

OrphansPageFunction · 0.90
StaleDraftsPageFunction · 0.90
LowConfidencePageFunction · 0.90
ToUpdatePageFunction · 0.90
FrontmatterPanelFunction · 0.85

Calls 1

tFunction · 0.90

Tested by

no test coverage detected