2023-03-02 16:20:47 +03:00
|
|
|
name: Check strings
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
strings:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2023-06-21 10:51:01 +03:00
|
|
|
FLUTTER: '3.10.5'
|
2023-03-02 16:20:47 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Ensure main locale is correct
|
|
|
|
run: python check_strings.py lib/l10n/app_en.arb
|
|
|
|
|
|
|
|
- name: Check remaining locales
|
|
|
|
run: |
|
2023-03-02 16:25:10 +03:00
|
|
|
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"
|
2023-03-02 16:20:47 +03:00
|
|
|
|
|
|
|
- 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
|