mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
18 lines
504 B
Bash
Executable File
18 lines
504 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ROOT_DIR=$(dirname "$0")/..
|
|
|
|
sorting="jq -f $ROOT_DIR/scripts/sort_filter.jq"
|
|
english="$sorting $ROOT_DIR/src/locales/en.json"
|
|
german="$sorting $ROOT_DIR/src/locales/de.json"
|
|
listPaths="jq -c 'path(..)|[.[]|tostring]|join(\".\")'"
|
|
diffString="<( $english | $listPaths ) <( $german | $listPaths )"
|
|
if eval "diff -q $diffString";
|
|
then
|
|
: # all good
|
|
else
|
|
eval "diff -y $diffString | grep '[|<>]'";
|
|
printf "\nEnglish and German translation keys do not match, see diff above.\n"
|
|
exit 1
|
|
fi
|