- 엔진(자체 · NumPy · SciPy): 평면 · 쐐기(교선) · 전도 Markland(측방 한계 20° 기본) · 평면 Hoek-Bray(인장균열 없음 · 임계 · 깊이 · 수압 · kh · 수동 볼트) · 쐐기 SWedge 꼴(미끄럼 방향 8 경우 · 두 면 · 한 면 · 수압 중력식 · kh · 볼트) - 스테레오넷 좌표(등각 · 등면적 하반구 · 극점 · 대원 · 교선 · 마찰원 · 일광 엔벨로프 · 위험 영역 = 판정 부등식) - 길: 절리 작업본 E06_StabRock/joints.json(초기값 · 저장 · 초기화) · 해석 = 암 측점 깎기 쪽만 · 파생 저장본 stab_rock · 결과 · 측점 스테레오넷 - 화면: 좌 절리군 표 · 설정 / 가운데 위험 띠 · 스테레오넷 / 우 측점 결과 · 안전율 표 · E 단계 막대에 E06(끝에 덧붙임) - 시험 test_536_1(Hoek Sau Mau Ping 0.8184 · 1.0655 · Sharma 윗면 무게 · Hoek-Bray 쐐기 계수 · Kumsar · Priest 두 예제 · Markland 경계 · 투영 왕복 · 위험 영역 = 판정) · test_528 E 단계 수 4 → 5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
85 lines
3.6 KiB
TypeScript
85 lines
3.6 KiB
TypeScript
/* =============================================================================
|
|
* ui_template_locale.ts
|
|
* 다국어 텍스트 배열 방식 관리 파일 (i18n) — 사전 합성 및 조회 헬퍼
|
|
*
|
|
* 규칙 (frontend.md §3):
|
|
* - 모든 UI 문자열은 사전 파일에 [한국어, 영어] 배열로 선(先) 등록.
|
|
* - 컴포넌트에서는 ui_locales.키값[currentLanguageIndex] 형태로만 참조.
|
|
* - 텍스트 하드코딩 절대 금지.
|
|
* - 신규 문구는 해당 사전 파일의 해당 섹션 최하단에 추가.
|
|
*
|
|
* 사전 파일 분할 (700줄 제약):
|
|
* - ui_template_locale_common.ts : 공통 (액션/상태/폼/네비게이션/워크플로우/앱 셸)
|
|
* - ui_template_locale_a.ts : A 그룹 (로그인 전 A01~A09)
|
|
* - ui_template_locale_b1.ts : B 그룹 전반부 (B01~B04)
|
|
* - ui_template_locale_b2.ts : B 그룹 후반부 (B05~B07)
|
|
* - ui_template_locale_b5.ts : B 그룹 끝 (B08~B11)
|
|
* - ui_template_locale_de.ts : D 예정노선 · E 안정성평가 · 대시보드 [+] 고르기
|
|
* - ui_template_locale_e04.ts : E04 안정성평가 3D 해석
|
|
*
|
|
* 이 파일의 export 시그니처는 분할 이전과 동일하므로 소비처 import 수정은 불필요하다.
|
|
* ========================================================================== */
|
|
|
|
// b4 = B09 원가계산서·제비율(랩탑 메인 벌). 다른 벌과 줄이 겹치지 않게 맨 앞에 둠.
|
|
import { ui_locales_b4 } from "./ui_template_locale_b4";
|
|
import { ui_locales_common } from "./ui_template_locale_common";
|
|
import { ui_locales_a } from "./ui_template_locale_a";
|
|
import { ui_locales_e03 } from "./ui_template_locale_e03";
|
|
import { ui_locales_b1 } from "./ui_template_locale_b1";
|
|
import { ui_locales_b2 } from "./ui_template_locale_b2";
|
|
import { ui_locales_b3 } from "./ui_template_locale_b3";
|
|
import { ui_locales_e04 } from "./ui_template_locale_e04";
|
|
import { ui_locales_b5 } from "./ui_template_locale_b5";
|
|
import { ui_locales_m1 } from "./ui_template_locale_m1";
|
|
import { ui_locales_m2 } from "./ui_template_locale_m2";
|
|
import { ui_locales_de } from "./ui_template_locale_de";
|
|
import { ui_locales_e } from "./ui_template_locale_e";
|
|
import { ui_locales_e05 } from "./ui_template_locale_e05";
|
|
import { ui_locales_e06 } from "./ui_template_locale_e06";
|
|
|
|
/** 지원 언어 인덱스: 0 = 한국어, 1 = 영어 */
|
|
export const LANGUAGES = ["ko", "en"] as const;
|
|
export type LanguageCode = (typeof LANGUAGES)[number];
|
|
|
|
/** 현재 언어 인덱스 (기본: 한국어). 언어 전환 시 이 값을 갱신. */
|
|
export let currentLanguageIndex = 0;
|
|
|
|
/** 언어 전환 헬퍼. code가 유효하면 인덱스 갱신 후 반환. */
|
|
export function setLanguage(code: LanguageCode): number {
|
|
const idx = LANGUAGES.indexOf(code);
|
|
if (idx >= 0) {
|
|
currentLanguageIndex = idx;
|
|
}
|
|
return currentLanguageIndex;
|
|
}
|
|
|
|
/** 현재 언어에 맞는 문자열 반환. 키 누락 시 키 자체를 반환(개발 중 탐지용). */
|
|
export function t(key: keyof typeof ui_locales): string {
|
|
const entry = ui_locales[key];
|
|
if (!entry) {
|
|
return String(key);
|
|
}
|
|
return entry[currentLanguageIndex] ?? entry[0];
|
|
}
|
|
|
|
/** 분할된 사전 4종을 합성한 단일 사전. 키는 파일 간 중복되지 않는다. */
|
|
export const ui_locales = {
|
|
...ui_locales_b4,
|
|
...ui_locales_common,
|
|
...ui_locales_a,
|
|
...ui_locales_e03,
|
|
...ui_locales_b1,
|
|
...ui_locales_b2,
|
|
...ui_locales_b3,
|
|
...ui_locales_e04,
|
|
...ui_locales_b5,
|
|
...ui_locales_m1,
|
|
...ui_locales_m2,
|
|
...ui_locales_de,
|
|
...ui_locales_e,
|
|
...ui_locales_e05,
|
|
...ui_locales_e06,
|
|
} as const;
|
|
|
|
export type LocaleKey = keyof typeof ui_locales;
|