(text: string)
| 74 | // intact (no zh labels spliced into English text). Display-only; raw file is |
| 75 | // unchanged. |
| 76 | export 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. |
no test coverage detected