language_extract 1.0.4
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.dartbarrel — package now correctly shows only as an executable on pub.flutter-io.cn, not as a library dependency.
1.0.3 #
- Added
executablesfield topubspec.yaml— pub.flutter-io.cn now showsdart pub global activateon the Installing tab instead ofdart pub add.
1.0.2 #
- README: removed dev_dependency installation option — tool should be installed via
dart pub global activateto avoid transitivemetaversion conflicts with the Flutter SDK. - Added confirmation prompt before
--replacerewrites 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 (
.dartmaps), easy_localization (.json), and intl (.arb). --replaceflag rewrites source files with.tr/.tr()/AppLocalizationscalls.- Handles string interpolation —
$variablemapped to@param/{param}syntax. - Auto
constremoval 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.