loc_checker 2.0.2
loc_checker: ^2.0.2 copied to clipboard
A tool to detect non-localized strings in Flutter projects and generate ARB files with camelCase keys.
Changelog #
2.0.2 #
- Simplified ARB Generation: Removed verbose metadata from the generated
.arbfiles (such assource_file,source_line,widget_context), keeping only the essential@keymetadata used for string interpolation (placeholders). This creates much cleaner ARB files that contain "just the text and the value".
2.0.1 #
- Strict Clean Architecture Filtering: The
LocalizationCheckernow actively ignores Dart files located withindata/,domain/,services/, and API related layers, completely eliminating false positives from non-UI architecture layers. - Exception & Logger Noise Reduction: The
SmartStringFilternow rejects any strings passed to constructors containingException,Error,Logger, orLog(e.g.ApiException(...)), as well as API endpoint URL structures.
2.0.0 (Major Automation Overhaul) #
- AST-Based Rewriting Engine:
loc_checkernow safely rewrites your code using the Dart Analyzer AST, automatically stripping invalidconstmodifiers instead of causing compilation errors. - Intelligent String Detection (99% Accuracy): Highly contextual semantic detection that identifies UI text using parameter names (
title,label,message) and widget constructors (Text,AppBar), reducing false positives like hex colors or asset paths. - Dynamic Imports & Clean Architecture: Automatically injects absolute
package:imports and prevents context pollution in puredomain/data/bloclayers. - String Interpolation Handling: Automatically extracts
$variablesinto ARB placeholders ({param0}) and injects them appropriately into the rewritten method call. - VS Code Extension Integration: Added CLI support (
--extract-single) for the companion VS Code Extension that provides native💡 Extract and TranslateQuick Fix actions.
1.0.0 #
- Initial release.
- Detect non-localized strings in Dart files.
- Generate
en.arbwith camelCase keys and named placeholders. - Support custom UI components.