bug-coreutils
[Top][All Lists]
Advanced

[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: Paul Eggert
Subject: Re: [PATCH]: ls: do not show long iso time format for en_* locales
Date: Fri, 25 Sep 2009 13:57:01 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

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.

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]