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
|
2021-04-21 11:55:17 +00:00
|
|
|
|
|
|
|
# look for unused translations
|
|
|
|
for langfile in lemmy-translations/translations/*.json; do
|
|
|
|
lang=$(basename $langfile .json)
|
2023-11-22 22:44:42 +00:00
|
|
|
if ! grep -q "\"./translations/$lang\"" src/shared/services/I18NextService.ts; then
|
2021-04-21 11:55:17 +00:00
|
|
|
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
|