[debian-edu-commits] [Git][debian-edu/debian-edu-config][rclobus/1149230] Support 'locales-all' (Closes: #1149230)

Roland Clobus (@rclobus) gitlab at salsa.debian.org
Thu Oct 29 12:30:22 GMT 2026



Roland Clobus pushed to branch rclobus/1149230 at Debian Edu / debian-edu-config


Commits:
71f2a5b8 by Roland Clobus at 2026-10-29T13:29:50+01:00
Support 'locales-all' (Closes: #1149230)

Instead of installing every single language pack, only install the
languages that are explicitly enabled if locales-all is used

- - - - -


3 changed files:

- share/debian-edu-config/testsuite-lib.sh
- share/debian-edu-config/tools/improve-desktop-l10n
- share/debian-edu-config/tools/install-task-pkgs


Changes:

=====================================
share/debian-edu-config/testsuite-lib.sh
=====================================
@@ -44,3 +44,20 @@ check_file_perm() {
     fi
 
 }
+
+# Fill the variable 'langsfull' with language codes (e.g. en, en_GB)
+prepare_langsfull() {
+    if deb_installed locales-all ; then
+        langsfull=""
+        if ! [ -z $LANGUAGE ] ; then
+            # If the language priority has been defined, add those languages
+            langsfull="$(echo $LANGUAGE | tr ":" " ") "
+        fi
+        if [ -r /etc/locale.gen ] ; then
+            # The locales that have been explicitly enabled
+            langsfull="$langsfull$(grep -v "^#" /etc/locale.gen | grep UTF-8 | cut -d'.' -f1)"
+        fi
+    else
+        langsfull="$(locale -a|grep utf8|cut -d'.' -f1)"
+    fi
+}


=====================================
share/debian-edu-config/tools/improve-desktop-l10n
=====================================
@@ -9,7 +9,7 @@ set -e
 
 . /usr/share/debian-edu-config/testsuite-lib.sh
 
-langsfull="$(locale -a|grep utf8|cut -d'.' -f1)"
+prepare_langsfull
 for lang in $langsfull ; do
     baselang="${lang%_*}"
     langcountry="$(echo ${lang%.*}|cut -d'_' -f2 | tr '[:upper:]' '[:lower:]')"


=====================================
share/debian-edu-config/tools/install-task-pkgs
=====================================
@@ -31,7 +31,7 @@ install_pkg123() {
 	fi
 }
 
-langsfull="$(locale -a | grep utf8 | cut -d'.' -f1)"
+prepare_langsfull
 for lang in $langsfull ; do
 	baselang="${lang%_*}"
 	# <lang>, <lang>-desktop, <lang>-kde-desktop and <lang>-gnome-desktop tasks; rather weird



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/71f2a5b878b6611f06ae5b304a8def88906b8b0a

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/71f2a5b878b6611f06ae5b304a8def88906b8b0a
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20261029/2e4a31cc/attachment-0001.htm>


More information about the debian-edu-commits mailing list