Files
Aislo/M01_MasterData/M01_MasterData_UI_LogicLab_Text.ts
T
eomsangdon e73ef5d3a0 feat(M01): PLAN 3-4 복사해서 만들기 화면 — 별칭 꼴 식 편집·표 바꾸기·로직 부르기 갈래·시험 계산·저장
- 새 M01_MasterData_UI_LogicLab_Copy.ts — [본떠 만들기] → GET /logic/formula(별칭 폼) 편집
  → 표 바꾸기 모달(소요량·계수 검색) · 로직 부르기 그대로/같이 복사 갈래 · 식 줄 고치기·덧줄 더하기
  → POST /logic/formula/preview 로 되돌린 실제 식을 buildCalc 로 재사용해 시험 계산
  → POST /logic/formula/save 로 자체 로직(GX) 저장 · afterSave 로 LogicLab 이 새 키를 바로 엶
- 서버: POST /logic/formula/preview 새로 더함(저장 없이 별칭만 원문으로 되돌림) · 계약 7장 반영
- LogicLab.ts 는 「본떠 만들기」 단추 한 줄만 붙임(정본 로직 화면·New 화면은 안 건드림)
- ORCA 로 13-4-1 을 본떠 저장 — 안 고치면 79,279.668 로 원본과 같음 · 석공 줄 곱 2배로 고치면
  131,716.728 로 바뀜 확인 · 시험 흔적(GX000001·로직_자체.json·키대장 GX 번호) 지움·되돌림
- 시험 `test_m01_copy.py` 에 미리보기 시험 둘 더함 · M01 시험 130 통과 · typecheck 통과
2026-09-21 21:12:43 +09:00

79 lines
3.7 KiB
TypeScript

/* =============================================================================
* M01_MasterData_UI_LogicLab_Text.ts
* 「로직 개선 시험」 컨테이너 글자 — [한국어, 영어]
* ========================================================================== */
import { currentLanguageIndex } from "@ui/ui_template_locale";
const TEXT = {
Info_Title: ["기본정보", "Basic info"],
Info_ReadOnly: [
"기본 로직은 품셈 원문 그대로라 여기서 고치지 못함 — 비고만 고칠 수 있음",
"Base logic follows the source book; only the note can be edited",
],
Ho_Title: ["일위대가 호표", "Unit-cost table"],
Formula_Title: ["텍스트 수식", "Text formula"],
Formula_Slot: ["시험 계산을 누르면 식이 글로 나옴", "Run the trial calc to see the formula"],
Calc_Title: ["시험 계산", "Trial calculation"],
G_labor: ["인력", "Labor"],
G_material: ["자재", "Material"],
G_cost: ["경비", "Expense"],
G_other: ["그 밖", "Other"],
Subtotal: ["소계", "Subtotal"],
Total: ["계", "Total"],
Extra: ["덧줄", "Extra"],
Col_Name: ["이름", "Name"],
Col_Unit: ["단위", "Unit"],
Col_Qty: ["수량", "Quantity"],
Col_Price: ["단가", "Price"],
Col_Amount: ["금액", "Amount"],
Empty_Group: ["줄 없음", "No lines"],
Not_Money: ["호표가 없는 로직 — 결과 식", "No unit-cost lines — result formula"],
Calc_First: [
"금액은 아래 「시험 계산」 을 누르면 채워짐",
"Amounts fill after the trial calculation",
],
Click_Hint: ["줄을 누르면 그 줄이 쓰는 자료가 뜸", "Click a line to see the data it uses"],
Modal_Close: ["닫기", "Close"],
Modal_Qty: ["수량 식", "Quantity formula"],
Modal_Price: ["단가 자료", "Price source"],
Modal_Value: ["값", "Value"],
Modal_Source: ["출처", "Source"],
Modal_Spec: ["규격", "Spec"],
Modal_Logic: ["다른 로직을 부름", "Calls another logic"],
Modal_NoData: ["표나 단가 자료가 없는 줄 — 수량 식만 있음", "No table or price data"],
Modal_Hit: ["노란 줄 = 지금 넣은 값으로 걸린 줄", "Highlighted row matches the trial values"],
Modal_NoHit: [
"걸린 줄을 아직 못 맞힘 — 「시험 계산」 에 값을 넣고 다시 누르세요",
"No matching row yet — enter trial values and reopen",
],
Copy_Open: ["본떠 만들기", "Copy as mine"],
Copy_NeedOpen: ["먼저 로직을 고르세요", "Pick a logic first"],
Copy_Title: ["복사해서 만들기", "Copy to edit"],
Copy_Name: ["새 이름", "New name"],
Copy_Owner: ["소유", "Owner"],
Copy_Site: ["현장", "Site"],
Copy_Shared: ["공용", "Shared"],
Copy_Aliases: ["부르는 표·로직", "Tables & logics used"],
Copy_Alias_Swap: ["표 바꾸기", "Change table"],
Copy_Alias_Ref: ["그대로 부르기", "Keep reference"],
Copy_Alias_Fork: ["같이 복사하기", "Copy along"],
Copy_Alias_Forked: ["복사됨", "Copied"],
Copy_Lines: ["식 줄 — 고치거나 더함", "Formula lines — edit or add"],
Copy_AddExtra: ["덧줄 더하기", "Add extra line"],
Copy_ExtraName: ["새 덧줄", "New extra line"],
Copy_Save: ["저장(자체 로직)", "Save as mine"],
Copy_Cancel: ["취소", "Cancel"],
Copy_Saved: ["자체 로직으로 저장함", "Saved as your own logic"],
Copy_PickTitle: ["바꿀 표 찾기", "Find a table"],
Copy_PickSearch: ["표 이름·키로 찾기", "Search by table name or key"],
Copy_PickNone: ["찾는 표가 없음", "No matching tables"],
} as const satisfies Record<string, readonly [string, string]>;
export type LabTextKey = keyof typeof TEXT;
export function tl(key: LabTextKey): string {
const entry = TEXT[key];
return entry[currentLanguageIndex as 0 | 1] ?? entry[0];
}