lemmy-ui/update_translations.sh

22 lines
471 B
Bash
Raw Normal View History

2020-11-10 21:53:09 +00:00
#!/bin/bash
2021-04-21 11:57:42 +00:00
set -e
pushd ../lemmy-translations
2020-11-10 21:53:09 +00:00
git fetch weblate
git merge weblate/main
2020-11-25 20:28:45 +00:00
git push
2021-04-21 11:57:42 +00:00
popd
# look for unused translations
for langfile in lemmy-translations/translations/*.json; do
lang=$(basename $langfile .json)
if ! grep -q "\"./translations/$lang\"" src/shared/services/I18NextService.ts; then
echo "Unused language $lang"
fi
done
2020-11-10 21:53:09 +00:00
git submodule update --remote
git add lemmy-translations
git commit -m"Updating translations."
2020-11-25 20:28:45 +00:00
git push