MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / localizeWikiText

Function localizeWikiText

deployments/desktop/static/desktop.js:3170–3183  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

3168 ];
3169
3170 function localizeWikiText(value) {
3171 let text = String(value ?? "");
3172 if (state.locale !== "en" || !text) return text;
3173 wikiEnglishTextMap.forEach(([source, target]) => {
3174 text = text.replaceAll(source, target);
3175 });
3176 return text
3177 .replace(/Direction:\s*Increased/gi, "Direction: Increased")
3178 .replace(/Direction:\s*Decreased/gi, "Direction: Decreased")
3179 .replace(/Direction:\s*New/gi, "Direction: New")
3180 .replace(/Direction:\s*Stable/gi, "Direction: Stable")
3181 .replace(/Period:\s*([0-9W-]+)/g, "Period: $1")
3182 .replace(/Weight:\s*/g, "Weight: ");
3183 }
3184
3185 function rawGraphTitle(node) {
3186 const source = node || {};

Callers 12

graphTitleFunction · 0.85
graphBodyFunction · 0.85
aliasLabelsForTextFunction · 0.85
architectureBodyFunction · 0.85
topicBodyFunction · 0.85
userDirectionBodyFunction · 0.85
relationLabelFunction · 0.85
renderWikiTagsFunction · 0.85
setWikiEntryFunction · 0.85
wikiEvidenceMetaFunction · 0.85
normalizeCitationSourceFunction · 0.85
bindEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected