Refactor: Introduce AppStrings for soft i18n

This commit is contained in:
2025-12-07 18:58:44 +09:00
parent 9a9022356a
commit c570d61563
7 changed files with 155 additions and 58 deletions
+16
View File
@@ -0,0 +1,16 @@
# 60. Introduce AppStrings for Soft i18n
## 1. 목표 (Goal)
- UI 텍스트 하드코딩을 방지하고 추후 본격적인 i18n 적용을 대비하기 위해 `AppStrings` 상수 클래스를 도입합니다.
- 자주 사용되는 UI 텍스트(메뉴, 스탯, 행동 등)를 한 곳에서 관리합니다.
## 2. 구현 계획 (Implementation Plan)
1. **`lib/game/config/app_strings.dart` 생성:**
- `actionAttack`, `actionDefend`, `statHp`, `statAtk` 등 카테고리별로 정적 상수를 정의합니다.
2. **UI 코드 수정:**
- `BattleScreen`, `InventoryScreen`, `MainMenuScreen` 등에서 하드코딩된 문자열을 `AppStrings.xxx`로 교체합니다.
- *Note:* 전투 로그와 같이 동적으로 생성되는 복잡한 문장은 이번 단계에서 제외합니다.
## 3. 기대 효과 (Expected Outcome)
- 텍스트 변경 시 `AppStrings`만 수정하면 되므로 유지보수성 향상.
- 추후 다국어 지원 라이브러리 도입 시 마이그레이션이 매우 쉬워짐.