lemmy-ui/update_translations.sh

20 lines
463 B
Bash
Raw Normal View History

2020-11-10 21:53:09 +00:00
#!/bin/bash
pushd ../lemmy-translations || exit
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
popd || exit
# look for unused translations
for langfile in lemmy-translations/translations/*.json; do
lang=$(basename $langfile .json)
if ! grep -q "\"./translations/$lang\"" src/shared/i18next.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