From c093ea4f4c9ef460b864f3cf8ef6665ce74ecc4a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Sep 2005 16:37:16 +0000 Subject: * locale/programs/ld-address.c (address_finish): Produce better error messages for invalid lang_ab use. --- ChangeLog | 3 +++ locale/programs/ld-address.c | 13 ++++++++++--- localedata/ChangeLog | 3 +++ localedata/locales/sid_ET | 1 - manual/time.texi | 3 +++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e43751..31aa1e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-09-24 Ulrich Drepper + * locale/programs/ld-address.c (address_finish): Produce better + error messages for invalid lang_ab use. + * locale/iso-639.def: Add a few updates from current spec. 2005-09-23 Ulrich Drepper diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c index 079aa00..5a7d821 100644 --- a/locale/programs/ld-address.c +++ b/locale/programs/ld-address.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -224,17 +224,24 @@ No definition for %s category found"), "LC_ADDRESS")); if (address->lang_ab == NULL) { - if (verbose && ! nothing) + if (iso639[cnt].ab[0] != '\0' && verbose && ! nothing) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", "lang_ab")); address->lang_ab = ""; } else if (address->lang_ab[0] == '\0') { - if (verbose) + if (iso639[cnt].ab[0] != '\0' && verbose) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), "LC_ADDRESS", "lang_ab")); } + else if (iso639[cnt].ab[0] == '\0') + { + WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be defined"), + "LC_ADDRESS", "lang_ab")); + + address->lang_ab = ""; + } else { if (cnt == sizeof (iso639) / sizeof (iso639[0])) diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 36f8361..db629d4 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,8 @@ 2005-09-24 Ulrich Drepper + [BZ #527] + * locales/sid_ET: Remove incorrect lang_ab definition. + [BZ #525] * locales/ru_RU: Use nominative instead of genitive in mon data to align with other locales with the same issue. diff --git a/localedata/locales/sid_ET b/localedata/locales/sid_ET index 03727ab..8ce3234 100644 --- a/localedata/locales/sid_ET +++ b/localedata/locales/sid_ET @@ -113,7 +113,6 @@ country_num 231 % 210 found in at least one ISO 3166 doc % country_car unknown % country_isbn unknown, Need ISO 2108 lang_name "" -lang_ab "" lang_term "" lang_lib "" % diff --git a/manual/time.texi b/manual/time.texi index 7fc9448..9b87d3e 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -1179,6 +1179,9 @@ The abbreviated month name according to the current locale. @item %B The full month name according to the current locale. +Using @code{%B} together with @code{%d} produces grammatically +incorrect results for some locales. + @item %c The preferred calendar time representation for the current locale. -- cgit v1.1