Skip to content
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

Don't default to US-specific locale settings #2096

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Feb 22, 2024

Describe your changes

I'd expect that if a user wants a particular locale settings they should set it explicitly for themselves. It feels US-centric to default to en_US. So let's still generate the en_US to make it easier in case people want to change it back, but default to the more standard Computer format.

The C option is more sane with things like 24-hr times when running the date command.

Issue ticket if applicable

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@benz0li
Copy link
Contributor

benz0li commented Feb 22, 2024

FYI The locales of the official docker images for the three major languages used in data science:

docker run --rm -ti julia locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

docker run --rm -ti python locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

docker run --rm -ti r-base locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Well...

if a user wants a particular locale settings they should set it explicitly for themselves

exactly. exactamente. 確切地.

@mathbunnyru
Copy link
Member

Makes sense to me. If tests pass, I will merge this.

@maresb
Copy link
Contributor Author

maresb commented Feb 22, 2024

Haha, thanks @benz0li!

I wonder if there are any advantages to POSIX?

@maresb
Copy link
Contributor Author

maresb commented Feb 22, 2024

Ah, they are identical. :)

@maresb
Copy link
Contributor Author

maresb commented Feb 22, 2024

🟢 🚀

@yuvipanda
Copy link
Contributor

mesa likey

@mathbunnyru mathbunnyru merged commit fe21954 into jupyter:main Feb 22, 2024
64 checks passed
@maresb maresb deleted the patch-2 branch February 22, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants