1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 21:49:58 +02:00

chore: Update l10n submodule commit

This commit is contained in:
Mauro Balades 2024-08-24 02:28:42 +02:00
parent d9c3973b9d
commit e7103f1d87
3 changed files with 25 additions and 5 deletions

View file

@ -18,7 +18,7 @@ cd $CURRENT_DIR
update_language() {
langId=$1
cd l10n
cd ./l10n
cd $langId
echo "Updating $langId"
@ -38,7 +38,30 @@ for lang in $(cat ./l10n/supported-languages); do
done
cd $CURRENT_DIR
# Move all the files to the correct location
browser_locales=engine/browser/locales
copy_browser_locales() {
langId=$1
only_en=$2
mkdir -p $browser_locales/$langId
if [ "$only_en" = true ]; then
rsync -av --exclude=.git ./l10n/en-US/browser/ $browser_locales/$langId/
return
fi
rm -rf $browser_locales/$langId/
rsync -av --exclude=.git ./l10n/$langId/ $browser_locales/$langId/
}
copy_browser_locales en-US true
for lang in $(cat ./l10n/supported-languages); do
copy_browser_locales $lang false
done
echo "Cleaning up"
rm -rf ~/tools
rm -rf ~/.git-cinnabar
for lang in $(cat ./l10n/supported-languages); do
# remove every file except if it starts with "zen"
find ./l10n/$lang -type f -not -name "zen*" -delete
done