* locale/programs/ld-address.c (address_finish): Produce better

error messages for invalid lang_ab use.
This commit is contained in:
Ulrich Drepper 2005-09-24 16:37:16 +00:00
parent d29f5cc776
commit c093ea4f4c
5 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,8 @@
2005-09-24 Ulrich Drepper <drepper@redhat.com> 2005-09-24 Ulrich Drepper <drepper@redhat.com>
* 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. * locale/iso-639.def: Add a few updates from current spec.
2005-09-23 Ulrich Drepper <drepper@redhat.com> 2005-09-23 Ulrich Drepper <drepper@redhat.com>

View File

@ -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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@ -224,17 +224,24 @@ No definition for %s category found"), "LC_ADDRESS"));
if (address->lang_ab == NULL) 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"), WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"),
"LC_ADDRESS", "lang_ab")); "LC_ADDRESS", "lang_ab"));
address->lang_ab = ""; address->lang_ab = "";
} }
else if (address->lang_ab[0] == '\0') 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"), WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"),
"LC_ADDRESS", "lang_ab")); "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 else
{ {
if (cnt == sizeof (iso639) / sizeof (iso639[0])) if (cnt == sizeof (iso639) / sizeof (iso639[0]))

View File

@ -1,5 +1,8 @@
2005-09-24 Ulrich Drepper <drepper@redhat.com> 2005-09-24 Ulrich Drepper <drepper@redhat.com>
[BZ #527]
* locales/sid_ET: Remove incorrect lang_ab definition.
[BZ #525] [BZ #525]
* locales/ru_RU: Use nominative instead of genitive in mon data to * locales/ru_RU: Use nominative instead of genitive in mon data to
align with other locales with the same issue. align with other locales with the same issue.

View File

@ -113,7 +113,6 @@ country_num 231 % 210 found in at least one ISO 3166 doc
% country_car unknown % country_car unknown
% country_isbn unknown, Need ISO 2108 % country_isbn unknown, Need ISO 2108
lang_name "<U0053><U0069><U0064><U0061><U0061><U006D><U0075><U0020><U0041><U0066><U006F>" lang_name "<U0053><U0069><U0064><U0061><U0061><U006D><U0075><U0020><U0041><U0066><U006F>"
lang_ab "<U0073><U0069><U0064>"
lang_term "<U0073><U0069><U0064>" lang_term "<U0073><U0069><U0064>"
lang_lib "<U0073><U0069><U0064>" lang_lib "<U0073><U0069><U0064>"
% %

View File

@ -1179,6 +1179,9 @@ The abbreviated month name according to the current locale.
@item %B @item %B
The full month name according to the current locale. 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 @item %c
The preferred calendar time representation for the current locale. The preferred calendar time representation for the current locale.