]> Untitled Git - lemmy-ui.git/blobdiff - update_translations.sh
Add show/hide button to password fields (#1861)
[lemmy-ui.git] / update_translations.sh
index 99fb6479d12f5a821b9efc043c6117c12970b068..677eee96a7c95ccdcb9b18ff4967215bb0c74042 100755 (executable)
@@ -1,8 +1,21 @@
 #!/bin/bash
+set -e
+
 pushd ../lemmy-translations
 git fetch weblate
 git merge weblate/main
+git push
 popd
+
+# 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
+
 git submodule update --remote
 git add lemmy-translations
 git commit -m"Updating translations."
+git push