language_extract 1.0.4 copy "language_extract: ^1.0.4" to clipboard
language_extract: ^1.0.4 copied to clipboard

CLI tool that scans Flutter projects for hardcoded strings and generates localization files for GetX, easy_localization, and intl. Supports --replace to rewrite source files with .tr calls automatically.

1.0.4 #

  • README: replaced platform-specific PATH instructions with link to official Dart guide (covers macOS, Linux, Windows).
  • README: all CLI option examples now use = syntax (--locales=en_US,ar_AR, --source-locale=en_US).
  • Removed public lib/language_extract.dart barrel — package now correctly shows only as an executable on pub.flutter-io.cn, not as a library dependency.

1.0.3 #

  • Added executables field to pubspec.yaml — pub.flutter-io.cn now shows dart pub global activate on the Installing tab instead of dart pub add.

1.0.2 #

  • README: removed dev_dependency installation option — tool should be installed via dart pub global activate to avoid transitive meta version conflicts with the Flutter SDK.
  • Added confirmation prompt before --replace rewrites source files. Warns user to back up or commit first, defaults to N.

1.0.1 #

  • Improved README: restructured installation section with global activation and dev dependency options.
  • Moved "Run from source" to Contributing section.

1.0.0 #

  • Initial release.
  • AST-based scanner using package:analyzer — extracts hardcoded strings from Flutter UI widgets.
  • Generates locale files for GetX (.dart maps), easy_localization (.json), and intl (.arb).
  • --replace flag rewrites source files with .tr / .tr() / AppLocalizations calls.
  • Handles string interpolation — $variable mapped to @param / {param} syntax.
  • Auto const removal and auto import insertion on --replace.
  • Idempotent — safe to re-run; preserves existing translations in non-source locales.
  • One-time setup hints printed per package on first run.
1
likes
140
points
12
downloads

Documentation

API reference

Publisher

verified publisherusamaahsan.dev

Weekly Downloads

CLI tool that scans Flutter projects for hardcoded strings and generates localization files for GetX, easy_localization, and intl. Supports --replace to rewrite source files with .tr calls automatically.

Repository (GitHub)
View/report issues

Topics

#flutter #localization #i18n #getx #cli

License

MIT (license)

Dependencies

analyzer, args, path

More

Packages that depend on language_extract