1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 07:10:01 +02:00
zen-desktop/scripts/copy-language-pack.sh
Cristian Cezar Moisés 8c129ab512
Update copy-language-pack.sh
Signed-off-by: Cristian Cezar Moisés <ethicalhacker@riseup.net>
2025-01-03 22:58:18 +00:00

26 lines
659 B
Bash

browser_locales=engine/browser/locales
copy_browser_locales() {
langId=$1
mkdir -p "$browser_locales/$langId"
if [ "$langId" = "en-US" ]; then
find "$browser_locales/$langId" -type f -name "zen*" -delete
rsync -av --exclude=.git ./l10n/en-US/browser/ "$browser_locales/$langId/"
return
fi
rm -rf "$browser_locales/$langId/"
# TODO: Copy the rest of the l10n directories to their respective locations
rsync -av --exclude=.git "./l10n/$langId/" "$browser_locales/$langId/"
}
if [ -z "$1" ]; then
echo "Error: No language specified."
exit 1
fi
LANG=$1
echo "Copying language pack for $LANG"
copy_browser_locales "$LANG"