mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 23:42:41 +01:00
e7b47c5215
* align "make help" * format * untouch build/generate-svg.js * untouch .eslintrc * combine editorconfig's * rm editorconfig Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
23 lines
657 B
Bash
Executable file
23 lines
657 B
Bash
Executable file
#!/bin/sh
|
|
|
|
mv ./options/locale/locale_en-US.ini ./options/
|
|
|
|
# Make sure to only change lines that have the translation enclosed between quotes
|
|
sed -i -r -e '/^[a-zA-Z0-9_.-]+[ ]*=[ ]*".*"$/ {
|
|
s/^([a-zA-Z0-9_.-]+)[ ]*="/\1=/
|
|
s/\\"/"/g
|
|
s/"$//
|
|
}' ./options/locale/*.ini
|
|
|
|
# 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/
|