+++ This bug was initially created as a clone of Bug #600384 +++ Description of problem: The 'ls -l' output for the ja_JP.UTF-8 locale uses the long-iso time style instead of the Japanese style. $ LANG=ja_JP.UTF-8 ls -l 合計 0 -rw-rw-r--. 1 jbastian jbastian 0 2010-06-04 10:19 timestamp In RHEL 5, it used a Japanese locale time style: $ LANG=ja_JP.UTF-8 ls -l 合計 4 -rw-rw-r-- 1 jbastian jbastian 0 6月 4 10:19 timestamp Version-Release number of selected component (if applicable): coreutils-8.4-6.fc13.i686 How reproducible: every time Steps to Reproduce: 1. touch timestamp 2. LANG=ja_JP.UTF-8 ls -l timestamp Actual results: Long ISO time style is used to display the file's timestamp, e.g., 2010-06-04 10:19 Expected results: Japanese locale time style is used, e.g., 6月 4 10:19 Additional info: The coreutils-8.4/po/ja.po source contains a translation for the time styles: $ nl -ba ja.po ... 5061 msgid "%b %e %Y" 5062 msgstr "%b %e %H:%M %Y" ... 5071 msgid "%b %e %H:%M" 5072 msgstr "%b %e %H:%M %Y" However, these do not appear in the compiled mo files: $ msgunfmt /usr/share/locale/ja/LC_MESSAGES/coreutils.mo | grep -A1 '%b %e' $ msgunfmt /usr/share/locale/ja/LC_TIME/coreutils.mo | grep -A1 '%b %e' $ They do, however, appear for other locales. For example, French: $ msgunfmt /usr/share/locale/fr/LC_MESSAGES/coreutils.mo | grep -A1 '%b %e' msgid "%b %e %Y" msgstr "%e %b %Y" -- msgid "%b %e %H:%M" msgstr "%e %b %H:%M" $ msgunfmt /usr/share/locale/fr/LC_TIME/coreutils.mo | grep -A1 '%b %e' msgid "%b %e %Y" msgstr "%e %b %Y" -- msgid "%b %e %H:%M" msgstr "%e %b %H:%M" And it works as expected for French: $ LANG=fr_FR.UTF-8 ls -l total 0 -rw-rw-r--. 1 jbastian jbastian 0 4 juin 10:19 timestamp You can manually specify the time style for Japanese and it works: $ LANG=ja_JP.UTF-8 ls -l --time-style="+%b %e %H:%M %Y" 合計 0 -rw-rw-r--. 1 jbastian jbastian 0 6月 4 10:19 2010 timestamp
It appears you have to enable the -f (fuzzy) flag when compiling the po files. The translations are missing with a simple compile: $ msgfmt -o /tmp/coreutils.mo ja.po $ msgunfmt /tmp/coreutils.mo | grep '%b %e' $ But with fuzzy enabled, they are included (along with lots of errors): $ msgfmt -f -o /tmp/coreutils.mo ja.po ja.po:39: `msgid' and `msgstr' entries do not both end with '\n' ja.po:269: `msgid' and `msgstr' entries do not both end with '\n' ... msgfmt: found 43 fatal errors $ msgunfmt /tmp/coreutils.mo | grep '%b %e' msgid "%b %e %Y" msgstr "%b %e %H:%M %Y" msgid "%b %e %H:%M" msgstr "%b %e %H:%M %Y" Overwriting the system coreutils.mo files with this fresh fuzzy version fixes the problem: $ sudo cp /tmp/coreutils.mo /usr/share/locale/ja/LC_MESSAGES/coreutils.mo $ sudo cp /tmp/coreutils.mo /usr/share/locale/ja/LC_TIME/coreutils.mo $ LANG=ja_JP.UTF-8 ls -l timestamp -rw-rw-r--. 1 jbastian jbastian 0 6月 4 10:19 2010 timestamp
A better fix would probably be to just remove the fuzzy flag from ja.po: diff --git a/po/ja.po b/po/ja.po index 99faa91..6c411fa 100644 --- a/po/ja.po +++ b/po/ja.po @@ -5057,7 +5057,6 @@ msgstr "%s: 無効な番号です" #. Note also that specifying a width as in %5b is erroneous as strftime #. will count bytes rather than characters in multibyte locales. #: src/ls.c:733 -#, fuzzy msgid "%b %e %Y" msgstr "%b %e %H:%M %Y" @@ -5067,7 +5066,6 @@ msgstr "%b %e %H:%M %Y" #. Note also that specifying a width as in %5b is erroneous as strftime #. will count bytes rather than characters in multibyte locales. #: src/ls.c:746 -#, fuzzy msgid "%b %e %H:%M" msgstr "%b %e %H:%M %Y"
That should be done by japanese translators - as you could see at http://translationproject.org/domain/coreutils.html ( current owner of japanese translation is yasuakit (at) gmail (dot) com )- there is a lot (~600 from 1469) of fuzzy/untranslated messages in japanese and I'm reluctant to fix/remove fuzzy word for just these two...it would possibly mean other bugzillas with other translations to be fixed. This one translation is fuzzy for quite a long time - so it is strange it worked in previous coreutils releases. Maybe fuzzy translations were done and now they are ignored instead. I guess this should wait for next upstream release with unfuzzed and verified translation... it seems new maintainer of japanese translation is working on translations quite a lot now - 350 translated messages in less than 3 months ... Will let him know via email to make it more probable this "fuzzy" word will be removed from japanese translation for coreutils-8.6 and closing DEFERRED...