-
Notifications
You must be signed in to change notification settings - Fork 140
36 lines (27 loc) · 1.04 KB
/
check-strings.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Check strings
on: [push, pull_request]
jobs:
strings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read variables from repo
run: cat .github/workflows/env >> $GITHUB_ENV
- name: Ensure main locale is correct
run: python check_strings.py lib/l10n/app_en.arb
- name: Check remaining locales
run: |
find lib/l10n/ -name "app_en.arb" -prune -o -name "*.arb" -print0 | xargs -r -n 1 -0 ./check_strings.py >> $GITHUB_STEP_SUMMARY || echo "::warning::Problems in locales"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.FLUTTER }}
- name: Check missing strings
run: |
flutter gen-l10n
if [[ "$(cat missing_l10n_strings.json)" != "{}" ]]; then
echo "::notice::Strings missing in translations"
echo "" >> $GITHUB_STEP_SUMMARY
echo "Missing strings:" >> $GITHUB_STEP_SUMMARY
cat missing_l10n_strings.json >> $GITHUB_STEP_SUMMARY
fi