1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-03 22:17:08 +02:00

Merge pull request #497 from GilbN/develop

1.13.9
This commit is contained in:
GilbN 2023-06-04 11:37:30 +02:00 committed by GitHub
commit 77d85cae3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 12 deletions

View File

@ -98,8 +98,8 @@ sed_file(){
}
clean_file() {
perl -i -pe 's/QBT_TR?\(//' "$1"
perl -i -pe 's/\)QBT_TR\[CONTEXT=.*?\]//' "$1"
perl -i -pe 's/QBT_TR?\(//g' "$1"
perl -i -pe 's/\)QBT_TR\[CONTEXT=.*?\]//g' "$1"
}
if ! grep -q "${TP_DOMAIN}/css/base" /themepark/public/index.html; then
@ -117,10 +117,9 @@ if ! grep -q "${TP_DOMAIN}/css/base" /themepark/public/index.html; then
fi
# Clean all files
printf 'Cleaning files in /themepark for any translation text...\n\n
--------------------------------------------------------------------------
| !!! RESTART THE CONTAINER IF THIS IS THE FIRST TIME CLEANING FILES !!! |
--------------------------------------------------------------------------\n\n'
echo '------------------------------------------------------------'
echo '| Cleaning files in /themepark for any translation text... |'
echo '------------------------------------------------------------'
find /themepark -type f \( ! -iname "*.svg" \) | while read fname
do
clean_file $fname

View File

@ -83,8 +83,8 @@ sed_file(){
}
clean_file() {
perl -i -pe 's/QBT_TR?\(//' "$1"
perl -i -pe 's/\)QBT_TR\[CONTEXT=.*?\]//' "$1"
perl -i -pe 's/QBT_TR?\(//g' "$1"
perl -i -pe 's/\)QBT_TR\[CONTEXT=.*?\]//g' "$1"
}
if ! grep -q "${TP_DOMAIN}/css/base" /themepark/public/index.html; then
@ -102,10 +102,9 @@ if ! grep -q "${TP_DOMAIN}/css/base" /themepark/public/index.html; then
fi
# Clean all files
printf 'Cleaning files in /themepark for any translation text...\n\n
--------------------------------------------------------------------------
| !!! RESTART THE CONTAINER IF THIS IS THE FIRST TIME CLEANING FILES !!! |
--------------------------------------------------------------------------\n\n'
echo '------------------------------------------------------------'
echo '| Cleaning files in /themepark for any translation text... |'
echo '------------------------------------------------------------'
find /themepark -type f \( ! -iname "*.svg" \) | while read fname
do
clean_file $fname