libc does not do per-domain result caching

Bug #14176 reported by Martin Willemoes Hansen
36
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Fix Released
Critical
Martin Pitt

Bug Description

The Gnome About dialog is out of sync with the upstream Danish translation, the
about dialog is part of gnome-desktop.
Why it is not in sync, I dont know, maybe of some modification to the upstream
package? Or bad translation management in Ubuntu?

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

Created an attachment (id=1735)
Screenshot of the problem

This screenshot shows the problem.
It also shows that the about dialog has been translated into Danish for the
vanilla Gnome-2.10 version of gnome-desktop.

Revision history for this message
Sebastien Bacher (seb128) wrote :

that works fine here, do you have the language-pack-da installed ?

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

(In reply to comment #2)
> that works fine here, do you have the language-pack-da installed ?

Yes I have it installed, I have just updated my preview system with all the
latest packages including an update to the danish translations, but the problem
persists. The upgrade fixes the keyboard-setup dialog though, but not this problem.

Are you sure that it works for your danish installation?

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 14206 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 14210 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

that works fine here. Can you run "strace gnome-about 2>&1 | grep
gnome-desktop-2.0.mo" ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 14211 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 14212 has been marked as a duplicate of this bug. ***

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

(In reply to comment #6)
> that works fine here. Can you run "strace gnome-about 2>&1 | grep
> gnome-desktop-2.0.mo" ?

strace gnome-about 2>&1 | grep gnome-desktop-2.0.mo
open("/usr/share/locale-langpack/da_DK/LC_MESSAGES/gnome-desktop-2.0.mo",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/da/LC_MESSAGES/gnome-desktop-2.0.mo", O_RDONLY)
= 10
open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/gnome-desktop-2.0.mo",
O_RDONLY) = 10
open("/usr/share/locale-langpack/en/LC_MESSAGES/gnome-desktop-2.0.mo", O_RDONLY)
= -1 ENOENT (No such file or directory)

Revision history for this message
Sebastien Bacher (seb128) wrote :

What is the value of $LANGUAGE (alt-f2, echo $LANGUAGE | zenity --text-info) ?

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

(In reply to comment #10)
> What is the value of $LANGUAGE (alt-f2, echo $LANGUAGE | zenity --text-info) ?

da_DK:da:en_GB:en

Revision history for this message
Sebastien Bacher (seb128) wrote :

that seems to be right. Could you run that:
- unset LANGUAGE
- LC_ALL=da_DK.UTF-8 gnome-about (or an another app)

Martin, do you have an idea on why it opens the en_GB po file ?

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

(In reply to comment #12)
> that seems to be right. Could you run that:
> - unset LANGUAGE
> - LC_ALL=da_DK.UTF-8 gnome-about (or an another app)

This make it display it in Danish :o)

>
> Martin, do you have an idea on why it opens the en_GB po file ?

I suspect it has something with Gdm to do, I did this after the procedure above:

1. logout
2. set the language in gdm to Danish
3. login

Now the about dialog is allways in Danish.

This is the env. vars. I have now:
GDM_LANG=da_DK.UTF-8
LANG=da_DK.UTF-8
LANGUAGE=da_DK.UTF-8
LC_ALL=

Also please note that this does _only_ solve the problem with the about dialog,
not the problems with Evolution being out of sync translation wise and
gnome-media, totem and soundjuicer completly lacking the Danish translation.

Revision history for this message
Sebastien Bacher (seb128) wrote :

works fine for these software in da_DK.UTF-8 here. Could you run "strace
sound-juicer 2>&1 | grep sound-juicer.mo" ?

Revision history for this message
Martin Willemoes Hansen (mwh) wrote :

(In reply to comment #14)
> works fine for these software in da_DK.UTF-8 here. Could you run "strace
> sound-juicer 2>&1 | grep sound-juicer.mo" ?

$ strace sound-juicer 2>&1 | grep sound-juicer.mo
open("/usr/share/locale/da_DK.UTF-8/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/da_DK.utf8/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/da_DK/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/da.UTF-8/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/da.utf8/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/da/LC_MESSAGES/sound-juicer.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)

Seems the translations is missing.

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems to be a libc6 issue, reassigning to Martin

Revision history for this message
Martin Pitt (pitti) wrote :

<seb128> libc b0rkage ?
<pitti> might be
<seb128> :(
<seb128> I'm reassigning the bug to you I guess
<pitti> but works for me
<pitti> (for .de)
<pitti> yeah, please do
<seb128> works for me
<seb128> fr_FR.UTF-8
<seb128> but I get the issue with da_DK.UTF-8
<seb128> is that possible that's due to da != dk ?
<pitti> hmm, I have an idea
<seb128> we have fr_FR, de_DE
<pitti> shit, libc b0rkage
<seb128> :(
<pitti> fabbione's buildd will spank me to death
<seb128> where is the bug ?
<pitti> it has to do with the stat64() optimizations
<pitti> when I wrote this, I didn't take into account that a program can in fact
use several domains in parallel
<pitti> s-j starts with domain gstreamer-0.8
<pitti> for me it finds this in locale-langpack
<pitti> then it takes all subsequent locales from -langpack, too
<pitti> for dk, gstreamer might not be translated
<pitti> or, at least not in the langpack
<pitti> so it uses /usr/share/locale for all domains
<pitti> fuck
<seb128> oh, right
<pitti> so either I have to do per-domain caching
<pitti> or revert the caching altogether
<pitti> I comment on the bug and reassing
<pitti> unless you already did
<seb128> right, gstreamer0.8 has no da po file
<seb128> I've reassigned it to you/libc6

Revision history for this message
Martin Pitt (pitti) wrote :

*** Bug 14324 has been marked as a duplicate of this bug. ***

Revision history for this message
Martin Pitt (pitti) wrote :

I sent the fix to Jeff Bailey yesterday, he will upload a new glibc soon.

Revision history for this message
Martin Pitt (pitti) wrote :

 glibc (2.3.2.ds1-20ubuntu12) hoary; urgency=low
 .
   * Martin Pitt <email address hidden>
 .
      - debian/patches/ubuntu-altlocaledir.dpatch: Revert new time
        comparison result caching from 2.3.2.ds1-20ubuntu11 since this
        breaks if applications use several translation domains from both
        /usr/share/locale and /usr/share/locale-langpack/. Now just avoid
        to stat64() files when we already know that they don't exist.
        This reduces the number of stat calls at least a bit.
        (Ubuntu #7835)
      - debian/local/usr_sbin/remove-language-locales: Never remove the
        system default locale specified in /etc/environment.
        (Ubuntu #8000)
  [...]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.