fix(gnome-extensions): Languages not installed in some extensions

Logic for locale wasn't perfect, noticeable with "Bluetooth Battery Meter" extension, where languages weren't installed, but were available.

This fixes it.
This commit is contained in:
fiftydinar 2025-04-27 09:58:09 +02:00 committed by GitHub
parent 734656f7cc
commit 7e164fcc21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,8 +116,8 @@ if [[ ${#INSTALL[@]} -gt 0 ]]; then
# Some of them might not have any locale at the moment
# So that's why I made a check for directory
# I made an additional check if language files are available, in case if extension is packaged with an empty folder, like with Default Workspace extension
if [[ -d "${TMP_DIR}/locale" ]]; then
if find "${TMP_DIR}/locale/" -type f -name "*.mo" | grep -q .; then
if [[ -d "${TMP_DIR}/locale/" ]]; then
if find "${TMP_DIR}/locale/" -type f -name "*.mo" -print -quit | read; then
echo "Installing language extension files"
install -d -m 0755 "/usr/share/locale/"
cp -r "${TMP_DIR}/locale"/* "/usr/share/locale/"
@ -225,8 +225,8 @@ if [[ ${#INSTALL[@]} -gt 0 ]] && ! "${LEGACY}"; then
# Some of them might not have any locale at the moment
# So that's why I made a check for directory
# I made an additional check if language files are available, in case if extension is packaged with an empty folder, like with Default Workspace extension
if [[ -d "${TMP_DIR}/locale" ]]; then
if find "${TMP_DIR}/locale/" -type f -name "*.mo" | grep -q .; then
if [[ -d "${TMP_DIR}/locale/" ]]; then
if find "${TMP_DIR}/locale/" -type f -name "*.mo" -print -quit | read; then
echo "Installing language extension files"
install -d -m 0755 "/usr/share/locale/"
cp -r "${TMP_DIR}/locale"/* "/usr/share/locale/"