File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ this_dir=${BASH_SOURCE[0]%/*}
2626
2727default_suites=(
2828 analyze test
29- build_runner drift pigeon icons
29+ l10n build_runner drift pigeon icons
3030 android # This takes multiple minutes in CI, so do it last.
3131)
3232
@@ -82,7 +82,7 @@ while (( $# )); do
8282 --all) opt_files=all; opt_all=1; shift ;;
8383 --fix) opt_fix=1; shift ;;
8484 --verbose) opt_verbose=1; shift ;;
85- analyze|test|build_runner|drift|pigeon|icons|android|shellcheck)
85+ analyze|test|l10n| build_runner|drift|pigeon|icons|android|shellcheck)
8686 opt_suites+=(" $1 " ); shift ;;
8787 * ) usage;;
8888 esac
@@ -241,6 +241,19 @@ should_run_build_runner() {
241241 return 1
242242}
243243
244+ run_l10n () {
245+ files_check lib/generated/l10n/' *' .dart \
246+ || return 0
247+
248+ check_no_uncommitted_or_untracked lib/generated/l10n/' *' .dart \
249+ || return
250+
251+ flutter gen-l10n > /dev/null \
252+ || return
253+
254+ check_no_changes " updates to l10n" lib/generated/l10n/' *' .dart
255+ }
256+
244257run_build_runner () {
245258 should_run_build_runner \
246259 || return 0
@@ -443,6 +456,7 @@ for suite in "${opt_suites[@]}"; do
443456 case " $suite " in
444457 analyze) run_analyze ;;
445458 test) run_test ;;
459+ l10n) run_l10n ;;
446460 build_runner) run_build_runner ;;
447461 drift) run_drift ;;
448462 pigeon) run_pigeon ;;
You can’t perform that action at this time.
0 commit comments