Files
Aislo/M02_MasterTemplete/M02_MasterTemplete_Matset_Text.ts
T
eomsangdonandClaude Opus 5.5 4abfc5b265 refactor(M02): 자재 조합 표를 마스터 템플릿으로 옮김 · M02 좌측 「자재 조합」 컨테이너
- 표 resources/master_data/자재조합.json → resources/master_template/자재조합.json(git mv) · 키 UM 은 표 안 「다음」 번호 · _키대장 · master_keys 의 UM 뺌 · check_master 틀이 새 자리를 같이 봄
- 서버: M01 /api/m01/matset* 뺌 · M02 저장소 M02_MasterTemplete_Matset.py(목록 · 새로 · 고치기 · 지우기 · 쓰는 열 검사) · 길 GET/POST /api/m02/material-combos · PUT/DELETE /api/m02/material-combos/{키} · 갈라 내기(branchMaterialCombo)도 이 저장소로
- 화면: M01 좌측 「자재 조합」 컨테이너 뺌 · M02 좌측 「자재 조합」 컨테이너(찾기 · 키 맨 앞 목록 · 새로 · 본떠 만들기 · 지우기) · 메인 칸 상세(이름 · 비고 · 본뜬키 · 담은 자재 표 · 자재 더하기 · 빼기 · 저장) · 쓰는 열이 있으면 지우기는 확인 창 없이 알림
- 시험: test_m01_matset → test_m02_matset · test_m02_combo_branch 사본 자리 · 실제 자재 코드

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwJQ5eRrCKf3nH9EFeKvJz
2026-09-28 22:25:30 +09:00

50 lines
2.2 KiB
TypeScript

/* =============================================================================
* M02_MasterTemplete_Matset_Text.ts
* 좌측 「자재 조합」 컨테이너 · 상세 화면 글자 — [한국어, 영어]
* ========================================================================== */
import { currentLanguageIndex } from "@ui/ui_template_locale";
const TEXT = {
Title: ["자재 조합", "Material sets"],
Search: ["키 · 이름으로 찾기", "Search by key or name"],
Empty: ["자재 조합 없음", "No material sets"],
New: ["새 자재 조합(저장 전)", "New material set (unsaved)"],
CopyName: ["{value} 본뜸", "{value} copy"],
Save: ["저장", "Save"],
InUse: [
"{value} 열이 쓰는 자재 조합이라 못 지움",
"Used by the column(s) {value} — cannot delete",
],
DeleteAsk: ["자재 조합 {value} 을 지울까요?", "Delete material set {value}?"],
Saved: ["저장함", "Saved"],
Deleted: ["지움", "Deleted"],
Stale: [
"그 사이 자재 조합 표가 바뀜 — 목록을 새로 받았으니 다시 고쳐 주세요",
"The table changed meanwhile — reloaded, please edit again",
],
NeedName: ["이름을 적어야 저장됨", "A name is required"],
NeedItem: ["담은 자재가 하나는 있어야 저장됨", "Add at least one material"],
Load_Failed: ["자재 조합을 못 받음 — {value}", "Could not load material sets — {value}"],
Failed: ["자재 조합을 못 고침 — {value}", "Could not change the material set — {value}"],
Head_Name: ["이름", "Name"],
Head_Note: ["비고", "Note"],
Head_Origin: ["본뜬키", "Copied from"],
Origin_Self: ["원본", "Original"],
Items_Title: ["담은 자재", "Materials in it"],
Col_Code: ["코드", "Code"],
Col_Name: ["이름", "Name"],
Col_Spec: ["규격", "Spec"],
Col_Unit: ["단위", "Unit"],
Remove: ["빼기", "Remove"],
AddItem: ["자재 더하기", "Add material"],
NoItem: ["담은 자재 없음", "No materials yet"],
} as const satisfies Record<string, readonly [string, string]>;
export type MatsetTextKey = keyof typeof TEXT;
export function tm(key: MatsetTextKey, value = ""): string {
const entry = TEXT[key];
return (entry[currentLanguageIndex as 0 | 1] ?? entry[0]).replace("{value}", value);
}