geany / geany-osx

Things needed to bundle Geany for OSX
Other
24 stars 14 forks source link

Check AppleLocale before AppleLanguages when setting LANG #9

Closed techee closed 5 years ago

techee commented 6 years ago

AppleLanguages differs based on OS X version - newer versions return values like cs_CZ, older OS X versions return only cs. This leads to problems in scripts executed in VTE. It seems that AppleLocale always returns the complete value so test it first when setting LANG to mitigate this problem.

In addition, move adding the suffix "UTF-8" to the very end of the script because some parts of the script depend on the value without this suffix.

techee commented 6 years ago

@b4n I've decided to go simple and basically removed all the code in the launcher script that guesses the right language settings. We can use what defaults read .GlobalPreferences AppleLocale gives us directly and the result will be better and less surprising than what the script does now.