다국어 생성후 매핑 자동저장
This commit is contained in:
@@ -105,9 +105,17 @@ export function extractMultilangLabels(
|
||||
addLabel(comp.id, anyComp.title, "title", parentType, parentLabel);
|
||||
}
|
||||
|
||||
// 3. 버튼 텍스트
|
||||
// 3. 버튼 텍스트 (componentId에 _button 접미사 추가하여 라벨과 구분)
|
||||
if (config?.text && typeof config.text === "string") {
|
||||
addLabel(comp.id, config.text, "button", parentType, parentLabel);
|
||||
addLabel(
|
||||
`${comp.id}_button`,
|
||||
config.text,
|
||||
"button",
|
||||
parentType,
|
||||
parentLabel,
|
||||
config.langKeyId,
|
||||
config.langKey
|
||||
);
|
||||
}
|
||||
|
||||
// 4. placeholder
|
||||
@@ -326,15 +334,16 @@ export function applyMultilangMappings(
|
||||
if (labelMapping) {
|
||||
updated.langKeyId = labelMapping.keyId;
|
||||
updated.langKey = labelMapping.langKey;
|
||||
|
||||
// 버튼 컴포넌트의 경우 componentConfig에도 매핑
|
||||
if (config?.text) {
|
||||
updated.componentConfig = {
|
||||
...updated.componentConfig,
|
||||
langKeyId: labelMapping.keyId,
|
||||
langKey: labelMapping.langKey,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 버튼 텍스트 매핑 (componentId_button 형식으로 조회)
|
||||
const buttonMapping = mappingMap.get(`${comp.id}_button`);
|
||||
if (buttonMapping && config?.text) {
|
||||
updated.componentConfig = {
|
||||
...updated.componentConfig,
|
||||
langKeyId: buttonMapping.keyId,
|
||||
langKey: buttonMapping.langKey,
|
||||
};
|
||||
}
|
||||
|
||||
// 컬럼 매핑
|
||||
|
||||
Reference in New Issue
Block a user