]> Untitled Git - lemmy-ui.git/blob - update_translations.sh
fix submodule error
[lemmy-ui.git] / update_translations.sh
1 #!/bin/bash
2 set -e
3
4 pushd ../lemmy-translations
5 git fetch weblate
6 git merge weblate/main
7 git push
8 popd
9
10 # look for unused translations
11 for langfile in lemmy-translations/translations/*.json; do
12     lang=$(basename $langfile .json)
13     if ! grep -q "\"./translations/$lang\"" src/shared/i18next.ts; then
14       echo "Unused language $lang"
15     fi
16 done
17
18 git submodule update --remote
19 git add lemmy-translations
20 git commit -m"Updating translations."
21 git push