mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
add shell script to normalize all locale files
This commit is contained in:
parent
6161ae2853
commit
ced060a295
19
scripts/translations/normalize.sh
Executable file
19
scripts/translations/normalize.sh
Executable 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user