localization
Adds and updates app strings through the CSV → ARB → generated localizations workflow
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Adds and updates app strings through the CSV → ARB → generated localizations workflow
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Handles cross-feature BusEvent communication with EventBusManager in the Flutter base template
Implements BLoC state management using AppBlocBase, an abstract State hierarchy, and a freezed _StateData
Builds the data layer with Freezed DTOs, Retrofit clients, hive_ce local stores, and repositories wired through injectable
Reviews UI-layer changes — screens, blocs, widgets, routes — against the template's StateBase + AppBlocBase + fl_theme conventions
Scaffolds a new feature module under apps/main/lib/presentation/modules using the bundled module generator
Configures routes with the IRoute / CustomRouter abstractions in core and exposes navigation via a BuildContext coordinator
| name | localization |
| description | Adds and updates app strings through the CSV → ARB → generated localizations workflow |
| license | MIT |
| compatibility | all |
| metadata | {"audience":"flutter-developers","framework":"flutter","pattern":"localization"} |
The CSV files are the source of truth — never hand-edit generated ARB or localization Dart files.
Current supported locales:
en — primary/default localevi — secondary localeLocalization sources:
apps/main/lib/l10n/
├── localizations.csv # app source of truth: key,en,vi
├── intl_en.arb # generated from CSV
├── intl_vi.arb # generated from CSV
├── localization_ext.dart # context/app localization helpers
└── generated/
├── app_localizations.dart
├── app_localizations_en.dart
└── app_localizations_vi.dart
core/lib/l10n/
├── localizations.csv # shared core strings: key,en,vi
├── intl_en.arb
├── intl_vi.arb
├── localization_ext.dart
└── generated/
├── core_localizations.dart
├── core_localizations_en.dart
└── core_localizations_vi.dart
plugins/fl_media/lib/src/l10n/
├── localizations.csv # media plugin strings: key,en,vi
├── intl_en.arb
├── intl_vi.arb
├── localization_ext.dart
└── generated/
├── fl_media_localizations.dart
├── fl_media_localizations_en.dart
└── fl_media_localizations_vi.dart
Each package has an l10n.yaml; the root make lang target regenerates all three localization sets:
make lang
That runs the custom CSV → ARB generator and then Flutter gen-l10n for apps/main, core, and plugins/fl_media.
The header is currently key,en,vi. One row per string.
key,en,vi
inform,Inform,Thông báo
ok,Ok,Đồng ý
loginRequired,Please login to continue,Vui lòng đăng nhập để tiếp tục
welcomeMessage,"Welcome, {0}!","Xin chào, {0}!"
Rules:
loginRequired, not auth_msg_2).{0}, {1}, …); do not use named placeholders.poweredByEchoChat → poweredByApp.apps/main/lib/l10n/localizations.csvcore/lib/l10n/localizations.csvplugins/fl_media/lib/src/l10n/localizations.csvDo not duplicate a shared string into app CSV if it already belongs in core or fl_media.
In app screens, use the generated app localizations helper:
class _FeatureScreenState extends StateBase<FeatureScreen> {
@override
Widget build(BuildContext context) {
return ScreenForm(title: l10n.featureTitle, child: ...);
}
}
For methods with many localized strings, a local variable is fine:
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.welcomeMessage('Huy'));
}
Older screens may use translate(context) from apps/main/lib/presentation/extentions/localization.dart; keep that style when making small local edits unless the surrounding file already uses context.l10n.
For shared core strings, use context.coreL10n / coreL10n from core/lib/l10n/. For fl_media, use context.flMediaL10n / flMediaL10n from plugins/fl_media/lib/src/l10n/.
Locale infrastructure lives in:
core/lib/common/constants/locale/app_locale.dartapps/main/lib/app_delegate.dartapps/main/lib/presentation/app.dartcore/lib/common/calendar.dartcore/lib/presentation/extentions/context_extention.dartMaterialApp.supportedLocales is wired from AppLocale.supportedLocales, not directly from generated app localizations. When changing the locale set, update AppLocale, app bootstrap locale messages, date/calendar helpers, and all three CSV files.
key,en,vi,ja.core/lib/common/constants/locale/app_locale.dart and supportedLocales.apps/main/lib/app_delegate.dart if the locale needs timeago/date messages.make lang.intl_<locale>.arb and *_localizations_<locale>.dart for each affected package.For sending app strings out to translators and folding results back, the template ships:
make gen_translation — emits a CSV with status columns ready for translators.make apply_translation — folds the completed CSV back into apps/main/lib/l10n/localizations.csv.See:
tools/module_generator/bin/generate_translation_csv.darttools/module_generator/bin/apply_translation.dartAfter localization changes, run:
make lang
rg -n "Locale\('th'|intl_th|_th\.dart|AppLocale\.th|ThMessages" .
Adjust the search terms when removing or replacing a different locale.
For app-facing strings, also run at least:
cd apps/main
fvm flutter analyze --no-pub
If shared/core strings changed, analyze core; if media strings changed, analyze plugins/fl_media.
apps/main, core, or fl_media).en and vi.*.arb or *_localizations_*.dart files.make lang run and generated files updated.{0}, {1} placeholders.intl_en.arb or intl_vi.arb directly — the next make lang overwrites it.core or fl_media localization.intl_th.arb, *_th.dart) after replacing a locale.localizations.csv because only the widget code was removed.{name} placeholders — use positional {0}.Text('Save') for user-facing text.