mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
add colors to 'not sorted' messages and hint to --fix feature
This commit is contained in:
parent
066506838f
commit
5f9b275e55
@ -3,6 +3,12 @@
|
|||||||
ROOT_DIR=$(dirname "$0")/../..
|
ROOT_DIR=$(dirname "$0")/../..
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp)
|
||||||
exit_code=0
|
exit_code=0
|
||||||
|
errors=0
|
||||||
|
|
||||||
|
TEXT_RED="\e[31m"
|
||||||
|
TEXT_BLUE="\e[34m"
|
||||||
|
TEXT_RESET="\e[0m"
|
||||||
|
TEXT_BOLD="\e[1m"
|
||||||
|
|
||||||
for locale_file in $ROOT_DIR/webapp/locales/*.json
|
for locale_file in $ROOT_DIR/webapp/locales/*.json
|
||||||
do
|
do
|
||||||
@ -16,9 +22,13 @@ do
|
|||||||
: # all good
|
: # all good
|
||||||
else
|
else
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
echo "$(basename -- $locale_file) is not sorted by keys"
|
echo -e "${TEXT_BOLD}${TEXT_RED}>>> $(basename -- $locale_file) is not sorted by keys <<<${TEXT_RESET}"
|
||||||
|
errors=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ "$errors" = 1 ] && echo -e "${TEXT_BOLD}${TEXT_BLUE}Please run $0 --fix to sort your locale definitions!${TEXT_RESET}";
|
||||||
|
|
||||||
|
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user