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

translations and unicode #65

Closed
wants to merge 3 commits into from
Closed

Conversation

dashea
Copy link
Contributor

@dashea dashea commented Apr 10, 2015

Fix live not being translated and also crashing when it is translated. Also needs storaged-project/blivet#73

I managed to get through a live install in Russian with this but I'm sure to have missed something.

…ations" (#1209563)

Setting LC_ALL had the effect of disabling translations if the user
started anaconda in a live environment without first setting the
language in the live environment. While this does fix the encoding
issues, it doesn't fix them in quite the way we wanted.

This reverts commit 4d686f1.
Grab language information from $LANGUAGE, $LC_ALL, or $LC_MESSAGES, if
available, and then clear all these extra variables so we don't need to
worry about them when switching languages.
Use unicode types for translated strings so that anaconda doesn't crash
when trying combine unicode strings with non-ascii strs.
@vpodzime
Copy link
Contributor

I don't quite understand one thing -- why do we need the first commit (Revert...) if we remove the LC_ALL definition from the environment in the one that follows (Consolidate...)? By the revert we loose the default encoding setup on live so if it's possible to keep it, it would be great. If not, does that mean that whenever LC_ALL is set in the environment prior/when running anaconda, translations are doomed?

@dashea
Copy link
Contributor Author

dashea commented Apr 13, 2015

I removed the LC_ALL liveinst commit because I don't think it ever actually worked.

$ env - python -c 'import sys; print(sys.getdefaultencoding())'
ascii
$ LC_ALL='en_US.UTF-8' python -c 'import sys; print(sys.getdefaultencoding())'
ascii

If I am missing something I will be happy to put it back.

@vpodzime
Copy link
Contributor

Ha, so it "fixed" the issue for F21 for a moment by breaking translations instead of by fixing the default encoding. :) Thanks for the further explanation!

@dashea
Copy link
Contributor Author

dashea commented Apr 21, 2015

Pushed to f22-branch

@dashea dashea closed this Apr 21, 2015
@dashea dashea deleted the f22-unicode branch April 21, 2015 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants