@b4n commented on this pull request.


In launcher-gtk2.sh:

> @@ -66,41 +66,49 @@ I18NDIR="$bundle_data/locale"
 # Set the locale-related variables appropriately:
 unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
 
+# Start by attempting to find the Locale preference.
+APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
+if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
+    if test -z $LANG; then 

how could LANG be non-empty as you has unset it above? And if it's meaningful, shouldn't this be done in both cases?


In launcher-gtk2.sh:

> @@ -66,41 +66,49 @@ I18NDIR="$bundle_data/locale"
 # Set the locale-related variables appropriately:
 unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
 
+# Start by attempting to find the Locale preference.
+APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
+if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
+    if test -z $LANG; then 
+        export LANG="${APPLELOCALE:0:5}"
+    fi
+elif test -f "$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo"; then
+    export LANG="${APPLELOCALE:0:5}"

Might be worth a comment that you mean to keep the territory part yet only check for the language.


In launcher-gtk3.sh:

> @@ -66,41 +66,49 @@ I18NDIR="$bundle_data/locale"
 # Set the locale-related variables appropriately:
 unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
 
+# Start by attempting to find the Locale preference.
+APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
+if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
+    if test -z $LANG; then 

same


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.