mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 16:47:30 +00:00
Fix crowdin update script (#9969)
* Fix crowdin update script * Refine the script to be specific about what it should change Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
9d5756989a
commit
a47cfdf346
9
scripts/update-locales.sh
vendored
9
scripts/update-locales.sh
vendored
|
@ -1,8 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mv ./options/locale/locale_en-US.ini ./options/
|
mv ./options/locale/locale_en-US.ini ./options/
|
||||||
sed -i -e 's/=\"/=/g' -e 's/\"$$//g' ./options/locale/*.ini
|
|
||||||
sed -i -e 's/\\\\\\\\\"/\"/g' ./options/locale/*.ini
|
# 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
|
# Remove translation under 25% of en_us
|
||||||
baselines=`wc -l "./options/locale_en-US.ini" | cut -d" " -f1`
|
baselines=`wc -l "./options/locale_en-US.ini" | cut -d" " -f1`
|
||||||
|
|
Loading…
Reference in a new issue