fix(M01): 계산 멈춤에도 수량 칸 날식 · 까닭 날글 안 찍음 — 마지막 조각 · 빈칸 · 까닭 걸러냄 (PLAN 6장 셋째 줄)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
@@ -138,6 +138,10 @@ const TEXT = {
|
||||
"「{name}」 규격이 여럿이라 정하지 못함 — 위 「쓰이는 재료·기계」에서 하나를 골라 주세요",
|
||||
"「{name}」 has several specs — pick one in the materials list above",
|
||||
],
|
||||
Stop_Generic: [
|
||||
"이 조건으로는 셈하지 못함 — 입력값 · 표에 그 조합이 있는지 확인",
|
||||
"Cannot be calculated with these inputs — check the values and the table",
|
||||
],
|
||||
Stop_NoPrice: [
|
||||
"「{name}」 단가가 자료에 비어 있어 셈하지 못함 — 자료를 채워야 함",
|
||||
"「{name}」 has no price in the data yet",
|
||||
@@ -158,6 +162,12 @@ export function plainReason(reason: string): string {
|
||||
return reason;
|
||||
}
|
||||
|
||||
/** 화면에 찍는 까닭의 마지막 방어 — 중괄호 · 따옴표 · Decimal( 이 섞인 날글은 사람 말 한 줄로 */
|
||||
export function safeReason(reason: string): string {
|
||||
const plain = plainReason(reason);
|
||||
return /[{}"']|Decimal\(/.test(plain) ? tx("Stop_Generic") : plain;
|
||||
}
|
||||
|
||||
/** 흐름 그림 머리 「이렇게 씀」 — 줄 목록 */
|
||||
|
||||
/** 공용 `t()` 와 같은 뜻 — `{n}`·`{v}` 는 채움 */
|
||||
|
||||
Reference in New Issue
Block a user