MCPcopy Create free account
hub / github.com/esengine/esengine / resolveText

Function resolveText

packages/editor-app/src/components/SettingsWindow.tsx:42–48  ·  view source on GitHub ↗
(text: string | undefined)

Source from the content-addressed store, hash-verified

40 * 解析可本地化文本 - 如果以 '$' 开头,作为翻译键处理
41 */
42 const resolveText = (text: string | undefined): string => {
43 if (!text) return '';
44 if (isTranslationKey(text)) {
45 return t(getTranslationKey(text));
46 }
47 return text;
48 };
49
50 const [categories, setCategories] = useState<SettingCategory[]>([]);
51 const [selectedCategoryId, setSelectedCategoryId] = useState<string | null>(initialCategoryId || null);

Callers 2

renderSettingInputFunction · 0.85
SettingsWindowFunction · 0.85

Calls 2

isTranslationKeyFunction · 0.90
getTranslationKeyFunction · 0.90

Tested by

no test coverage detected