remove_unused_localizations 1.1.2
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
.arbfiles 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
libfolder (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.mdwith 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.yamlconfig file to specify custom directories to scan for Dart files. - ๐ Supports monorepos, shared packages, and projects with Dart code outside
lib. - โ๏ธ New
dart-scan-dirsoption: list of directories to scan (paths relative to project root). - ๐ Defaults to
libwhen 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
testandlintsinstead offlutter_testandflutter_lints. - Fixed: Plugin now correctly detects used localization keys in multi-line chained property access (e.g.,
context.l10n.keywhen 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().keyusage.
1.1.2 Update README.md file #
- Update README to reflect version bump of remove_unused_localizations to 1.1.2 in pubspec.yaml