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:
parent
734656f7cc
commit
7e164fcc21
1 changed files with 4 additions and 4 deletions
|
|
@ -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/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue