remove_unused_localizations 1.1.2 copy "remove_unused_localizations: ^1.1.2" to clipboard
remove_unused_localizations: ^1.1.2 copied to clipboard

A Dart package to clean unused localization keys from .arb files.

0.0.1 Initial Release #

  • ๐ŸŽ‰ First version of remove_unused_localizations.
  • ๐Ÿ›  Automatically detects and removes unused localization keys.
  • ๐Ÿš€ Supports all .arb files dynamically.
  • ๐Ÿ” Excludes important localization files to prevent accidental deletions.
  • ๐Ÿ“Š Provides detailed output on removed keys.

0.0.2 Fixes for Initial Release #

0.0.3 Fixes for Initial Release #

0.0.4 Add New Feature #

  • ๐ŸŽ‰ Add new feature to not automatically remove unused localization keys from lib folder (If needed).

1.0.0 Stable Release & Performance Improvements #

  • ๐Ÿ Stable release โ€” officially moved to version 1.0.0.
  • ๐Ÿš€ Improved performance: Faster scanning of .arb and Dart files.
  • ๐Ÿ”’ Safer file handling: Improved exclusion logic for critical files.
  • ๐Ÿง  Smarter key detection: Better regex accuracy for detecting used localization keys.
  • ๐Ÿ“ฆ Improved CLI structure: Now works properly as a CLI tool and prints output to the terminal.
  • ๐Ÿงช General refactoring and stability improvements.

1.0.1 Documentation Update #

  • ๐Ÿ“ Updated README.md with detailed usage instructions, examples, and feature descriptions.
  • โœ… Improved overall clarity for installation and usage on pub.dev.

1.0.2 Extended Localization Pattern Support #

  • ๐Ÿ› Fixed: Plugin no longer incorrectly removes used translations when localization keys are accessed across multiple lines (e.g., AppLocalizations.of(context)!.\n key).
  • ๐Ÿ” Detection regex now allows optional whitespace and newlines between the accessor and the key.
  • ๐Ÿ› Fixed: Plugin now detects AppLocalizations.of(Get.context!)!.key (GetX).
  • ๐Ÿ› Fixed: Plugin now detects null-aware access (variable?.key, variable?.method(param)).
  • ๐Ÿ› Fixed: Plugin now detects method calls with parameters (e.g., key(type.name), key(e.toString())).
  • ๐Ÿ› Fixed: Plugin now detects AppLocalizations.of(Get.context!,\n)!.key (formatted multi-line with trailing comma).

1.1.0 Configurable Dart Scan Directories #

  • โœจ New: Add optional remove_unused_localizations.yaml config file to specify custom directories to scan for Dart files.
  • ๐Ÿ“‚ Supports monorepos, shared packages, and projects with Dart code outside lib.
  • โš™๏ธ New dart-scan-dirs option: list of directories to scan (paths relative to project root).
  • ๐Ÿ”„ Defaults to lib when config is absent for backward compatibility.
  • ๐Ÿ“ Updated README with Configuration section and note about syncing with l10n.yaml.

1.1.1 Pure Dart & Multiline Fix #

  • Breaking: Converted from Flutter package to pure Dart package. Removed Flutter SDK dependency; package now uses test and lints instead of flutter_test and flutter_lints.
  • Fixed: Plugin now correctly detects used localization keys in multi-line chained property access (e.g., context.l10n.key when split across lines).
  • Fixed: Improved regex to allow optional whitespace around dots in chained access patterns.
  • Fixed: Refined method-call pattern for more accurate detection of SomeClass.method().key usage.

1.1.2 Update README.md file #

  • Update README to reflect version bump of remove_unused_localizations to 1.1.2 in pubspec.yaml
12
likes
160
points
2.11k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package to clean unused localization keys from .arb files.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

yaml

More

Packages that depend on remove_unused_localizations