feat(M01): 일위대가 로직 테스트 컨테이너 틀 + 방식 A 질문·답 마법사

- 왼쪽 패널에 「일위대가 로직 테스트」 컨테이너 추가 — 공종 10 개 고르기 + 방식 탭 A·B·C (B·C 는 준비 중)
- 방식 A: 공종 → 조건 질문(한 번에 하나) → 재료·기계 고르기 → 결과 호표 · 식 안 보임 · 저장 없음
- 대상 10 개는 복잡도로 재어 고름(scripts/로직_복잡도_재기.py) · 시험 test_m01_test_container.py

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-20 21:34:39 +09:00
co-authored by Claude Sonnet 5
parent 565833bcb8
commit 292568e688
9 changed files with 686 additions and 18 deletions
@@ -0,0 +1,53 @@
/* =============================================================================
* M01_MasterData_UI_Test_Text.ts
* 로직 테스트 컨테이너 글자 — [한국어, 영어] · 틀과 방식 파일(A·B·C)이 같이 씀
* ========================================================================== */
import { currentLanguageIndex } from "@ui/ui_template_locale";
const TEXT = {
Title: ["일위대가 로직 테스트", "Logic test"],
Pick_Logic: ["공종 고르기", "Pick a job"],
Tab_A: ["A 질문·답", "A Wizard"],
Tab_B: ["B 호표 + 설명", "B Table + notes"],
Tab_C: ["C 흐름 그림", "C Flow"],
Soon: ["준비 중", "Coming soon"],
Loading: ["불러오는 중", "Loading"],
Failed: ["불러오지 못함", "Load failed"],
Read_Only: ["시험 계산만 — 저장하지 않음", "Trial only — nothing is saved"],
Step: ["{n} / {total}", "{n} / {total}"],
Back: ["이전", "Back"],
Next: ["다음", "Next"],
Again: ["처음부터", "Start over"],
Job_Title: ["이 공종의 단가를 셈합니다", "Price this job"],
Job_Note: [
"몇 가지만 물어봅니다 — 답을 마치면 결과 표가 나옵니다",
"A few questions, then the result table",
],
Ask_Pick: ["「{name}」 — 어느 것으로 할까요?", "「{name}」 — which one?"],
Ask_Number: ["「{name}」 값을 넣어 주세요{unit}", "Enter 「{name}」{unit}"],
Ask_Range: ["범위 {min} {max}", "Range {min} {max}"],
Mat_Title: ["쓰이는 재료·기계", "Materials and machines"],
Mat_Note: [
"기본은 원문 그대로 — 바꿔 보면 결과가 달라짐(저장 안 함)",
"Default is the source as is — swapping only changes this trial",
],
Mat_None: ["이 공종은 재료·기계를 따로 고르지 않습니다", "No materials or machines to pick"],
Mat_Default: ["기본 (원문 그대로)", "Default (as in source)"],
Mat_Price: ["단가", "Unit price"],
Result_Title: ["결과", "Result"],
Result_Stopped: ["계산이 멈춤", "Calculation stopped"],
Col_Name: ["이름", "Name"],
Col_Qty: ["수량", "Qty"],
Col_Amount: ["금액", "Amount"],
Sum_Total: ["합계", "Total"],
Sum_Result: ["결과 값", "Result"],
} as const satisfies Record<string, readonly [string, string]>;
export type TestTextKey = keyof typeof TEXT;
export function tt(key: TestTextKey, fill: Record<string, string | number> = {}): string {
const entry = TEXT[key];
const text: string = entry[currentLanguageIndex as 0 | 1] ?? entry[0];
return text.replace(/\{(\w+)\}/g, (m, k: string) => (k in fill ? String(fill[k]) : m));
}