Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2nUMUMTsqm93PbQtipo6c
91 lines
3.8 KiB
TypeScript
91 lines
3.8 KiB
TypeScript
/* =============================================================================
|
|
* M02_DF_FuncText.ts
|
|
* 함수 상자 판 글 [한, 영] 짝 · 틀 단추 수식 · 수식 오류 말 — 판 파일이 700줄 안에 들도록 뗌
|
|
* ========================================================================== */
|
|
|
|
import { currentLanguageIndex } from "@ui/ui_template_locale";
|
|
|
|
export const TEXT = {
|
|
Unit: ["단위", "Unit"],
|
|
Cell: ["고른 칸", "Selected cell"],
|
|
Got: ["받은 알약", "Received pills"],
|
|
GotHint: ["누르거나 칸에 끌어 놓음", "Click, or drag onto a cell"],
|
|
NoGot: ["선으로 들어온 알약이 없음", "No pill has come in yet"],
|
|
Placed: ["놓임", "placed"],
|
|
Free: ["아직 안 놓은 알약", "not placed yet"],
|
|
Busy: ["이미 쓰는 칸", "That cell is already in use"],
|
|
Locked: [
|
|
"받은 알약이 놓인 칸은 선의 값으로 채워짐 — 직접 못 고침",
|
|
"This cell is filled by the wire — cannot edit",
|
|
],
|
|
Vars: ["변수", "Variables"],
|
|
MakeVar: ["변수 만들기", "Make variable"],
|
|
NoVars: ["아직 변수가 없음", "No variables yet"],
|
|
VarName: ["이름", "Name"],
|
|
VarType: ["갈래", "Type"],
|
|
Number: ["숫자", "Number"],
|
|
Choice: ["선택", "Choice"],
|
|
Text: ["글", "Text"],
|
|
VarUnit: ["단위", "Unit"],
|
|
VarMin: ["최소", "Min"],
|
|
VarMax: ["최대", "Max"],
|
|
VarChoices: ["선택 목록 (쉼표로 나눔)", "Choices (comma separated)"],
|
|
VarExample: ["예시값", "Example value"],
|
|
VarCell: ["붙을 칸", "Attach to"],
|
|
Make: ["만들기", "Make"],
|
|
Cancel: ["취소", "Cancel"],
|
|
Remove: ["지움", "Remove"],
|
|
NeedName: ["이름을 적음", "Enter a name"],
|
|
SameName: ["같은 이름이 이미 있음", "That name already exists"],
|
|
NotNumber: ["예시값은 숫자로 적음", "Example must be a number"],
|
|
BadRange: ["범위는 최소가 최대보다 작게", "Min must be below max"],
|
|
OutBtn: ["출력 칸으로", "Make output cell"],
|
|
OutNow: ["출력", "Output"],
|
|
OutNone: ["출력 칸을 아직 안 정함", "Output cell not set yet"],
|
|
OutOnly: ["출력은 칸 하나 — 다시 고르면 바뀜", "One output cell — pick again to change"],
|
|
Frames: ["틀", "Templates"],
|
|
FrameMul: ["곱하기", "Multiply"],
|
|
FrameMore: ["할증", "Markup"],
|
|
FrameDiv: ["나누기", "Divide"],
|
|
FrameIf: ["만약", "If"],
|
|
FrameMin: ["최소", "Min"],
|
|
FrameMax: ["최대", "Max"],
|
|
FrameUp: ["올림", "Round up"],
|
|
FrameLook: ["표에서 찾기", "Look up in table"],
|
|
FrameHint: ["칸 주소만 바꾸면 됨", "Just change the cell addresses"],
|
|
ReadOnly: ["읽기만", "Read only"],
|
|
Loading: ["시트를 불러오는 중", "Loading sheet"],
|
|
Problem: ["⚠ ", "⚠ "],
|
|
Unplaced: [" 받은 알약이 놓이지 않음", " pill is not placed on a cell"],
|
|
Err_DIV0: ["0으로 나눔", "divides by zero"],
|
|
Err_NAME: ["알 수 없는 이름", "unknown name"],
|
|
Err_REF: ["없는 칸을 가리킴", "points to a missing cell"],
|
|
Err_VALUE: ["값 종류가 안 맞음", "wrong kind of value"],
|
|
Err_CYCLE: ["서로 돌려 가리킴(순환)", "circular reference"],
|
|
Err_NA: ["찾는 값이 없음", "value not found"],
|
|
Err_OTHER: ["수식이 틀림", "formula is wrong"],
|
|
} as const;
|
|
|
|
export const tf = (key: keyof typeof TEXT): string => TEXT[key][currentLanguageIndex];
|
|
|
|
/** 틀 단추 — 진짜 엑셀 수식을 고른 칸에 넣음 */
|
|
export const FRAMES: [keyof typeof TEXT, string][] = [
|
|
["FrameMul", "=B1*B2"],
|
|
["FrameMore", "=B1*(1+B2/100)"],
|
|
["FrameDiv", "=B1/B2"],
|
|
["FrameIf", '=IF(B3="급",10,0)'],
|
|
["FrameMin", "=MIN(B1,B2)"],
|
|
["FrameMax", "=MAX(B1,B2)"],
|
|
["FrameUp", "=ROUNDUP(B4,3)"],
|
|
["FrameLook", "=XLOOKUP(B1,E1:E10,F1:F10)"],
|
|
];
|
|
|
|
export const ERR_KEY: Record<string, keyof typeof TEXT> = {
|
|
"#DIV/0!": "Err_DIV0",
|
|
"#NAME?": "Err_NAME",
|
|
"#REF!": "Err_REF",
|
|
"#VALUE!": "Err_VALUE",
|
|
"#CYCLE!": "Err_CYCLE",
|
|
"#N/A": "Err_NA",
|
|
};
|