On Sat, Apr 05, 2008 at 11:55:59AM -0400, Eric Cooper wrote:
The --time-style=locale option to ls no longer behaves as documented.

LC_TIME="en_US.UTF-8"
$ ls --version
ls (GNU coreutils) 6.10
...
$ /bin/ls --time-style=locale -l passwd
-rw-r--r-- 1 root root 765 2007-12-07 12:42 passwd

It worked fine in version 5.97:

$ ls --version
ls (GNU coreutils) 5.97
...
$ /bin/ls --time-style=locale -l passwd
-rw-r--r-- 1 root root 765 Dec  7 17:42 passwd

It seems to me that to fix this, the formats in long_time_format need to be set to something like
N_("oldfiletimes"),
N_("newfiletimes")
instead of N_("%b %e %Y"),
N_("%b %e %H:%M")
with locale_time_style (ls.c:1913) checking for those to see if the strings are untranslated, special casing the POSIX/C locales, and then adding en.po files to translate "oldfiles"/"newfiles" back to "%b %e %Y"/"%b %e %H:%M". That'll also require changing all of the translations. Otherwise, I don't see a way that the current code would allow any locale to specify using "%b %e %Y" or "%b %e %H:%M" as the locale-dependent date format. (Or, I suppose that the check to see if the time formats have been translated could be backed out.)

A patch to implement that in ls.c is fairly trivial, but I'm not sure how to interface with the translations.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to