-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix(mac): use same $LANG fallback mechanism as Vim #18294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dc26491 to
40f0c2d
Compare
In a locale "en_US", "en" is the language and "US" is the region. Before this change, we were too clever for our own good and tried to handle the region as well. But if the macOS primary language is set to "English" and the region to "Norway", we would end up with "en_NO", which is a locale that does not exist. Now we only take the language into account. Taking the example from above would yield "en_US", which is a sensible fallback. If the region is important to you, set $LANG and the more specific LC_* variables in your shell config or alternatively use `:help :language`. References neovim#18292
40f0c2d to
e038625
Compare
| ELOG("$LANG is empty and the macOS primary language cannot be inferred."); | ||
| } | ||
| CFRelease(cf_lang_region); | ||
| # ifdef HAVE_LOCALE_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deliberately left out the checks for HAVE_LOCALE_H and LC_NUMERIC, because I think it's not needed within __APPLE__.
|
Looks fine to me, and fixes the linked issue! @jamessan what do you think? |
|
James mentioned that he's on vacation right now, so we should give him a few days to respond. :) |
|
Yup, just wanted to let him know that I'll merge it only(!) when he's looked at it and given his thumbs-up. |
|
Successfully created backport PR #18351 for |
Problem: The release script bundles a system library (CoreServices) that was added in #18294, which leads to errors on M1 since the architecture is different from the Github runner. Solution: Skip CoreServices when bundling the libraries (as was done for the CoreFoundation library that #18294 replaced with CoreServices).
Problem: The release script bundles a system library (CoreServices) that was added in #18294, which leads to errors on M1 since the architecture is different from the Github runner. Solution: Skip CoreServices when bundling the libraries (as was done for the CoreFoundation library that #18294 replaced with CoreServices).
Problem: The release script bundles a system library (CoreServices) that was added in neovim#18294, which leads to errors on M1 since the architecture is different from the Github runner. Solution: Skip CoreServices when bundling the libraries (as was done for the CoreFoundation library that neovim#18294 replaced with CoreServices).
Problem: The release script bundles a system library (CoreServices) that was added in neovim#18294, which leads to errors on M1 since the architecture is different from the Github runner. Solution: Skip CoreServices when bundling the libraries (as was done for the CoreFoundation library that neovim#18294 replaced with CoreServices).
In a locale "en_US", "en" is the language and "US" is the region.
Before this change, we were too clever for our own good and tried to handle the
region as well. But if the macOS primary language is set to "English" and the
region to "Norway", we would end up with "en_NO", which is a locale that does
not exist.
Now we only take the language into account. Taking the example from above would
yield "en_US", which is a sensible fallback.
If the region is important to you, set $LANG and the more specific LC_*
variables in your shell config or alternatively use
:help :language.References #18292