[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: ls: do not show long iso time format for en_* locales
From: |
Ondřej Vašík |
Subject: |
Re: [PATCH]: ls: do not show long iso time format for en_* locales |
Date: |
Sat, 26 Sep 2009 10:27:22 +0200 |
Paul Eggert wrote:
> Ondřej Vašík <address@hidden> writes:
>
> > as reported in https://bugzilla.redhat.com/show_bug.cgi?id=525134 by
> > Daniel Qarras, ls -l shows iso long format for en_* locales.
>
> I just now read that Bugzilla report, and the diagnosis and the
> patch do not seem correct. The diagnosis says:
>
> > In ls.c (case locale_time_style) is dcgettext (NULL, long_time_format[i],
> > LC_TIME); ... that translates the string, but the translation is THE SAME as
> > the default - as the format is the same for en_* locales.
>
> But that is not what the ls.c source code does. The code does this:
>
> char const *locale_format =
> dcgettext (NULL, long_time_format[i], LC_TIME);
> if (locale_format == long_time_format[i])
> goto case_long_iso_time_style;
>
> The "==" test returns true when dcgettext returns the msgid (its 2nd
> argument) because it finds no translation. If it found a translation,
> dcgettext would return a different string, so the "==" test would
> return false, and the code would use the translation. Even if the
> translation has the same _contents_ as the msgid, it will have a
> different _address_, so the code is correct as-is and does not need
> this modification.
Ah, sorry... you are right, the address should be different, so the code
is correct, I got confused somehow.
>
> Also, the proposed patch would use U.S. styles for all English
> locales, which certainly is not right.
>
> I suspect the diagnosis given by Jim Meyering in comment #3 at that
> bug report is correct, and that something is going wrong at install
> time.
But as Pádraig wrote in the reply, there are no translation for en_*
languages, so long iso style is used - which is imho wrong. The patch is
fixing it (although it seems to be only a workaround and wrong
approach). Better would be to have translations even for en_* locales in
some cases - like this. This is better way than this workaround... Is it
possible add those translations?
Sorry for noise...
Greetings,
Ondřej
signature.asc
Description: Toto je digitálně podepsaná část zprávy
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, (continued)
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Jim Meyering, 2009/09/26
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Ondřej Vašík, 2009/09/26
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Pádraig Brady, 2009/09/27
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Jim Meyering, 2009/09/27
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Pádraig Brady, 2009/09/27
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Pádraig Brady, 2009/09/28
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Pádraig Brady, 2009/09/28
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Jim Meyering, 2009/09/28
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Paul Eggert, 2009/09/29
- Re: [PATCH]: ls: do not show long iso time format for en_* locales, Pádraig Brady, 2009/09/30
Re: [PATCH]: ls: do not show long iso time format for en_* locales,
Ondřej Vašík <=