Hi, after i upgrade sys-apps/coreutils from 5.2.1-r7 to 5.94-r1, /bin/ls change output format of time: 5.2.1-r7: drwx------ 2 drak users 4096 bře 21 14:56 Desktop 5.94-r1 drwx------ 2 drak users 4096 2006-02-21 15:11 Desktop/ $ locale LANG=cs_CZ LC_CTYPE=cs_CZ LC_NUMERIC="cs_CZ" LC_TIME="cs_CZ" LC_COLLATE=C LC_MONETARY="cs_CZ" LC_MESSAGES="cs_CZ" LC_PAPER="cs_CZ" LC_NAME="cs_CZ" LC_ADDRESS="cs_CZ" LC_TELEPHONE="cs_CZ" LC_MEASUREMENT="cs_CZ" LC_IDENTIFICATION="cs_CZ" LC_ALL= $ locale -a C POSIX cs_CZ cs_CZ.utf8 en_US en_US.utf8 When I use locale C or POSIX, time format is, good: drwxr-xr-x 2 root root 1024 Jul 23 2005 bin When I tried en_US locale, time format is wrong too: $ LANG="en_US" ls -l -rw-r--r-- 1 drak users 309 2006-03-02 09:14 wget.txt What's wrong with locales and/or ls? With sys-apps/coreutils-5.2.1-r7, is all OK. emerge info: Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r3, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -funroll-loops -mfpmath=sse -msse -msse2 -mmmx -fomit-frame-pointer -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /usr/share/xsessions /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -mfpmath=sse -msse -msse2 -mmmx -fomit-frame-pointer -fprefetch-loop-arrays -pipe" DISTDIR="/home/tmp/distfiles" FEATURES="autoconfig candy ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://drak.ab.czso.cz:2003/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/mirror/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" LANG="POSIX" LINGUAS="cs" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://drak.ab.czso.cz/gentoo-portage" USE="x86 X aalib acl alsa apm asf audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups curl dri dvd dvdread emboss encode ethereal exif expat f77 fam ffmpeg foomaticdb fortran fuse gdbm gif gimpprint glut gpm gstreamer gtk gtk2 guile idn imagemagick imap imlib isdnlog java jpeg kde lcms libg++ libwww mad maildir mikmod mjpeg mmx mng motif mp3 mpeg ncurses network nls nptl nptlonly nsplugin nvidia objc ogg oggvorbis opengl oss pam pcre pdflib perl png ppds pppd python qt quicktime readline recode samba sdl slang sndfile spell sse sse2 ssl tcltk tcpd threads tiff truetype truetype-fonts type1-fonts udev usb vim-with-x vorbis win32codecs wmf xine xinerama xml2 xmms xv xvid zlib linguas_cs userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS
newer coreutils have gotten stricter about locale translations of ls output if your locale doesnt properly translate both time fields, it falls back to the long posix iso format in your case, your LINGUAS is set to "cs" so only the "cs" lang will have localized output for ls and the reason your cs isnt output correctly is because the cs.po file is outdated in coreutils and no one has updated it
here are the relevant sections from the cs.po file you'll need to update ... you'll need to tell me what the correct values for 'msgstr' are ... i can probably guess, but it's better if you tell me :P #: src/ls.c:685 msgid "%b %e %Y" msgstr "%e. %b %Y %H.%M" #: src/ls.c:693 msgid "%b %e %H:%M" msgstr "%e. %b %Y %H.%M"
I am not very familiar with programming and localization, but when I translate time format what I want to strftime format, I find that I want have msgstr line like original from ls.c: #: src/ls.c:685 msgid "%b %e %Y" msgstr "%b %e %Y" #: src/ls.c:693 msgid "%b %e %H:%M" msgstr "%b %e %H:%M" Only thing I want is translate abbreviated month name from english to czech, no other format changes. Format, that is actualy in po/cs.po I never saw on ls -l output. Or I talk stuff and nonsense? :-)
sure you are ... the point is to make the output of "%b %e %Y" look "normal" to you ... in other words, how would you write this date in CS ? May 15 2006 for example, german users would write it: 15. Mai 2006
"May 15 2006" is default locale "Kvě 15 2006" shoud be in czech locale, that I have set by LANG. Only change is May -> Kvě, no other format changes. In older version of coreutilt it works exactly like I say. Only one change was localised short names of months from 'abmon': $ locale -ck LC_TIME LC_TIME abday="Ne;Po;
"May 15 2006" is default locale "Kvě 15 2006" shoud be in czech locale, that I have set by LANG. Only change is May -> Kvě, no other format changes. In older version of coreutilt it works exactly like I say. Only one change was localised short names of months from 'abmon': $ locale -ck LC_TIME LC_TIME abday="Ne;Po;Út;St;Čt;Pá;So" day="Neděle;Pondělí;Úterý;Středa;Čtvrtek;Pátek;Sobota" abmon="led;úno;bře;dub;kvě;čen;čec;srp;zář;říj;lis;pro" mon="leden;únor;březen;duben;květen;červen;červenec;srpen;září;říjen;listopad;prosinec" am_pm=";" d_t_fmt="%a %e. %B %Y, %H:%M:%S %Z" d_fmt="%d.%m.%Y" t_fmt="%H:%M:%S" t_fmt_ampm="%I:%M:%S" era= era_year="" era_d_fmt="" alt_digits= era_d_t_fmt="" era_t_fmt="" time-era-num-entries=0 time-era-entries="N" week-ndays=7 week-1stday=19971130 week-1stweek=0 first_weekday=1 first_workday=1 cal_direction=1 timezone="" date_fmt="%a %b %e %H:%M:%S %Z %Y" time-codeset="ISO-8859-2"
added a patch to current patchset, fix will be in next release
Thank you for repair.