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] Add verbose comments to 'era' in ja_JP locale.


Hello Carlos-san,

From: Carlos O'Donell <codonell@redhat.com>
Subject: Re: [PATCH] Add verbose comments to 'era' in ja_JP locale.
Date: Fri, 29 Mar 2019 10:57:14 -0400

> I agree with Rafal on all points.
> 
> Perfect is the enemy of the good.
> 
> We certainly need a document describing how to write, edit, and
> compile locales, and what formats are avialable.
> 
> Such a documnet is a huge untertaking. The intent of my patch, as
> Rafal points out, is to add source-code comments to the ja_JP
> locale to make it easier for me to review.

Agreed.  We certainly need such a document for Glibc, however it will
take enough effort and time to rebuild it.  Since era is particularly
complex in format, it is a good idea to put descriptions in ja_JP
locale.

However, I have some suggestions.

In the current patch, I would like to be brief as the line of the
comment are long.  In particular, since the description segments of
era has overlapping content, it is not necessary to put it in the
comment.  Instead, how about adding an explanation of the format of
description segment of era.

Next, I would like to avoid putting kanji character in the locale
data.  The locale data of Glibc can be customized by users using
localedef.  As ja_JP locale data does not depend on encodings, users
of either ja_JP.eucJP or ja_JP.SJIS environment may be garbled and
unable to edit correctly.  It is good to describe as <GAN>, <NEN>,
etc. according to other existing comment lines of ja_JP locale data.

Also, it is better to use "%" instead of "#" at the beginning of the
comment line of locale data.

How about the following explanation.

% The era names are laid out in groups of 2 to account for the desire
% to avoid using '1' for the first era year.  Instead of '1' we use
% <U5143> or <GAN> as the first era year.
%
% The following dates and their names are recorded below in descending
% date order (note that <U5E74> or <NEN> follows each date).
% <HEISEI> -> <SHOWA> -> <TAISHO> -> <MEIJI> -> <AD> -> <BC>
%
% Each string is an era description segment with the format:
% "direction:offset:start_date:end_date:era_name:era_format"
%
% Note:
% - The '+*' entry in end_date means "forever going forward"
% - The '-*' entry in end_date means "forever going backwards" count up.
% - Negative year number in start_date is prior to AD 1 (BC) counting up.
% - The last entry <U7D00><U5143><U524D> in era_name means BC.
% - The second-to-last entry <U897F><U66A6> in era_name means AD.
%

Regards,
TAMUKI Shoichi


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