Fix translation files and CallPending page
Remove i18next-parser from pre-push script because it was not
working properly.
Fix some translation entries.
Make some ALL_CAPS entries Sentence case.
GitLab: #149
Change-Id: I9d80933eefade3f04d9a81aa07bbb1b7a4503fe3
diff --git a/.hooks/pre-push b/.hooks/pre-push
index 5b46213..99fc09b 100755
--- a/.hooks/pre-push
+++ b/.hooks/pre-push
@@ -2,21 +2,28 @@
confirm () {
if ! eval "$@" ; then
- printf "Found some problems. Do you still want to push? [y/N] "
+ printf "Found some problems in the code. Do you still want to push? [y/N] "
read -r REPLY
if [ "$REPLY" = "${REPLY#[Yy]}" ]
then
echo "Cancelling push..."
exit 1
+ else
+ return 1
fi
else
echo "OK!"
fi
}
-echo "Checking for i18next warnings..."
-confirm "npm run extract-translations -w client -- --fail-on-warnings --fail-on-update"
-
-echo "Checking for eslint warnings..."
+echo "Checking for EsLint errors and warnings..."
confirm "npm run lint --workspaces -- --max-warnings 0"
+
+if [ $? -eq 1 ]; then
+ echo "Checking for EsLint errors..."
+ npm run lint --workspaces -- --quiet
+fi
+
+echo "Checking for Prettier problems..."
+confirm "npm run format:check --workspaces"