mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
655 B
24 lines
655 B
5 years ago
|
#!/bin/sh
|
||
|
|
||
|
mv ./options/locale/locale_en-US.ini ./options/
|
||
5 years ago
|
|
||
|
# Make sure to only change lines that have the translation enclosed between quotes
|
||
5 years ago
|
sed -i -r -e '/^[a-zA-Z0-9_.-]+[ ]*=[ ]*".*"$/ {
|
||
|
s/^([a-zA-Z0-9_.-]+)[ ]*="/\1=/
|
||
5 years ago
|
s/\\"/"/g
|
||
|
s/"$//
|
||
|
}' ./options/locale/*.ini
|
||
5 years ago
|
|
||
|
# Remove translation under 25% of en_us
|
||
|
baselines=`wc -l "./options/locale_en-US.ini" | cut -d" " -f1`
|
||
|
baselines=$((baselines / 4))
|
||
|
for filename in ./options/locale/*.ini; do
|
||
|
lines=`wc -l "$filename" | cut -d" " -f1`
|
||
|
if [ $lines -lt $baselines ]; then
|
||
|
echo "Removing $filename: $lines/$baselines"
|
||
|
rm "$filename"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
mv ./options/locale_en-US.ini ./options/locale/
|