@@ -26,7 +26,7 @@ this_dir=${BASH_SOURCE[0]%/*}
26
26
27
27
default_suites=(
28
28
analyze test
29
- build_runner drift pigeon icons
29
+ build_runner l10n drift pigeon icons
30
30
android # This takes multiple minutes in CI, so do it last.
31
31
)
32
32
@@ -82,7 +82,7 @@ while (( $# )); do
82
82
--all) opt_files=all; opt_all=1; shift ;;
83
83
--fix) opt_fix=1; shift ;;
84
84
--verbose) opt_verbose=1; shift ;;
85
- analyze|test|build_runner|drift|pigeon|icons|android|shellcheck)
85
+ analyze|test|build_runner|l10n| drift|pigeon|icons|android|shellcheck)
86
86
opt_suites+=(" $1 " ); shift ;;
87
87
* ) usage;;
88
88
esac
@@ -277,6 +277,23 @@ run_build_runner() {
277
277
check_no_changes " updates to *.g.dart files" ' *.g.dart'
278
278
}
279
279
280
+ run_l10n () {
281
+ local output_pathspec=lib/generated/l10n/zulip_localizations' *' .dart
282
+
283
+ # Omitted from this check:
284
+ # pubspec.{yaml,lock} tools/check
285
+ files_check l10n.yaml assets/l10n/ " ${output_pathspec} " \
286
+ || return 0
287
+
288
+ check_no_uncommitted_or_untracked " ${output_pathspec} " \
289
+ || return
290
+
291
+ flutter gen-l10n > /dev/null \
292
+ || return
293
+
294
+ check_no_changes " updates to l10n" " ${output_pathspec} "
295
+ }
296
+
280
297
run_drift () {
281
298
local schema_dir=test/model/schemas/
282
299
@@ -444,6 +461,7 @@ for suite in "${opt_suites[@]}"; do
444
461
analyze) run_analyze ;;
445
462
test) run_test ;;
446
463
build_runner) run_build_runner ;;
464
+ l10n) run_l10n ;;
447
465
drift) run_drift ;;
448
466
pigeon) run_pigeon ;;
449
467
icons) run_icons ;;
0 commit comments