MCPcopy
hub / github.com/Narcooo/inkos / relabelOkrJargon

Function relabelOkrJargon

packages/studio/src/lib/truth-display.ts:76–85  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

74// intact (no zh labels spliced into English text). Display-only; raw file is
75// unchanged.
76export function relabelOkrJargon(text: string): string {
77 if (!text || !/[一-鿿]/.test(text)) return text;
78 return text
79 .replace(/各卷\s*OKR\s*[((]\s*Objective\s*\+\s*Key\s*Results\s*[))]/gi, "各卷目标与关键节点")
80 .replace(/\bKR\s*(\d+)/gi, "关键结果$1")
81 .replace(/Key\s*Results?/gi, "关键结果")
82 .replace(/\bOKR\b/gi, "目标")
83 .replace(/\s?Objective\b/g, "目标")
84 .replace(/\bKR\b/gi, "关键结果");
85}
86
87// First non-empty prose paragraph of a body, for an at-a-glance overview. A
88// leading markdown heading on the paragraph is dropped so the glance is prose.

Callers 2

renderTruthBodyFunction · 0.90

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected