Skip to content
22 changes: 22 additions & 0 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ jobs:
- name: Run snapshot tests
working-directory: frontend/viewer
run: task playwright-test-standalone
- name: Ensure all i18n strings have been extracted
working-directory: frontend/viewer
shell: bash
run: |
set -e
rm -f src/locales/en.po.old
cp src/locales/en.po src/locales/en.po.old
pnpm i18n:extract
DIFFCOUNT=$(diff -u src/locales/en.po{.old,} | grep '+msgid' | wc -l)
if [ $DIFFCOUNT -gt 0 ]; then
# Unextracted strings found, fail the build
echo '***'
echo $DIFFCOUNT unextracted strings found:
echo '***'
diff -u src/locales/en.po{.old,} | grep '+msgid' | cut -c2-
echo '***'
echo Please run "'"pnpm i18n:extract"'" and commit the new src/locales/en.po file
exit 1
fi

rm -f src/locales/en.po.old
exit 0

- name: Build viewer
working-directory: frontend/viewer
Expand Down
Loading