locale_sweep 0.2.0
locale_sweep: ^0.2.0 copied to clipboard
A CI quality gate for Flutter localization. Runs app flows across locales, device sizes, text scales, and RTL modes, then reports broken screens with screenshot proof.
0.2.0 #
Dark mode testing #
- Added
darkModeparameter tosweepTest()— set totrueto test every variant in both light and dark brightness. - Added
lightTheme/darkThemeparameters — pass your app'sThemeDatasoTheme.of(context)works correctly inside the builder. Defaults toThemeData.light()andThemeData.dark()when omitted. - Added
dark_mode: truesupport inlocale_sweep.yamlconfig. SweepVariantgainsisDarkandbrightnessproperties.- Dark variants include "Dark" in
displayLabeland "dark" in file-safelabel.
Variant exclusion #
- Added
skipcallback tosweepTest()— returntrueto exclude specific locale/scale/viewport/brightness combinations from the test matrix. - Skipped variants show as
~(skipped) in Flutter test output, not failures.
Interactive HTML report #
- Added
ReportGenerator.generateHtml()— self-contained HTML dashboard with dark theme, no external dependencies. - Summary cards: total, passed, failed, overflows, ARB issues at a glance.
- Interactive filters: filter by status (pass/fail), locale, and flow.
- Screenshot gallery: cards grouped by flow with golden images, pass/fail badges, and issue details.
- Dark mode and RTL badges on variant cards.
- Locale summary table with failure row highlighting.
- CLI now outputs
report.htmlalongsidereport.mdandreport.json.
CI control #
- Added
--fail-onCLI flag — comma-separated categories (overflow,arb,golden,all,none) that control which issues trigger a non-zero exit code. - Added
screenshotLinkBuilderparameter toReportGenerator.generateMarkdown()— customize how screenshot paths render in PR comments.
Config validation #
SweepConfig.load()now warns on stderr about unknown keys (likely typos) and type mismatches.- Invalid YAML, empty files, and wrong types fall back to defaults with clear warning messages.
File-based result sink #
- Each
sweepTest()flow writes results to.locale_sweep/results/{flowName}.json— isolate-safe, no global state. - CLI reads result files for full overflow and ARB data instead of parsing
--machineoutput.
Other #
- Brightness field added to
SweepResult.toJson()/fromJson()serialization. - Comprehensive integration test covering all new features (167 tests total).
- Rewritten README with full documentation for every feature.
0.1.7 #
- Updated README with variantBody examples, SweepVariant API docs, untranslated detection docs.
0.1.6 #
- Auto-published on 2026-09-03.
0.1.5 #
- Expanded RTL locale detection: 10 locales (ar, he, fa, ur, ku, ps, yi, dv, sd, ug) with subtag support (e.g. ar_EG).
- CLI now reads
locale_sweep.yamlconfig file via--configflag. - CLI uses
GitHubReporterfor PR comments instead of duplicate HTTP logic. - Added
variantBodycallback tosweepTest()for locale-aware test interactions. - Added
ArbIssueType.untranslateddetection for strings identical to the base locale.
0.1.4 #
- Fixed Dart SDK constraint from ^3.11.5 to ^3.8.0 for broader compatibility.
- Centered title and badges on pub.dev README.
- Updated CI workflows to Flutter 3.41.9.
0.1.3 #
- Rewrote README for pub.dev compatibility — pure Markdown, proper image alignment.
- Added CI and auto-publish GitHub Actions workflows.
0.1.2 #
- Updated README with professional layout and screenshot gallery.
- Fixed GitHub repository URLs in pubspec.yaml.
0.1.1 #
- Add dartdoc comments to all public API elements.
- Add
example/example.dartfor pub.dev example tab. - Real-world validation: tested against Spotube (48k stars) and wger (960 stars).
0.1.0 #
- Initial release.
sweepTest()generateslocales × textScales × viewportstest matrix.OverflowDetectorcaptures RenderFlex overflow with pixel counts.ArbAnalyzerdetects missing ARB keys and placeholder mismatches.- Golden screenshot comparison (
runvsupdatecommands). - Markdown and JSON report generation.
- GitHub PR comment integration.
- Built-in viewport presets: phone, phoneSmall, phoneWide, tablet.
- RTL auto-detection for Arabic, Hebrew, and Farsi.