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
PR: Fix interface language auto-configuration #21451
Conversation
644b0c3
to
32f72bd
Compare
(I'd argue that this is a very problematic bug, when we are trying to convince our thousands of students that yes, spyder is a good IDE for programming in python) |
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.
Hey @sthibaul, thanks a lot for your contribution! We were not aware of it this problem (we always test Spyder in English) and it's even better that you've provided a fix for it too!
I left a small comment below, the rest looks good to me. And we'll include your fix in our next version (5.5.0), to be released next week.
Note: I'm marking this for Spyder 6 because you did your pull request against our |
When LANGUAGE_CODES is missing a case, get_available_translations() would be returning just ['en'], which breaks language autoconfiguration for all the cases that are indeed in LANGUAGE_CODES. Better annoy only developers about this and return the languages which are indeed in LANGUAGE_CODES, so that language autoconfiguration does work for those.
Addition to LANGUAGE_CODES and DISABLED_LANGUAGES was missed.
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.
Thanks again @sthibaul for your contribution!
PR: Backport PR #21451 (Fix interface language auto-configuration)
Description of Changes
The autoconfiguration of the language is currently completely broken: when starting spyder on a e.g. french-installed OS, spyder still displays english by default.
This is because
spyder/config/base.py
'sget_available_translations()
currently always return['en']
, becauseLANGUAGE_CODES
is currently missing a few cases ofspyder/locale/
. One can of course just add the missing cases, but better just at least support autoconfiguring the cases which are inLANGUAGE_CODES
rather than breaking them all (Except for developers, which do need to take notice of this).Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct:
Samuel Thibault