This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug locale/10871] 'mon' array should contain both nominative and genitive cases
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 22 Jan 2018 10:32:42 +0000
- Subject: [Bug locale/10871] 'mon' array should contain both nominative and genitive cases
- Auto-submitted: auto-generated
- References: <bug-10871-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=10871
--- Comment #137 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 2aa8009d21802f700c4b47cb8e0c7e71fe915ba2 (commit)
via 22390764f9ef3b04ae71ad100af6282f677315c2 (commit)
via 761a585ce9245d5ad968303b200eef1f26fd501c (commit)
via 95cb863a1ef7760a11272bbd7ba5fe62dc41be54 (commit)
from 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2aa8009d21802f700c4b47cb8e0c7e71fe915ba2
commit 2aa8009d21802f700c4b47cb8e0c7e71fe915ba2
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Tue Jan 5 03:03:10 2016 +0100
pl_PL: Add alternative month names (bug 10871).
[BZ #10871]
* localedata/locales/pl_PL: Alternative month names added,
primary month names are genitive now.
* time/tst-strptime.c (day_tests): Actually use a genitive case
of a month name in Polish language.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=22390764f9ef3b04ae71ad100af6282f677315c2
commit 22390764f9ef3b04ae71ad100af6282f677315c2
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Tue Sep 19 00:00:22 2017 +0200
Documentation to the above changes (bug 10871).
[BZ #10871]
* manual/locale.texi: Document ALTMON_1..12 constants for
nl_langinfo. Specify when to use ALTMON instead of MON.
* manual/time.texi (strftime, strptime): Document GNU extension
permitting O modifier with %B and %b. Specify when to use
%OB instead of %B.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=761a585ce9245d5ad968303b200eef1f26fd501c
commit 761a585ce9245d5ad968303b200eef1f26fd501c
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Tue Nov 14 02:22:38 2017 +0100
Abbreviated alternative month names (%Ob) also added (bug 10871).
All the previous changes also repeated to support abbreviated
alternative month names. In most languages which have declension and
need nominative/genitive month names the abbreviated forms for both
cases are the same. An example where they do differ is May in Russian:
this name is too short to be abbreviated so even the abbreviated form
features the declension suffixes.
[BZ #10871]
* locale/C-time.c (_nl_C_LC_TIME): Add abbreviated alternative month
names, define them as the same as abbreviated month names explicitly.
* locale/categories.def (LC_TIME): Add ab_alt_mon and wide-ab_alt_mon.
* locale/langinfo.h: (_NL_ABALTMON_1, _NL_ABALTMON_2, _NL_ABALTMON_3,
_NL_ABALTMON_4, _NL_ABALTMON_5, _NL_ABALTMON_6, _NL_ABALTMON_7,
_NL_ABALTMON_8, _NL_ABALTMON_9, _NL_ABALTMON_10, _NL_ABALTMON_11,
_NL_ABALTMON_12, _NL_WABALTMON_1, _NL_WABALTMON_2, _NL_WABALTMON_3,
_NL_WABALTMON_4, _NL_WABALTMON_5, _NL_WABALTMON_6, _NL_WABALTMON_7,
_NL_WABALTMON_8, _NL_WABALTMON_9, _NL_WABALTMON_10, _NL_WABALTMON_11,
_NL_WABALTMON_12): New enum constants.
* locale/programs/ld-time.c (struct locale_time_t): Add ab_alt_mon,
wab_alt_mon, and ab_alt_mon_defined members.
(time_output): Output ab_alt_mon and wab_alt_mon members.
(time_read): Read them, initialize them as copies of abmon and wabmon
respectively if they are missing, initialize ab_alt_mon_defined.
* locale/programs/locfile-kw.gperf (ab_alt_mon): Define.
* locale/programs/locfile-kw.h: Regenerate.
* locale/programs/locfile-token.h (tok_ab_alt_mon): New enum constant.
* time/Makefile [$(run-built-tests) = yes] (LOCALES): Add es_ES.UTF-8
and ru_RU.UTF-8.
* time/strftime_l.c (a_altmonth, aam_len): New macros.
[!COMPILE_WIDE] (ABALTMON_1): New macro.
(__strftime_internal): Handle %Ob and %Oh formats.
* time/strptime_l.c [_LIBC] (ab_alt_month_name): New macro.
(__strptime_internal): Handle %Ob and %Oh formats.
* time/tst-strptime.c (day_tests): Add more tests to parse different
forms of month names including the new %Ob format specifier.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=95cb863a1ef7760a11272bbd7ba5fe62dc41be54
commit 95cb863a1ef7760a11272bbd7ba5fe62dc41be54
Author: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Tue Nov 14 02:19:35 2017 +0100
Implement alternative month names (bug 10871).
Some languages (Slavic, Baltic, etc.) require a genitive case of the
month name when formatting a full date (with the day number) while
they require a nominative case when referring to the month standalone.
This requirement cannot be fulfilled without providing two forms for
each month name. From now it is specified that nl_langinfo(MON_1)
series (up to MON_12) and strftime("%B") generate the month names in
the grammatical form used when the month is a part of a complete date.
If the grammatical form used when the month is named by itself is needed,
the new values nl_langinfo(ALTMON_1) (up to ALTMON_12) and
strftime("%OB") are supported. This new feature is optional so the
languages which do not need it or do not yet provide the updated
locales simply do not use it and their behaviour is unchanged.
[BZ #10871]
* locale/C-time.c (_nl_C_LC_TIME): Add alternative month names,
define them as the same as primary full month names explicitly.
* locale/categories.def (LC_TIME): Add alt_mon and wide-alt_mon.
* locale/langinfo.h (__ALTMON_1, __ALTMON_2, __ALTMON_3, __ALTMON_4,
__ALTMON_5, __ALTMON_6, __ALTMON_7, __ALTMON_8, __ALTMON_9,
__ALTMON_10,
__ALTMON_11, __ALTMON_12, _NL_WALTMON_1, _NL_WALTMON_2, _NL_WALTMON_3,
_NL_WALTMON_4, _NL_WALTMON_5, _NL_WALTMON_6, _NL_WALTMON_7,
_NL_WALTMON_8, _NL_WALTMON_9, _NL_WALTMON_10, _NL_WALTMON_11,
_NL_WALTMON_12): New enum constants.
[__USE_GNU] (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5,
ALTMON_6,
ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12): New
macros.
* locale/programs/ld-time.c (struct locale_time_t): Add alt_mon,
walt_mon, and alt_mon_defined members.
(time_output): Output alt_mon and walt_mon members.
(time_read): Read them, initialize them as copies of mon and wmon
respectively if they are missing, initialize alt_mon_defined.
* locale/programs/locfile-kw.gperf (alt_mon): Define.
* locale/programs/locfile-kw.h: Regenerate.
* locale/programs/locfile-token.h (tok_alt_mon): New enum constant.
* localedata/tst-langinfo.c (map): Add tests for the new constants
ALTMON_1 .. ALTMON_12.
* time/Makefile [$(run-built-tests) = yes] (LOCALES): Add fr_FR.UTF-8
and pl_PL.UTF-8.
* time/strftime_l.c (f_altmonth): New macro.
(__strftime_internal): Handle %OB format.
* time/strptime_l.c [_LIBC] (alt_month_name): New macro.
(__strptime_internal): Handle %OB format.
* time/tst-strptime.c (day_tests): Add tests to parse different forms
of month names including the new %OB format specifier.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 74 +++++++++++++++++++++++++
NEWS | 24 ++++++++
locale/C-time.c | 52 +++++++++++++++++-
locale/categories.def | 4 ++
locale/langinfo.h | 86 ++++++++++++++++++++++++++++--
locale/programs/ld-time.c | 40 ++++++++++++++
locale/programs/locfile-kw.gperf | 2 +
locale/programs/locfile-kw.h | 112 ++++++++++++++++++++------------------
locale/programs/locfile-token.h | 2 +
localedata/locales/pl_PL | 14 +++++-
localedata/tst-langinfo.c | 12 ++++
manual/locale.texi | 26 ++++++++-
manual/time.texi | 35 +++++++++---
time/Makefile | 3 +-
time/strftime_l.c | 25 +++++++--
time/strptime_l.c | 50 ++++++++++++++++--
time/tst-strptime.c | 20 +++++++
17 files changed, 500 insertions(+), 81 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.