~ubuntu-branches/ubuntu/raring/gdm/raring

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu_i18n_oneiric.patch

  • Committer: Package Import Robot
  • Author(s): Gunnar Hjalmarsson
  • Date: 2012-01-31 17:45:20 UTC
  • Revision ID: package-import@ubuntu.com-20120131174520-5y15hrfu5v9e6orf
Tags: 3.0.4-0ubuntu15
* debian/patches/45_time_display_on_greeter.patch:
  - Adapt to forwarded version of the patch.
  - Let the LANG environment variable serve as fallback when
    determining the display language for the weekday, since LANG
    has been redefined in Ubuntu to represent language instead of
    regional formats. This change also ought to make the patch work
    as intended upstream.
* debian/gdm.upstart:
  - No need to export LC_MESSAGES since it's not set any longer.
* debian/patches/ubuntu_no_LANG_setting_in_Xsession.patch:
  - Renamed from "ubuntu_i18n_oneiric.patch".
  - No need to unset LC_MESSAGES etc. since they are not set any
    longer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Adapt to the Oneiric model for setting languages/locales.
2
 
Forwarded: not-needed
3
 
Author: Gunnar Hjalmarsson <ubuntu@gunnar.cc>
4
 
 
5
 
diff -Nur -x '*.orig' -x '*~' gdm-3.0.4//data/Xsession.in gdm-3.0.4.new//data/Xsession.in
6
 
--- gdm-3.0.4//data/Xsession.in 2011-08-09 14:58:58.000000000 +0200
7
 
+++ gdm-3.0.4.new//data/Xsession.in     2011-08-09 14:59:12.639636230 +0200
8
 
@@ -36,6 +36,24 @@
9
 
 test -f /etc/xprofile && . /etc/xprofile
10
 
 test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
11
 
 
12
 
+# unset certain LC_* variables if they equal LANG
13
 
+if [ $LANG != ${LANG%.utf8*} ]; then
14
 
+    x_lang=${LANG%.*}.UTF-8${LANG#*.utf8}
15
 
+else
16
 
+    x_lang=${LANG%.*}.utf8${LANG#*.UTF-8}
17
 
+fi
18
 
+env_var_unset() {
19
 
+    local name=$1
20
 
+    local val=$2
21
 
+    if [ -n "$val" ] && [ $val != $LANG -a $val != $x_lang ]; then
22
 
+        return
23
 
+    fi
24
 
+    unset $name
25
 
+}
26
 
+env_var_unset 'LC_MESSAGES' $LC_MESSAGES
27
 
+env_var_unset 'LC_CTYPE' $LC_CTYPE
28
 
+env_var_unset 'LC_COLLATE' $LC_COLLATE
29
 
+
30
 
 # Translation stuff
31
 
 if [ -x "@libexecdir@/gdmtranslate" ] ; then
32
 
   gdmtranslate="@libexecdir@/gdmtranslate"
33
 
@@ -153,13 +171,6 @@
34
 
 
35
 
 unset XKB_IN_USE
36
 
 
37
 
-# Overwrite $LANG from /etc/profile (and friends) with the one picked in the
38
 
-# greeter
39
 
-if [ -n "$GDM_LANG" ]; then
40
 
-  LANG="$GDM_LANG"
41
 
-  export LANG
42
 
-fi
43
 
-
44
 
 # run all system xinitrc shell scripts.
45
 
 if [ -d /etc/X11/xinit/xinitrc.d ]; then
46
 
     for i in /etc/X11/xinit/xinitrc.d/* ; do