⚙️ 상세 옵션·실행 명세 (개발자 / AI 에이전트용) Triggers # When adding new translation keys When managing multilingual text When using context.i10n.* patterns Context Trigger Pattern # / i18n { action} { key_path} [ -- options] Parameters # File Structure # shared/ i10n/ lib/ src/
├── json/
│ ├── ko. i18n. json # Base ( Korean )
│ ├── en. i18n. json # English
│ └── ... ( ja , zh- Hans , de, fr, es, it, pt, ru, ar)
└── translations / # Generated code
├── translations. g. dart # AppLocale , LocaleSettings
├── translations_ko. g. dart # Base locale
└── ... # One file per locale ( en , ja, ... ) Basic Structure # // shared/i10n/lib/src/json/ko.i18n.json
{
"common" : {
"app_name" : "Unibook" ,
"ok" : "확인" ,
"cancel" : "취소" ,
"save" : "저장" ,
"loading" : "로딩 중..." ,
"error" : "오류가 발생했습니다"
} ,
"auth" : {
"login" : "로그인" ,
"logout" : "로그아웃" ,
"sign_up" : "회원가입" ,
"email" : "이메일" ,
"password" : "비밀번호"
}
} Placeholders # {
"user" : {
"greeting" : "{name}님, 안녕하세요!" ,
"points" : "{count} 포인트 보유" ,
"join_date" : "{date}에 가입"
}
} Pluralization # {
"items" : {
"count(param=n)" : {
"zero" : "항목 없음" ,
"one" : "항목 1개" ,
"other" : "항목 {n}개"
}
} ,
"messages" : {
"unread(param=count)" : {
"zero" : "읽지 않은 메시지 없음" ,
"one" : "읽지 않은 메시지 1개" ,
"other" : "읽지 않은 메시지 {count}개"
}
}
} Context-Based # {
"pet" : {
"type(context=PetType)" : {
"dog" : "강아지" ,
"cat" : "고양이" ,
"bird" : "새"
}
}
} Code Usage # Basic Usage # // Using BuildContext extension (provided by package:core)
Text ( context. i10n. common. app_name)
Text ( context. i10n. auth. login)
Text ( context. i10n. home. title)
Placeholders # Text ( context. i10n. user. greeting ( name: user. name) )
Text ( context. i10n. user. points ( count: user. points. toString ( ) ) )
Pluralization # Text ( context. i10n. items. count ( n: itemCount) )
Text ( context. i10n. messages. unread ( count: unreadCount) )
Commands # # Generate translation code
melos run generate: locale
# GPT auto- translation ( English )
melos run translate: slang
# Check for missing translations
dart run slang analyze Core Rules # Naming Conventions # Use nested structures: user.profile.title Use snake_case (key_case: snake) Use meaningful key names Translation Rules # All UI text must use translation keys Hard-coded strings are prohibited Pluralization must always be handled Code Generation # Run melos run generate:locale after modifying translation files Do not manually edit generated code MCP Integration # Examples # Add New Translation # / i18n add home. new_feature -- ko "새로운 기능" -- en "New Feature" Add Plural Translation # / i18n add cart. item_count -- ko "상품" -- en "item" -- pluralCheck Missing Translations # References # Detailed implementation: .claude/agents/i18n.md Translation files: shared/i10n/lib/src/json/