For those interested in translations, I'd like to jot down a few notes from
the last few days' work to get i18n'd strings into Ironic before our RC.
Hopefully some of this will be helpful to someone out there -- it's been a
learning experience for me :)
Quick background:
- the project was set up with transifex a while back
- folks have been translating our strings on transifex
- jenkins has been regularly proposing updates to ironic, which we've
accepted
However, late last week I noticed that none of the
ironic/locale/*/LC_MESSAGES/ironic.po files had any actual translated
strings in them. Some digging revealed that there were two problems:
* most of the .po files had somehow gotten malformatted (duplicate blank
messages). We now have a tox check to prevent this.
* the file timestamps were newer than the translations on transifex. Easy
work around is "pull --force".
Manual fixes for both of these have landed in Ironic, and longer-term fixes
have gone up for infra and some other projects.
To determine whether or not this was successful in enabling translated
strings in Ironic, I had to learn a few things about babel and
gettextutils, but there's still a lot more catching up on the whole i18n
discussion that I need to do. This morning, I confirmed, in fact, our LOG
messages are getting translated based on the system language, if the
correct locale's .mo file is found in the appropriate system path, or that
path is overridden with the IRONIC_LOCALEDIR env var. At the moment,
Ironic's API strings will also be translated based on the system language,
not on the Accept-Language header.
https://bugs.launchpad.net/ironic/+bug/1300939
I've jotted down some notes on how to recreate an environment which
reproduces this without needing to package and install ironic.
https://etherpad.openstack.org/p/TestingTranslations
It also seems that we're not programatically testing whether translation
works or not. Maybe there's a good reason this hasn't been done yet... but
after spending a couple days getting it to work in Ironic, I would like to
add a test to our gate so that I know it stays working. I'm not sure the
best way to go about that, but I hope someone who knows more about
tx/msgfmt/babel/etc can look at my notes above and suggest or get something
going from that.
Cheers,
Devananda
Hi all,
I recently noticed that none of the ironic/locale/*/LC_MESSAGES/ironic.po
files contain any translated strings, even though Jenkins is routinely
proposing updates. I looked a bit further into this, with a few pointers
from Clark, and it seems that the jenkins translation job is erroring out.
It claims there's a duplicate message, but I haven't been able to figure
out why. I've filed a bug here:
https://bugs.launchpad.net/ironic/+bug/1298645
For quick reference, here's a link to the errors that we think are the
cause of this issue:
http://logs.openstack.org/periodic/ironic-propose-translation-update/6aed39…
Then, today, I noticed that the same error also shows up in Nova and
Ceilometer's recent jobs. Here's an example from Nova.
http://logs.openstack.org/8d/8df565d39cd3216bde8488e656957a49dd6949fa/post/…
I could use some help figuring this out. Since folks have been translating
strings for Ironic, I'd really like to be able to include that work in our
Icehouse release :)
Thanks much,
Devananda