Skip to content

Commit d03ec1e

Browse files
check: Add suite l10n
1 parent c6a2960 commit d03ec1e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tools/check

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ this_dir=${BASH_SOURCE[0]%/*}
2626

2727
default_suites=(
2828
analyze test
29-
build_runner drift pigeon icons
29+
build_runner l10n 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|build_runner|l10n|drift|pigeon|icons|android|shellcheck)
8686
opt_suites+=("$1"); shift;;
8787
*) usage;;
8888
esac
@@ -277,6 +277,23 @@ run_build_runner() {
277277
check_no_changes "updates to *.g.dart files" '*.g.dart'
278278
}
279279

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+
280297
run_drift() {
281298
local schema_dir=test/model/schemas/
282299

@@ -444,6 +461,7 @@ for suite in "${opt_suites[@]}"; do
444461
analyze) run_analyze ;;
445462
test) run_test ;;
446463
build_runner) run_build_runner ;;
464+
l10n) run_l10n ;;
447465
drift) run_drift ;;
448466
pigeon) run_pigeon ;;
449467
icons) run_icons ;;

0 commit comments

Comments
 (0)