[geany/geany-osx] ce4ac6: Don't strip the LANG env variable and add encoding to it

Jiří Techet git-noreply at xxxxx
Thu Feb 1 13:40:14 UTC 2018


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Thu, 01 Feb 2018 13:40:14 UTC
Commit:      ce4ac6e76aaba19d79c4412071f2f93f16a8ffcb
             https://github.com/geany/geany-osx/commit/ce4ac6e76aaba19d79c4412071f2f93f16a8ffcb

Log Message:
-----------
Don't strip the LANG env variable and add encoding to it

The LANG variable is visible inside VTE and without this patch
we get values like

LANG=cs

instead of

LANG=cs_CZ.UTF-8

which may cause problems in scripts executed from VTE.


Modified Paths:
--------------
    launcher-gtk2.sh
    launcher-gtk3.sh

Modified: launcher-gtk2.sh
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -87,7 +87,7 @@ if test "$APPLELANGUAGES"; then
 	fi
 	#OK, now test for just the first two letters:
         if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then
-	    export LANG=${L:0:2}
+	    export LANG=$L
 	    break
 	fi
 	#Same thing, but checking for any english variant.
@@ -99,6 +99,10 @@ if test "$APPLELANGUAGES"; then
 fi
 unset APPLELANGUAGES L
 
+if test -n ${LANG}; then
+    export LANG="${LANG}.UTF-8"
+fi
+
 # If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists.
 APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
 if test -z ${LANG} -a -n $APPLECOLLATION; then


Modified: launcher-gtk3.sh
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -87,7 +87,7 @@ if test "$APPLELANGUAGES"; then
 	fi
 	#OK, now test for just the first two letters:
         if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then
-	    export LANG=${L:0:2}
+	    export LANG=$L
 	    break
 	fi
 	#Same thing, but checking for any english variant.
@@ -99,6 +99,10 @@ if test "$APPLELANGUAGES"; then
 fi
 unset APPLELANGUAGES L
 
+if test -n ${LANG}; then
+    export LANG="${LANG}.UTF-8"
+fi
+
 # If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists.
 APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
 if test -z ${LANG} -a -n $APPLECOLLATION; then



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list