GNOME Bugzilla – Bug 474556
No localized manuals starting from x-yelp-toc:
Last modified: 2008-01-07 23:11:11 UTC
In my jhbuild sandbox (installed in /opt/gnome2) I can access to localized (translated) manuals only using Help->Contents menu item in applications itsels. Trying to browse manuals using Yelp TOC page (the one you have invoking yelp from command line on from panel menu entry), it always show them in C locale. Notes: * I've rarian 0.5.8 installed under /opt/gnome2 (manually updated from 0.5.6) * there is no scrollkeeper under /opt/gnome2 * scrollkeeper from distro package is still available under /usr
Hmm. What's you're LANGUAGE enviroment variable set to? Running: LANGUAGE=es LANG=es yelp results (for me) in all the lovely translated goodness. Rarian uses LANGUAGE as it's variable of choice for determining the language choice for the entries. This comes from ye olden days of yelp, when we called scrollkeeper to get the contents list and relied on the first language of $LANGUAGE. Basically, I can't reproduce here.
LANGUAGE is a GNU extension, and we shouldn't rely on it. Looking at the source for g_get_language_names in GLib (which Rarian doesn't use, because it doesn't use GLib), it seems we should check, in order: LANGUAGE, LC_ALL, possibly LC_MESSAGES, and LANG. What's more, it doesn't seem Rarian does fallbacks. So, for instance, if you set LANGUAGE to de_CH, you should get the standard German (de) documents, because we don't have any Swiss German translations. Instead, you get documents from the C locale. Take a look at _g_compute_locale_variants here: http://svn.gnome.org/viewcvs/glib/trunk/glib/gutils.c?revision=5661&view=markup
Here's the basic algorithm in Python, where compute_variants is basically _g_compute_locale_variants as defined in GLib. if os.environ.has_key('LANGUAGE'): lang = os.environ.get('LANGUAGE') elif os.environ.has_key('LC_ALL'): lang = os.environ.get('LC_ALL') elif os.environ.has_key('LANG'): lang = os.environ.get('LANG') else: lang = "C" langlist = [] for lc in lang.split(":"): for var in compute_variants(lc): langlist.append(var)
(In reply to comment #1) > Hmm. What's you're LANGUAGE enviroment variable set to? It seems that my jhbuild session don't set LANGUAGE env var. Only LANG is set. > Running: LANGUAGE=es LANG=es yelp > results (for me) in all the lovely translated goodness. This is strange. Running `LANG=it LANGUAGE=it yelp` (or "es", or "de" or whatever) I can see translated manuals and TOC, but the UI falls back to C with those messages on console: betatester@redrum:~$ LANG=es LANGUAGE=es yelp (yelp:6182): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (yelp:6182): Gdk-WARNING **: locale not supported by C library manpath: can't set the locale; make sure $LC_* and $LANG are correct ** (yelp:6239): WARNING **: No listener with the specified listener id 1 ... ** (yelp:6239): WARNING **: No listener with the specified listener id 28
Confirmed in last Gutsy installation. My locale is fr_CH.UTF-8. Doc should fall back in French.
Got a nice patch to fix this which will go into Rarian 0.6.0 (tomorrow). Still having trouble committing to freedesktop SVN :( So it looks like (unless miracles happen) the 0.6.0 will be out-of-sync with SVN for now. Instead, I'll publish a patch from 0.5.8 (as well as the usual tarballs).
Thanks. Please tell us as soon as we can test this from jhbuild. This is critical, at least for me.
0.6.0 of Rarian has just been released. Awaiting approval from release team before pushing into jhbuild. Release can be found at: ftp://ftp.gnome.org/pub/gnome/sources/rarian/0.6 if you want to test.
I've tested it and it's OK for me. THANKS. Maybe check with Luca before closing this bug. BTW, it seems Yelp doesn't use the system font (Sans), but some sort of Serif font, difficult to read. Should I enter a new bug for this?
Already open: http://bugzilla.gnome.org/show_bug.cgi?id=467924
Confirming here too.
Marking as fixed.