This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ja_JP locale: Fix the offset in era-string for Taisho gan-nen [BZ #24162]


Hello Rafal-san,

Sorry to be late replying.  Thank you for the detailed review on this
patch.

From: Rafal Luzynski <digitalfreak@lingonborough.com>
Subject: Re: [PATCH] ja_JP locale: Fix the offset in era-string for Taisho gan-nen [BZ #24162]
Date: Tue, 19 Feb 2019 00:27:36 +0100 (CET)

> 1. Non-patched version:
> 
> $ LC_ALL=ja_JP.utf8 date -d "1913-04-05" +"%d %m %Ey"
> 05 04 2
> $ LC_ALL=ja_JP.utf8 date -d "1912-11-22" +"%d %m %Ey"
> 22 11 2
> 
> 2. Patched version:
> 
> $ LC_ALL=ja_JP.UTF-8 ./testrun_loc.sh /usr/bin/date -d "1913-04-05" +"%d %m %Ey"
> 05 04 02
> $ LC_ALL=ja_JP.UTF-8 ./testrun_loc.sh /usr/bin/date -d "1912-11-22" +"%d %m %Ey"
> 22 11 01
> 
> So the issue is that the year 1912 (or at least part of it) is
> displayed as the year 2 while it should be 1 and year 2 should
> be only 1913, and this patch fixes it, is that correct?

Yes, that is correct.

> Could you please shorten the first line of your patch, which is also
> the subject line of your email?  If it was only 1 character shorter
> it would fit in one line when listing with "git log --oneline" on
> a traditional 80-columns terminal.  I think that if you remove the
> word "locale" it is OK.  No problem if you don't want to change it,
> some people do not keep the 72 columns limit and nobody complains.

OK.  I will remove the word "locale" with 's/ locale//'.  When listing
with "git log --oneline" on a traditional 80-columns terminal, the
commit message summary should be within 72-colmuns with the first 7
characters of the commit hash (and 1 space).  If there is a bugzilla
associated with the patch ([BZ #XXXXX]), we need to deduct 12 more
columns.  So, we need to describe the commit message summary within
60-columns.

> > The offset in era-string format for Taisho gan-nen (1912) is currently
> > defined as 2, but it should be 1.  So fix it.  "gan-nen" means the 1st
> 
> Is is obligatory to write "gan-nen" in lowercase characters even if
> it is in the beginning of a sentence, like Unix command names which are
> case sensitive and therefore always written in lowercase?  If it does
> not break some rules which I am not aware of then please change to
> "Gan-nen".

Absolutely agree.  I will fix it.

> > (origin) year, Taisho started on Jul 30, 1912.
> 
> I think it is OK to write unabbreviated "July" here.

OK.  I will fix it.

> > ChangeLog:
> > 
> > 	[BZ #24162]
> > 	* localedata/locales/ja_JP (LC_TIME): The offset in era-string format
> 
> Somebody fix me if I'm wrong but I usually write here:
> 
> 	* localedata/locales/ja_JP (era):

I checked with the following command and confirmed that both are
commonly used.

$ git log | grep "^    "$'\t'"\* localedata/locales/"

> > 	for Taisho gan-nen is currently defined as 2, but it should be 1.  So
> > 	fix it.
> 
> I can't find the proper reference now but AFAIR the changes should be described
> in an imperative mode, something like:
> 
>     Change the offset for Taisho gan-nen from 2 to 1.

OK.

> Also I think that the issue is important and this patch does not depend
> on other patches so it is also OK to backport it to old stable branches.
> However, I'd like to hear an opinion of other maintainers about it.

As you are discussing here backporting, I think it is better to
backport to 2.29 only.

Regards,
TAMUKI Shoichi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]