add shell script to normalize all locale files

This commit is contained in:
Moriz Wahl 2024-03-05 16:58:10 +01:00
parent 6161ae2853
commit ced060a295

View File

@ -0,0 +1,19 @@
#! /usr/bin/env bash
ROOT_DIR=$(dirname "$0")/../..
tmp=$(mktemp)
locale_list=("es.json" "fr.json" "it.json" "nl.json" "pl.json" "pt.json" "ru.json")
for locale_file in "${locale_list[@]}"
do
jq -n \
-f $(dirname "$0")/normalize-locales.jq \
--argfile source $ROOT_DIR/webapp/locales/en.json \
--argfile target $ROOT_DIR/webapp/locales/$locale_file \
> "$tmp"
mv "$tmp" $ROOT_DIR/webapp/locales/$locale_file
done
exit 0