Bug 73669

Summary: date format in 'ls -l' is broken in Japanese locale
Product: [Retired] Red Hat Public Beta Reporter: Nakai <ynakai>
Component: fileutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: nullCC: eng-asia-list
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-22 14:00:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
current wrong date format ( hand-writing shows how it should be) none

Description Nakai 2002-09-08 11:51:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
Japanese date format needs to add 'NICHI'(one kanji char)
to %e but 'ls -l' do not recognize it.

ja.po includes this translation but it ignores.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. 'ls -l' in Japanese locale
2. Feel bad with broken Japanese date format
3.
	

Actual Results:  broken Japanese date format

Expected Results:  correct Japanese date format

Additional info:

ls command refers fileutils.mo file in LC_TIME directory,
not LC_MESSAGE that is specified by default.
There are 2 ways to fix this.

1) Apply this patch.
--- fileutils-4.1.9/src/ls.c.orig       2002-09-08 20:34:04.000000000 +0900
+++ fileutils-4.1.9/src/ls.c    2002-09-08 20:37:40.000000000 +0900
@@ -1678,8 +1678,7 @@
              {
                unsigned int i;
                for (i = 0; i < 2; i++)
-                 long_time_format[i] =
-                   dcgettext (NULL, long_time_format[i], LC_TIME);
+                 long_time_format[i] = _(long_time_format[i]);
              }
          }
     }

2) Or, link the .mo file.

mkdir -p /usr/share/locale/ja/LC_TIME
ln -sf /usr/share/locale/ja/LC_MESSAGE/fileutils.mo \
    /usr/share/locale/ja/LC_TIME

Comment 1 Nakai 2002-09-08 12:08:44 UTC
Sorry,

LC_TIME=de_DE ls -l

should behave as German (for example) and show
German style date format. So Above first way to
apply patch can never be a correct choice.

Comment 2 Tim Waugh 2002-10-07 13:20:04 UTC
Please rephrase the 'steps to reproduce' with a specific locale to test.  For 
example, should I be looking at the output of 'LC_TYPE=ja_JP ls -l' or 
something else? 
 
Also relevant: does 'date' show the right format, in the locale you are using?

Comment 3 Nakai 2002-10-09 09:48:36 UTC
LANG=ja_JP.eucJP kterm

and

LANG=ja_JP.eucJP ls -l

inside the kterm.

'date' format bug is same but another bug, filed in
#73672

Comment 4 Nakai 2002-10-09 09:50:18 UTC
Created attachment 79584 [details]
current wrong date format ( hand-writing shows how it should be)

Comment 5 Tim Waugh 2002-10-22 14:00:08 UTC
Fixed package is fileutils-4.1.9-12.

Comment 6 Tim Waugh 2002-12-11 18:45:09 UTC
*** Bug 73671 has been marked as a duplicate of this bug. ***