[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 4 commits: Add components for a more flexible and improved desktop localization.

WolfgangSchweer gitlab at salsa.debian.org
Wed Dec 19 21:49:59 GMT 2018


WolfgangSchweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
7e53feae by Wolfgang Schweer at 2018-12-19T21:45:08Z
Add components for a more flexible and improved desktop localization.

share/debian-edu-config/lightdm-gtk-greeter.conf:
Enable language chooser in the lightdm panel.

etc/X11/Xsession.d/55lightdm_gtk-greeter-rc:
Create environment variables, needed to let the chosen language take effect
everywhere.

share/debian-edu-config/tools/improve-desktop-l10n:
Evaluate configured locales and install related localization packages.

- - - - -
474496be by Wolfgang Schweer at 2018-12-19T21:46:44Z
 Add class definition to cf3/edu.cf to be able to conditionally configure
 the lightdm-gtk-greeter.

- - - - -
14b6bd26 by Wolfgang Schweer at 2018-12-19T21:48:10Z
Adjust Makefile and cf3/finalize to reflect the changes.

- - - - -
4599bc6b by Wolfgang Schweer at 2018-12-19T21:49:04Z
Add changelog entries for last commits.

- - - - -


7 changed files:

- Makefile
- cf3/cf.finalize
- cf3/edu.cf
- debian/changelog
- + etc/X11/Xsession.d/55lightdm_gtk-greeter-rc
- + share/debian-edu-config/lightdm-gtk-greeter.conf
- + share/debian-edu-config/tools/improve-desktop-l10n


Changes:

=====================================
Makefile
=====================================
@@ -78,6 +78,7 @@ SYSCONFFILES = \
 	X11/Xsession.d/06debian-edu-firefox-ltsp \
 	X11/Xsession.d/09debian-edu-missing-home \
 	X11/Xsession.d/10debian-edu-one-login-per-host \
+	X11/Xsession.d/55lightdm_gtk-greeter-rc \
 	debian-edu/nightkill.conf \
 	debian-edu/pxeinstall.conf \
 	default/munin-node \
@@ -341,6 +342,7 @@ install: install-testsuite
 		share/debian-edu-config/tools/edu-ldap-from-scratch \
 		share/debian-edu-config/tools/create-user-nssdb \
 		share/debian-edu-config/tools/copy-host-keytab \
+		share/debian-edu-config/tools/improve-desktop-l10n \
 		share/debian-edu-config/ltspfs-mounter-kde \
 		share/debian-edu-config/squid.resolvconf \
 		share/ltsp/get-ldap-ltsp-config \
@@ -388,6 +390,7 @@ install: install-testsuite
 		share/debian-edu-config/udisks2.patch \
 		share/debian-edu-config/edu-xfce4-panel.xml \
 		share/debian-edu-config/55xfce4-session-debian-edu \
+		share/debian-edu-config/lightdm-gtk-greeter.conf \
 		share/pam-configs/edu-group \
 		share/pam-configs/edu-umask \
 		share/perl5/Debian/Edu.pm \


=====================================
cf3/cf.finalize
=====================================
@@ -4,6 +4,16 @@ bundle agent finalize
 # Moved from other bundles to this last one in the sequence to get the right
 # execution order.
 
+files:
+
+  # Add the language chooser to the lightdm-greeter panel.
+
+  debian.lightdm.installation::
+
+    "/usr/share/lightdm/lightdm-gtk-greeter.conf.d/02debian-edu.conf"
+    link_from => ln_s("/usr/share/debian-edu-config/lightdm-gtk-greeter.conf"),
+    move_obstructions => "true";
+
 commands:
 
   debian.server.installation::
@@ -17,6 +27,14 @@ commands:
     "/usr/sbin/exim4 -qff"
       contain => in_shell;
 
+  # Enable localization for desktop applications like The GIMP and Thunderbird.
+  # Also, the language/country related debian-edu-doc package is installed.
+
+  debian.(desktopintern|standalone).installation::
+
+    "/usr/share/debian-edu-config/tools/improve-desktop-l10n"
+      contain => in_shell;
+
   # Update /etc/environment and APT configuration using wpad.dat file.
   # Do it late to make sure scripts like debian-edu-pxeinstall do not get
   # the wrong proxy setting when installing a main-server and the webcache


=====================================
cf3/edu.cf
=====================================
@@ -39,4 +39,6 @@ bundle common edu
     "xfce"           expression => isdir("/etc/xdg/xfce4");
     # Set if lxqt is installed; used to conditionally configure settings.
     "lxqt"           expression => isdir("/usr/share/pcmanfm-qt/lxqt");
+   # Set if lightdm-gtk-greeter is installed; used to conditionally configure the panel.
+    "lightdm"        expression => isdir("/usr/share/lightdm/lightdm-gtk-greeter.conf.d/");
 }


