Ticket #1715: 1715.patch

File 1715.patch, 799 bytes (added by sascha_silbe, 13 years ago)

Don't overwrite LANG / LANGUAGE if already set

  • bin/sugar.in

    From: Sascha Silbe <sascha-pgp@silbe.org>
    Subject: [PATCH] don't override global locale setting (#1715)
    
    Don't overwrite LANG / LANGUAGE if already set.
    
    Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
    
    ---
     bin/sugar.in |    6 +++---
     1 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/bin/sugar.in b/bin/sugar.in
    index 498b573..d8ff197 100644
    a b if ! test -f "$GTK2_RC_FILES"; then 
    5050    exit 1
    5151fi
    5252
    53 # Set default language
    54 export LANG="en_US.utf8"
    55 export LANGUAGE="en_US.utf8"
     53# Set language to english if unset
     54export LANG="${LANG:-en_US.utf8}"
     55export LANGUAGE="${LANGUAGE:-${LANG}}"
    5656
    5757# Source language settings and debug definitions
    5858if [ -f ~/.i18n ]; then