diff options
author | Bruno Haible <bruno@clisp.org> | 2004-01-15 11:36:37 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:11:38 +0200 |
commit | 6bd2dedd09a7e568d2cab744428459b46681f3f9 (patch) | |
tree | c65be857dbff70f1a3ed415d8a0847dc6dd5a457 /gettext-runtime | |
parent | 3c5a4919e455998175fa5e712988408f192bbaeb (diff) | |
download | external_gettext-6bd2dedd09a7e568d2cab744428459b46681f3f9.zip external_gettext-6bd2dedd09a7e568d2cab744428459b46681f3f9.tar.gz external_gettext-6bd2dedd09a7e568d2cab744428459b46681f3f9.tar.bz2 |
Support for the 'I' flag that translators can use in messages marked
as 'c-format'.
Diffstat (limited to 'gettext-runtime')
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 6 | ||||
-rw-r--r-- | gettext-runtime/intl/gmo.h | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/loadmsgcat.c | 15 |
3 files changed, 23 insertions, 3 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index ef1f0d9..56c1449 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2004-01-09 Bruno Haible <bruno@clisp.org> + + * gmo.h (MO_REVISION_NUMBER_WITH_SYSDEP_I): New definition. + * loadmsgcat.c (get_sysdep_segment_value): Handle "I". + (_nl_load_domain): Treat major revision 1 like major revision 0. + 2004-01-08 Bruno Haible <bruno@clisp.org> * loadmsgcat.c (_nl_load_domain): When a string pair uses a system diff --git a/gettext-runtime/intl/gmo.h b/gettext-runtime/intl/gmo.h index d1fe4d6..e7c9cc1 100644 --- a/gettext-runtime/intl/gmo.h +++ b/gettext-runtime/intl/gmo.h @@ -1,5 +1,5 @@ /* Description of GNU message catalog format: general file layout. - Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -29,6 +29,7 @@ /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 +#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An @@ -76,7 +77,7 @@ struct mo_file_header /* The revision number of the file format. */ nls_uint32 revision; - /* The following are only used in .mo files with major revision 0. */ + /* The following are only used in .mo files with major revision 0 or 1. */ /* The number of strings pairs. */ nls_uint32 nstrings; diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c index 5d65853..99c51b4 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c @@ -748,6 +748,18 @@ get_sysdep_segment_value (const char *name) } } } + /* Test for a glibc specific printf() format directive flag. */ + if (name[0] == 'I' && name[1] == '\0') + { +#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) + /* The 'I' flag, in numeric format directives, replaces ASCII digits + with the 'outdigits' defined in the LC_CTYPE locale facet. This is + used for Farsi (Persian) and maybe Arabic. */ + return "I"; +#else + return ""; +#endif + } /* Other system dependent strings are not valid. */ return NULL; } @@ -1019,10 +1031,11 @@ _nl_load_domain (struct loaded_l10nfile *domain_file, /* Fill in the information about the available tables. */ revision = W (domain->must_swap, data->revision); - /* We support only the major revision 0. */ + /* We support only the major revisions 0 and 1. */ switch (revision >> 16) { case 0: + case 1: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); |