glibc/locale
Rafal Luzynski 95cb863a1e 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>
2018-01-22 11:26:55 +01:00
..
bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
programs Implement alternative month names (bug 10871). 2018-01-22 11:26:55 +01:00
broken_cur_max.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C_name.c Update. 2001-04-06 17:49:18 +00:00
C-address.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-collate.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-ctype.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-identification.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-measurement.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-messages.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-monetary.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-name.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-numeric.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-paper.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-telephone.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
C-time.c Implement alternative month names (bug 10871). 2018-01-22 11:26:55 +01:00
C-translit.h Regenerate locale/C-translit.h. 2015-12-09 22:24:26 -05:00
C-translit.h.in Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
categories.def Implement alternative month names (bug 10871). 2018-01-22 11:26:55 +01:00
coll-lookup.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
coll-lookup.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
duplocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elem-hash.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
findlocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
freelocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gen-translit.pl Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
global-locale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
hashval.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
indigits.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
indigitswc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
iso-639.def Add new locale yuw_PG [BZ #20952] 2017-10-25 10:49:35 +02:00
iso-3166.def Fix typos in 3166.def. 2013-10-04 18:51:42 -04:00
iso-4217.def localedata: CLDRv29: update LC_MONETARY int_curr_symbol & currency_symbol 2016-04-15 13:42:29 -04:00
langinfo.h Implement alternative month names (bug 10871). 2018-01-22 11:26:55 +01:00
lc-address.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-collate.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-ctype.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-identification.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-measurement.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-messages.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-monetary.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-name.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-numeric.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-paper.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-telephone.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lc-time.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
loadarchive.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
loadlocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
locale.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
localeconv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
localeinfo.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
localename.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
locarchive.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mb_cur_max.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
newlocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
nl_langinfo_l.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
nl_langinfo.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
outdigits.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
outdigitswc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setlocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strlen-hash.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
SYS_libc.c [BZ #284, BZ #721] 2005-02-17 01:19:55 +00:00
tst-C-locale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-duplocale.c Add missing test files. 2009-11-17 16:23:57 -08:00
tst-locname.c Add missing test files. 2009-11-17 16:23:57 -08:00
uselocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Versions * sysdeps/ia64/dl-fptr.c (__ia64_make_fptr): Revert last change. 2003-03-03 09:45:25 +00:00
weight.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
weightwc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
xlocale.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00