mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 20:53:39 -05:00
d0dedd5ef2
[web] split check of extracted-translations from linting of locales GitOrigin-RevId: bfd5953673ed58e4e7d384129535f4a452cc1041
24 lines
497 B
Bash
Executable file
24 lines
497 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Ensure all locales used in the frontend are tracked
|
|
OUTPUT=data/dumpFolder/i18next-scanner
|
|
trap "rm -rf $OUTPUT" EXIT
|
|
npx i18next-scanner --output "$OUTPUT"
|
|
ACTUAL=frontend/extracted-translations.json
|
|
EXPECTED="$OUTPUT/frontend/extracted-translations.json"
|
|
if ! diff "$ACTUAL" "$EXPECTED"; then
|
|
cat <<MSG >&2
|
|
|
|
services/web/frontend/extracted-translations.json is not up-to-date.
|
|
|
|
---
|
|
Try running:
|
|
|
|
internal$ bin/run web npm run extract-translations
|
|
|
|
---
|
|
MSG
|
|
exit 1
|
|
fi
|