forked from brianegan/flutter_architecture_samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
19 lines (14 loc) · 597 Bytes
/
Makefile
File metadata and controls
19 lines (14 loc) · 597 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.PHONY: clean localize all check_env
FILES := $(shell find . -name '*.arb' | xargs)
all: localize
localize: check_env clean
flutter pub pub run intl_translation:extract_to_arb --output-dir=./ --no-transformer lib/src/localization.dart
mv intl_messages.arb intl_en.arb
flutter pub pub run intl_translation:generate_from_arb --no-use-deferred-loading lib/src/localization.dart $(FILES)
mv messages*.dart lib/src/localizations
clean:
rm -f *.arb
check_env:
ifndef FLUTTER_ROOT
$(error FLUTTER_ROOT is undefined. Please export a FLUTTER_ROOT pointing to the installation of Flutter.)
endif