=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+debian-edu-config (2.10.51) UNRELEASED; urgency=medium
+
+  * Add components for a more flexible and improved desktop localization.
+    - share/debian-edu-config/lightdm-gtk-greeter.conf:
+      + Enable language chooser in the lightdm panel.
+    - etc/X11/Xsession.d/55lightdm_gtk-greeter-rc:
+      + Create environment variables, needed to let the chosen language take
+        effect everywhere.
+    - share/debian-edu-config/tools/improve-desktop-l10n:
+      + Evaluate configured locales and install related localization packages.
+  * Add class definition to cf3/edu.cf to be able to conditionally configure
+    the lightdm-gtk-greeter.
+  * Adjust Makefile and cf3/finalize to reflect the changes.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 18 Dec 2018 12:26:15 +0100
+
 debian-edu-config (2.10.50) unstable; urgency=medium
 
   [ Mike Gabriel ]


=====================================
etc/X11/Xsession.d/55lightdm_gtk-greeter-rc
=====================================
@@ -0,0 +1,22 @@
+# Fix environment / locale variables in case language chooser is enabled in the lightdm panel.
+
+if [ -L /usr/share/lightdm/lightdm-gtk-greeter.conf.d/02debian-edu.conf ] && \
+    [ -e /run/lightdm.pid ] && [ -f $HOME/.dmrc ]; then
+    if cat $HOME/.dmrc | grep Language ; then
+	export LANGUAGE="$(cat $HOME/.dmrc | grep Language | cut -d'=' -f2 | sed -e 's/utf8/UTF-8/')"
+	DEFAULT_LOCALE="$(locale | head -1 | cut -d'=' -f2)"
+	export LC_CTYPE=$LANGUAGE
+	export LC_NUMERIC=$DEFAULT_LOCALE
+	export LC_TIME=$DEFAULT_LOCALE
+	export LC_COLLATE=$DEFAULT_LOCALE
+	export LC_MONETARY=$DEFAULT_LOCALE
+	export LC_MESSAGES=$LANGUAGE
+	export LC_PAPER=$DEFAULT_LOCALE
+	export LC_NAME=$DEFAULT_LOCALE
+	export LC_ADDRESS=$DEFAULT_LOCALE
+	export LC_TELEPHONE=$DEFAULT_LOCALE
+	export LC_MEASUREMENT=$DEFAULT_LOCALE
+	export LC_IDENTIFICATION=$LANGUAGE
+    fi
+fi
+#


=====================================
share/debian-edu-config/lightdm-gtk-greeter.conf
=====================================
@@ -0,0 +1,5 @@
+# Debian Edu specific defaults
+# (add language chooser)
+
+[greeter]
+indicators = ~host;~spacer;~clock;~language;~session;~a11y;~power


=====================================
share/debian-edu-config/tools/improve-desktop-l10n
=====================================
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# firefox-esr, libreoffice and KDE are already localized; do it for some more
+# packages that are installed by default (all supported desktop environments).
+#
+# schweer, 2018-12-15.
+
+set -e
+langsfull="$(locale -a|grep utf8|cut -d'.' -f1)"
+for lang in $(echo $langsfull) ; do
+    baselang="${lang%_*}"
+    langcountry="$(echo ${lang%.*}|cut -d'_' -f2 | tr '[:upper:]' '[:lower:]')"
+    for i in debian-edu-doc gimp-help thunderbird-l10n; do
+        if ! [ -z "$(apt-cache search $i-$baselang-$langcountry)" ]; then
+            apt-get -yq install $i-$baselang-$langcountry
+        else
+            if ! [ -z "$(apt-cache search $i-$baselang)" ]; then
+                apt-get -y install $i-$baselang
+        fi
+        fi
+    done
+    # special cases nn_NO and nb_NO (debian-edu-doc and gimp-help).
+    if [ "nn" = "$baselang" ] && [ "no" = "$langcountry" ] && \
+        ! [ -z "$(apt-cache search debian-edu-doc-nb)" ] ; then
+            apt-get -yq install debian-edu-doc-nb
+    fi
+    if [ "nb" = "$baselang" ] && [ "no" = "$langcountry" ] && \
+        ! [ -z "$(apt-cache search gimp-help-nn)" ] ; then
+            apt-get -yq install gimp-help-nn
+    fi
+done
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/compare/7f98f24623cbe0bbfe595b746059c67a2b1ae499...4599bc6b8193f436a9bb7b73708e079bdef669b8

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/compare/7f98f24623cbe0bbfe595b746059c67a2b1ae499...4599bc6b8193f436a9bb7b73708e079bdef669b8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20181219/efde03b8/attachment-0001.html>


More information about the debian-edu-commits mailing list