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

test: Drop locale change check from TestPages.testBasic #19028

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

martinpitt
Copy link
Member

The Python bridge does not dynamically change its locale from Accept-Languages:, but just defaults to the standard environment of the logged in machine.

We decided to not reimplement this in the pybridge, as that is weird, error prone, and a corner case: No other Linux command line software does that, it won't change the locale of existing running programs which got spawned before changing the language (as that's impossible), the code was making assumptions about locale names and availability, and we take very little human readable text directly from command-line programs, most of it gets interpreted, formatted, and translated in the UI.


Spotted in PR #19011 with this failure.

The Python bridge does not dynamically change its locale from
`Accept-Languages:`, but just defaults to the standard environment of
the logged in machine.

We decided to not reimplement this in the pybridge, as that is weird,
error prone, and a corner case: No other Linux command line software
does that, it won't change the locale of existing running programs which
got spawned before changing the language (as that's impossible), the
code was making assumptions about locale names and availability, and we
take very little human readable text directly from command-line
programs, most of it gets interpreted, formatted, and translated in the
UI.
@martinpitt martinpitt added no-test For doc/workflow changes, or experiments which don't need a full CI run, pybridge Python Bridge labels Jun 27, 2023
@martinpitt
Copy link
Member Author

@allisonkarlitskaya @mvollmer I'd appreciate both of your opinions about my justification. It would also not be hard to actually implement this feature in the pybridge, but I lean towards dropping it.

Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this.

Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we only run that test on rhel?

Want to also drop it (from the test) for the C bridge?

@martinpitt
Copy link
Member Author

Why do we only run that test on rhel?

Because it's very expensive, and translations are the same on all OSes. So we picked the one where we know we have all locales.

@martinpitt
Copy link
Member Author

Want to also drop it (from the test) for the C bridge?

As long as it has that functionality, I think it makes sense to continue to test it, so there's no hurry.

@martinpitt martinpitt merged commit e1123e0 into cockpit-project:main Jun 27, 2023
@martinpitt martinpitt deleted the pybridge-locale-test branch June 27, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test For doc/workflow changes, or experiments which don't need a full CI run, pybridge Python Bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants