Bug 1209563 - Many strings not translated in live installation
Summary: Many strings not translated in live installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 22
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: David Shea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker https://fedoraproject...
Depends On: 1205183
Blocks: F22FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2015-04-07 16:16 UTC by Adam Williamson
Modified: 2015-04-30 21:09 UTC (History)
7 users (show)

Fixed In Version: libblockdev-0.11-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-29 12:57:09 UTC


Attachments (Terms of Use)
Fedora 21 French live install hub screenshot (131.85 KB, image/png)
2015-04-07 16:17 UTC, Adam Williamson
no flags Details
Fedora 22 French live install hub screenshot (141.66 KB, image/png)
2015-04-07 16:18 UTC, Adam Williamson
no flags Details

Description Adam Williamson 2015-04-07 16:16:33 UTC
When installing from a Fedora 22 live image and selecting a language other than English on the Welcome screen, several strings for which translations are available are not translated.

For instance, on the main hub, the titles of spokes and the hub 'sections' (LOCALIZATION, SYSTEM) are not translated. Neither are most of the spoke 'status' texts ("Automatic partitioning selected" etc).

Attaching screenshots of the main hub in F21 and F22 Beta TC8 Workstation live images, after selecting French on the Welcome screen.

Proposing as a Final blocker: https://fedoraproject.org/wiki/Fedora_22_Final_Release_Criteria#Installer_translations - "The installer must correctly display all sufficiently complete translations available for use."

Comment 1 Adam Williamson 2015-04-07 16:17:54 UTC
Created attachment 1011852 [details]
Fedora 21 French live install hub screenshot

Comment 2 Adam Williamson 2015-04-07 16:18:12 UTC
Created attachment 1011853 [details]
Fedora 22 French live install hub screenshot

Comment 3 David Shea 2015-04-07 16:56:24 UTC
Yeah it's because LC_ALL isn't being reset, and python's gettext functions use LC_ALL and LC_MESSAGES before checking LANG. The strings that do end up being translated are the ones going through gtk, because the C version of gettext uses the locale. Localization is kind of the worst.

Comment 4 Adam Williamson 2015-04-07 17:01:30 UTC
What changed from F21, out of curiosity?

I should probably note here that in touching anything to do with this, we're going to want to be careful we don't cause https://bugzilla.redhat.com/show_bug.cgi?id=1169019 (the actual UnicodeDecodeError, not the zillion "'NoneType' object has no attribute 'path'" traces libreport thinks are dupes for some bizarre reason) to start happening again - that doesn't seem to be affecting F22 so far.

Comment 5 David Shea 2015-04-07 17:04:01 UTC
(In reply to awilliam@redhat.com from comment #4)
> What changed from F21, out of curiosity?

https://github.com/rhinstaller/anaconda/commit/4d686f1e7aecde1d17ee13da86e84298da88887c

Comment 6 Adam Williamson 2015-04-07 18:06:00 UTC
Ah. So we've actually been here before:

https://bugzilla.redhat.com/show_bug.cgi?id=1169019#c30
https://bugzilla.redhat.com/show_bug.cgi?id=1169019#c31

and for F21 we didn't accept the LC_ALL 'fix' - but it got committed to master, apparently.

Of course, if we take it out, we'll probably start getting UnicodeDecodeError crashes again. But still, it's clearly not the right thing to do.

Comment 7 Adam Williamson 2015-04-07 19:36:07 UTC
FWIW, as bcl is still opposed to the reload(sys); sys.setdefaultencoding('utf-8') hack, I thought I'd do some digging into why pyparted 3.10 triggered this whole mess in the first place.

So it's all part of the Python 3 compat that went into 3.10. That's this commit:

https://github.com/rhinstaller/pyparted/commit/c19e7195489309302ed884d903447d280c28042f

it turns all instances of PyString_FromString into PyUnicode_FromString , so all those things which previously produced a 'str' in Python2 now output a 'unicode'.

(It also replaces uses of PyString_AsString with PyUnicode_AsUTF8String , but I don't think that matters to this problem).

I'm not sure if we can address this any easier on the pyparted side than the anaconda side, but that at least is what to look for. There are 32 occurrences of PyUnicode_FromString in current pyparted master.

Comment 8 Adam Williamson 2015-04-07 19:55:19 UTC
The direct Python 3 equivalent of PyString_AsString is PyBytes_AsString , which in Python 3 would result in a bytes object rather than a str object. I'm not sure if just changing it that way (so the code uses PyBytes_AsString in py3 and PyString_AsString in py2) would break stuff in Python 3-land.

Comment 9 Adam Williamson 2015-04-07 22:10:59 UTC
David notes that blivet itself now outputs unicodes in some cases, so we can't just drop the LC_ALL thing and fix pyparted somehow, we'd also have to change blivet. If I drop the LC_ALL stuff from Beta TC8 and run an install in Russian, it crashes on entering the Reclaim Space screen, when we try to concatenate an anaconda-translated string (which is a str) with the output of a blivet Size object's humanReadable() method (which, when xlate=True and we're in Russian, is a unicode).

Comment 10 Vratislav Podzimek 2015-04-10 08:29:05 UTC
Doing changes in pyparted would break its Python 3 support so we should really avoid that. This, unfortunately, is a result of everything going towards Python 3 installation in F22 which was dropped from the F22's targets.

Comment 11 Petr Schindler 2015-04-20 16:31:53 UTC
Discussed at today's blocker review meeting [1].

This bug was accepted as Final Blocker - this violates "The installer must correctly display all sufficiently complete translations available for use."

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2015-04-20/

Comment 12 Fedora Update System 2015-04-24 02:15:28 UTC
anaconda-22.20.10-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/anaconda-22.20.10-1.fc22

Comment 13 Fedora Update System 2015-04-26 12:46:51 UTC
Package libblockdev-0.11-1.fc22, python-blivet-1.0.8-1.fc22, anaconda-22.20.10-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libblockdev-0.11-1.fc22 python-blivet-1.0.8-1.fc22 anaconda-22.20.10-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-6866/libblockdev-0.11-1.fc22,python-blivet-1.0.8-1.fc22,anaconda-22.20.10-1.fc22
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2015-04-29 12:57:09 UTC
libblockdev-0.11-1.fc22, python-blivet-1.0.8-1.fc22, anaconda-22.20.10-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Adam Williamson (Fedora) 2015-04-30 21:09:15 UTC
This does seem to be resolved in Final TC1, but as I kinda expected, we get more UnicodeDecodeError crashes: at least https://bugzilla.redhat.com/show_bug.cgi?id=1217610 .


Note You need to log in before you can comment on or make changes to this bug.