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


29.03.2019 03:53 Carlos O'Donell <codonell@redhat.com> wrote:
> [...]
> If you find the new text useful then that's reason enough to include it
> :-)

OK, it is useful because it explains the things I wouldn't know otherwise.

> > [...]
> > What does the symbol "+*" mean?  Am I the only one confused?  Does
> > it maybe mean "infinity"?  Can we use anything different, like "+inf"?
> 
> Correct +* means for the rest of time.
> 
> We could use anything we want.
> 
> Please review glibc/locale/programs/ld-time.c (time_finish).
> 
> The code is duplicated twice for start/stop date, and cleaning that
> up would be good. Then you could propose '+inf'/'-inf' as reasonable
> alternatives which are more readable.
> 
> The entire format of the era entries is undocumented, and could do
> with documentation in the manual.
> 
> As you see there is a lot to improve :-)

OK, the symbols "+*" and "-*" are used in the source code (locale data
language, if it can be called so).  I meant that we could use something
more human-readable for the comment.

> [...]
> The columns use tabs, I've switched it to spaces to make it look
> better. I don't know if we can get any better alignment than what
> we have.

The new patch looks better, thank you.

> > [...]
> > Aren't the terms "B.C.", "B.C.E.", and "C.E." reserved for the
> > Christian calendar?  I'm sorry about my ignorance.
> 
> The Christian calendar is the adopted civil calendar in many parts
> of the world. The filler era names have been there since 1999, but
> I don't see that there was any consensus about the exact text to
> use. It fills in the era name for entries not provided with something
> sensible: before common era / common era.

OK, sorry, I misunderstood.  I thought that the term "B.C." was used
for "before Meiji era" which would be quite confusing.  Now I can see
it has the same meaning as we have in Europe and in many other parts
of the world.  Sorry, I feel tired these days, please take all my
comments with a grain of salt.

> [...]
> OK, here is a v2
> - Use space for table and compress size a bit.
> - Describes '+*', '-*' and '-0001' year date.

Your patch became corrupted in the email: some lines have got an
additional space in the beginning.  However, I managed to rework and
apply it locally and I believe that you have the original version of
it so this is a minor issue.

> [...]
> ---
>   localedata/locales/ja_JP | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
> 
> diff --git a/localedata/locales/ja_JP b/localedata/locales/ja_JP
> index 9bfbb2bb9b..b0f617a660 100644
> --- a/localedata/locales/ja_JP
> +++ b/localedata/locales/ja_JP
> @@ -14946,6 +14946,32 @@ am_pm	"<U5348><U524D>";"<U5348><U5F8C>"
>   
>   t_fmt_ampm "%p%I<U6642>%M<U5206>%S<U79D2>"
>   
> +# 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 "year" follows each date).
> +#
> +# Offset: Start date:   End date:   Era name:        Using "gan":
> +# (Y)     (YYYY-MM-DD)
> +# 2       1990-01-01    +*          平成 (Heisei)    No

For the record: this line will have to be changed very soon.

> +# 1       1989-01-08    1989-12-31  平成 (Heisei)    Yes
> +# 2       1927-01-01    1989-01-07  昭和 (Shōwa)     No
> +# 1       1926-12-25    1926-12-31  昭和 (Shōwa)     Yes
> +# 2       1913-01-01    1926-12-24  大正 (Taishō)    No
> +# 1       1912-07-30    1912-12-31  大正 (Taishō)    Yes
> +# 6       1873-01-01    1912-07-29  明治 (Meiji)     No
> +# 1       0001-01-01    1872-12-31  西暦 (C.E)       No
> +# 1       -0001-12-31   -*          紀元前 (B.C.E.)  No

Suggestion: remove one space before "-0001" so that the dates are
aligned perfectly.  Like this:

# 1       0001-01-01    1872-12-31  西暦 (C.E)       No
# 1      -0001-12-31    -*          紀元前 (B.C.E.)  No

> +#
> +# Note:
> +# - The '+*' entry means "forever going forward"
> +# - The '-*' entry means "forever going backwards" count up.

For the consistency: did you mean "counting up" instead of "count up"?

> +# - Negative start date is 1 B.C.E (not -1 C.E.) counting up.
> +# - The last entry 紀元前 means pre-era/B.C./B.C.E.
> +# - The second-to-last entry 西暦 means C.E.
> +#

Please put the literal Japanese strings in quotes:

# - The last entry "紀元前" means pre-era/B.C./B.C.E.
# - The second-to-last entry "西暦" means C.E.

Double quotes or single quotes, as you prefer.

OK with this one change, the previous changes are just suggestions,
which means feel free to ignore if you think that your version is OK.

Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>

Regards,

Rafal


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